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

ST4 (single, post-index, S)

Test 1: uops

Code:

  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  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
  mov x8, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 3.000

Issues: 4.000

Integer unit issues: 1.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 2.000

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f223a3f464951schedule 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)5f696d6emap 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)a9acafl1d cache miss st nonspec (c0)c2c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
630072956323812010000114628294641116479400010002000100010002000100050001280717901202345429255294023104000100020003000500029351294621161001100010001000030100000310003001328792896979308216020718331938021661582872910001634413523140481000200010002946129557294602961629605
63004292222370102000138004601293771116554400010002000100010002000100050001279517898182357829307294063104000100020003000500529570295261161001100010001000030100010010003001328994046938308906020862327738071664622877210001616713361141121000200010002948329600295382960629522
630042956223701030003104649293661116426400010002000100010002000100050051280217906102353629214294463104000100020003000500029414294541161001100010001000030100002010000401310093566916316227020844321238101362652863310001632613511140151000200010002933529547295102952729516
63004294612370102000000476629438101646440001000200010001000200010015000128071790652353529221295303104000100020023000500029299294361161001100010001000030100000010002001329193416916319316520860335038131662652869010001618513619138161000200010002957429485294972940529465
630042960223700010000880468129341011641440001000200010001000200010015000128051790414235612928629399310400010002000300050002936529448116100110001000100002010000038510002001305290126918316016320881331038161065602878310001611113459140351000200010002944729529294032935129461
63004295512370202000000467029436001647340001000200210001000200010005000127951790672353229223296213104000100020003000500029454294621161001100010001000020100000010002001321393876913316016320846340538151471632889110001653513505141071000200010002955429493295302964529599
6300429672237020100008804643294750016500400010002000100010002000100050001279917906102356929352296053104000100020003000500029527295981161001100010001000220100000010002001297393656953321816520856324238141862612892010001608513529140511000200010002950629573296542954329696
6300429488237030100000046722955401166334004100020001000100020001000500012797179155235912945229602310400010002000300050002958629478116100110001000100002010000001000200133479235702631492562105232953805962622882810001638013816138091000200010002954229725296412965729709
6300429662238020011139688046392956501165434000100120001000100020001000501012806179258235572933129650769401210002004300050052972929528316100110001000100203210020243510012001298793596939316005720976327738141961572893010001643813664141521000200010002954829660295702970329618
63004295752390112132264880464729555101662240041000200010001001200010015005128061795210236452960129902849400010012004300350102971629720316100110001000100003010000001000201291307294276838311516121331342738172966682899810001602513445139321000200010002947329395295202949729358

Test 2: throughput

Count: 8

