Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

ST2 (multiple, 2D)

Test 1: uops

Code:

  st2 { v0.2d, v1.2d }, [x6]
  nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop
  mov x0, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 4.000

Issues: 4.000

Integer unit issues: 0.000

Load/store unit issues: 2.000

SIMD/FP unit issues: 2.000

retire uop (01)cycle (02)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2223243a3f464951schedule uop (52)schedule simd uop (54)schedule ldst uop (55)dispatch simd uop (57)dispatch ldst uop (58)simd uops in schedulers (5a)ldst uops in schedulers (5b)5f606166696binterrupt pending (6c)6d6emap rewind (75)map stall (76)dispatch uop (78)map ldst uop (7d)map simd uop (7e)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd store (99)inst ldst (9b)l1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? ldst retires (ed)? simd retires (ee)f5f6f7f8fd
640072862722210300000030010048002844300174424000200020002000200021615160001518021821002835728478310400020002000400040002846528413116100110001000200004020000002000040001350595337006329713619604331438088333628095148791251613622200020002851228467285572854128439
640042861122000100000001000493328548221747540002000200020002000216191600011100218410028269285283104000200020004000400028555285451161001100010002000040200000020000200013477944070073235037194903245381111324028114148781255314017200020002866928588285852837328557
64004284862220000010000100048072836900173984000200020002000200021630160008100218560028260286713104004200020004000400028512285611161001100010002000020200000020000000013073977670423269129194113220380611353628124153601252514117200020002842128542284462856628450
6400428633221001001000000004778284102017387400020002000200020002161316000900021826002837228516310400020002000400040002844328495116100110001000200000020000022000000001356494717020316703019395316738098363328087152021236813628200020002864328483284082846428563
64004284182200010010000100048902837202173114000200020002000200021613160009000218130028425286263104000200020004000400028455285991161001100010002000000200000020000600013517980970943239031194463260380213352628190151041241913819200020002866828514285392849428497
6400428511221000000000120100492328166201747440002000200020002000216251600016100218190028351284873104000200020004000400028496284531161001100010002000020200000020000200013563976470213174033194603259380713333528137153311250114005200020002860028627285532865028569
640042861522200100000001000479428517001750540002000200020002000216191600018000217860028446286103104000200020004000400028592285231161001100010002000060200020020002600013084942069603199033195423264380412373128105152931246014074200020002854928539287222851928624
640042853322100200200001000480228445221763540002000200020002000216031600014080217460028436287063104000200020004000400028540285381161001100010002000020200000020000000013390949969853142128195633172380411333128125153241259613953200020002855328605286352859028538
640042856922100100000063000486328449221744240002000200020002000216191600016000217920028403287083104000200020004000400028491285731161001100010002000000200000220002200013361964970533186039195563166380512343628164152241263513939200020002864028487285542852028496
640042845022200100300000100481928508001745840002000200020002000216181600013000217830028419286653104000200020004000400028546287011161001100010002000000200000020000200013254939970223208038195623140380415333328223153191268314259200020002862028528285932859528671

Test 2: throughput

Count: 8