Code:

  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  st4 { v0.s, v1.s, v2.s, v3.s }[1], [x6], x8
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6
  mov x8, 0

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)090f18191e1f2224373f46494f51schedule 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)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
240207800406420000012100289780025811025323369801001627588000080100160000800004408189375840514870650800158004080040499243499983205602008000016000020024000040000080040800401180201100990100100800008000010080000017008000100480061100205110011611800378000080000160000801008004180041800418004180153
24020480040620000000200337780025880613227588010016323480000801001600008000044081893758404148793608012080040800404992434999832010020080000160000200240744400000800408004011802011009901001008000080000100800000170080001002800611170005110011611800378000080000160000801008004180041801718004180041
240204800406210000018200260880025080253232898010016304680000801001600008010844081893758406148867108001580040800404997434999832010020080000160000200240000400000800408004011802011009901001008000080000100800002170080001002800011170005110011611800378009380000160000801008004180041800418004180041
24020480040620000000200280780025880253232218010016297780000801001600008000044081893758405148799108001580040800404992434999832010020080000160000200240000400000800408004011802011009901001008000080000100800000170080001024800011180005110011611800378000080000160000801008004180041800418004180041
24020480040620000000200314180025880253234288010016318280000801001600008000044081893758405148714818011980040800404992434999832010020080000160000200240000400000801698004011802011009901001008000080000100800000170080001002800011170005110011611800378000080000160000801008004180041801698004180041
24020480040620000000100302680025880253228078010016316480000801001600008216044081893758406148813808001580040800404992434999832010020080000160000200240000400000800408004011802011009901001008000080000100800000170080000002800010170005110011611800378000080000160000801008004180041800418004180041
24020480040620000000000268580025880253229998010016247280000801001600008000044081893758408148831908001580040800404992434999832010020080000160000200240000400000800408004011802011009901001008000080000100800000170080001005800011170005110011611800378000080000160000801008004180041800418004180041
24020480040620000000101284380025880253232008010016276980000801001600008000044081893758405148609008001580040800404992434999832010020080000160000200240000400000800408004011802011009901001008000080000100800000170080001002800011170005110011611800378000080000160000801008004180041800418004180041
24020480040620000000200238580025880253228458010016274480000801001600008000044081893758413149110008001580040800404997834999832010020080000160000200240000400000800408004011802011009901001008000080000100800000180080001102800011170005110011611800378000080000160000801008004180041800418004180041
24020480040621000000200324380025800253231098010016297780000801001600008000044081893758405149056208001580040800404992434999832010020080000160000200240000400000800408004011802011009901001008000080000100800000170080001003800011170005110011611800378009380000160000801008004180041800418004180041

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)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)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)l1d cache miss ld (a3)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2c9cfd0d5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
240027800406210000000200030330800258802532306380010162555800008001016000080000440767237584111489540080015800408004049946350020320010208012016000020240000400000800408004011800211090101080000800001080000017000800010048006011700050200316233800378000080000160000800108004180041800418004180041
240024800406210000000100029190800258802532311680010163316800008001016000080000440767237584051486604080015800408004049946350020320010208000016000020240000400000800408004011800211090101080000800001080000017000800010058000011700050200316344800378000080000160000800108004180041800418016980041
2400248004062000000002100302208002500025322941800101632298000080010160000800004407672375840514887880800158004080040499461950020320010208000016000020240000400000800408004011800211090101080000800001080000017000800011028000101700050200316233800378000080000160000800108004180041800418004180041
240024800406210000000200026540800258802532335780010163240800008001016000080000440767237584051487821080015800408004049946350020320010208000016000020240000400000800408004011800211090101080000800001080000017000800010028000111700050380316333800378000080000160000800108004180041800418004180041
24002480040620000010241000285508002588025323165800101628828000080010160000800004407672375840514864690800158004080040499463500203200102080000160000202400004000008004080040118002110901010800008000010800000170008000120880001017000502012316033800378000080000160000800108004180041801718004180041
2400248004062000000012200030030800258802532291280010163328800008001016000080000440948537584051486041080015800408004049946350020320010208000016000020240360400000800408004011800211090101080000800001080000017000800010028000111700050206316033800378000080000160000800108004180041800418004180041
240024800406200000000200025060800258802532291980010162912800008001016000080000440767237584051486240080015800408004049946350020320010208000016000020240000400000800408004011800211094101080000800001080000017000800010028000111700050206316033801448000080000160000800108004180041800418004180041
2400248004062000000002000261108002588025323234800101631678000080010160000800004407672375840514874490800158004080040499463500203200102080000160000202400004000008004080040118002110901010800008000010800000170300800010078000111700050209316033800378000080000160000800108004180041800418004180041
240024800406210000000200030260800258874253232108001016286480000800101600008000044076723758404148725708001580040800404994635002032001020800001600002024000040000080040800401180021109010108000080000108000001700080000002800611000050206216033801438000080000160000800108004180041800418017180041
24002480040620000000122000282208002588025322935800101627408000080010160000800004407672376224514847890800158004080040499463500203200102080000160000202400004000008004080040118002110901010800008000010800000004852817411228000111702050206316033800378000080000160000800108004180041800418004180041