Code:

  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  st2 { v0.2d, v1.2d }, [x6]
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code divided by count): 1.0006

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)09l2 tlb miss data (0b)0f18191e1f20222324373a3f46494f51schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)91inst branch cond (94)inst int alu (97)inst simd store (99)inst ldst (9b)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
3202078007164300000001200100547708003016013253255771001655291600001001600001600005002399049130201508010080048800448933132010020016000016000020032000032000080123800521180201100990100100800008000010016000003800160000001216006323401151091171180043001600001600001008004680046800468004580044
3202048004464200000000300003433080029016025324668100165919160000100160000160000500223951912959750800238004680046032732010020016000016000020032000032000080044800441180201100990100100800008000010016000000001600000021600022000051091171180041001600001600001008004680045800458004680045
3202048004964300000000900002918080028161602532578410016401816000010016000016000050022396081306533080024800448004503273201002001600001600002003200003200008004580045118020110099010010080000800001001600000340016000000216000023400051091171180041001600001600001008004680046800458005080045
3202048004464300000000300004001080033161602532567210016533516000010016000016000050020791081294680080024800498004903263201002001600001600002003200003200008004580045118020110099010010080000800001001600000340016000210216000223400051091171180041001600001600001008004680046800458004580046
320204800496430000000090000462808003016002532452810016686516000010016000016000050020791021302154080023800458004503313201002001600001600002003200003200008004580045118020110099010010080000800001001600000340016000200816000203400051091171180041001600001600001008004980046800458005080046
3202048004564300000000600005798080029000253244701001635841600001001600001600005002239723130336408002380049800520327320100200160000160136200320000320000800448004411802011009901001008000080000100160000036001600020051600022000051091171180045001600001600001008004680050800468004680045
32020480043642000000003000044110800301600253271041001660051600001001600001600005002343939129693308002480049800450328320100200160000160000200320000320000800448004411802011009911001008000080000100160000034001600021021600022000051091171180042001600001600001008004680046800458004580044
320204800436430000000030000726508003001602532507710016672016000010016000016000050021587831296454080024800458004503273201002001600001600002003200003200008004880045118020110099010010080000800001001600000360016000200316000223400051091171180042001600001600001008004780045800468004580049
3202048004964300000003300015862080030161602532494610016495516000010016000016000050020793781297231080023800458004503273201002001600001600002003200003200008004480048118020110099010010080000800001001600000400016000210816000003400051091171180041001600001600001008004980046800478005080046
32020480044643000000000000145560800291600253273151001657101600001001600001600005002158259129594608002580045800450331320100200160000160000200320000320000800458012211802011009901001008000080000100160000034001600000021600020000051091171180041001600001600001008005080045800468005180045

1000 unrolls and 10 iterations

Result (median cycles for code divided by count): 1.0007

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f222324373a3f46494f51schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)6061696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd store (99)inst ldst (9b)9e9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
320027800596201010000181710042981800471616025323312101650551600001016000016000050263970712965290580026800528005203453200102016000016000020320000320000800528005311800211091010800008000001016001414440016001600191600001644140051731171180059160000160000108005480052800528401980053
320024806666421001100391810019501800351616125324010101647851600001016000016000050247990212995080080034800508005003333200102016000016000020320000320000800588005011800211091010800008000061016001414360516001660181600021636140150191173280055160000160000108005280067802288005180060
320024800506211000000020001609318003516160253247161016705116000010160000160000503679304129607700800338005080051034032001020160000160000203200003200008005980161118002110910108000080000010160014142001600160021160002160140050191261180047160000160000108005980051800608005180053
3200248006062110100000150105048180035016025327250101646901600001016000016000050367913912991550080027800598005803313200102016000016000020320000320000800518021711800211091010800008000001016001615360016001601181600021634142050191171180056160000160000108005980061800528005180062
32002480058621100000001800012161800351616025325663101630011600001016000016000050239988913113460080028800598004803323200102016000016000020320000320000800508005111800211091010800008000001016001515360116001610201600021636140050191171180047160000160000108005180059800608005180059
3200248005062010000000190102434180033161602532590810164440160000101601181600005035993651297807008002580050800500340320010201600001600002032000032000080058800491180021109101080000800000101600741436001600160018160002140140050191171180047160000160000108005980050800538005180059
3200248005962110000000140106860180036161602532569210161216160000101600001600005022399341300810008002780050800580334320010201600001601202032000032000080059800581180021109101080000800000101600151536011600160020160002160140050191171180055160000160000108005280059800508005180060
32002480058620101000001701022211800431616025326628101642361600001016000016000050215695512956220080025800608006003323200102016000016000020320000320000800588005011800211091010800008000001016001414360016001600171600021436140050191171180048160000160000108005980061800518005980069
3200248005962110000000180105272180035161502532609110164367160000101600001600005036793561294158008003580058800580350320010201600001600002032000032000080060800591180021109101080000800000101600161400016001402141600021636140050191171180047160000160000108005980051800608006080053
320024800506201000000122001065301800351616025324715101634271600001016000016000050263983812907050080034800498005003323200102016000016000020320000320000800588005011800211091010800008000001016001514380016001610191600021636140050191171180056160000160000108006280053800598006080051