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 (single, post-index, B)

Test 1: uops

Code:

  st2 { v0.b, v1.b }[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): 2.000

Issues: 3.000

Integer unit issues: 1.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f22243a3f464951schedule 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)a9acafbcl1d cache miss st nonspec (c0)c2c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)dfe0? int output thing (e9)eaebec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
620062873322219019000001047512856311176073000100010001000100010001000500010901800015216642830228547310300010001000300020002851828576116100110001000100000010000001000000013316940069743211740200103200381410343122818610001553712669136401000100010002862028659286432868828668
620042857322115015000000047112850311175893000100010001000100010001000500010906800015217212852028698310300010001000300020002865828538116100110001000100003010001001000030013311967068393208942198323180380113373422819310001539612629134701000100010002861328695285812873228609
62004287232221501900000004824285270117667300010001000100010001000100050001090080001216992836428603310300010001000300020002872228695116100110001000100003010000001000030013422956369493164933200013111381014343822821110001549112585135721000100010002865828476286432861628685
620042865622216016000010047232866110176763000100010001000100010001000500010902800011217102837228669310300010001002300020002859528600116100110001000100003010000001000020013286940268983123435200053085380416303022815510001525212472139841000100010002853128629285162856728668
620042858922121016000010047802844500176033000100010001000100010001000500010902800062168928358287033103000100010003000200028616284741161001100010001000030100000010000300133299544696631061034199793221382013323422828410001538112691138211000100010002866528556286622869728624
6200428686223180100000000474528564101759230001000100010001000100010005000109008000521775284512877931030001000100030002000285972863911610011000100010000201000000100002001301294827002316373420040319738119313522822610001522712797136771000100010002864728613287092863128612
62004287342211201800090004870285800017606300010001000100010001000100050001090680001217382851028700310300010001000300020002861128571116100110001000100002010000001000020013090955269503127733200543220381719333522821710001505712640135421000100010002854928643285692864528591
6200428736223190190000100475728540001767230001000100010001000100010005000108998000321747283642863331030001000100030002000285992857711610011000100010000201000000100002001314196696977319853119987327538127363522815310001514012656133061000100010002868528677286872868828627
62004287022211301500000004818285420017672300010001000100010001000100050001090580005217202851028661310300010021000300020002871728616116100110001000100000010000001000000013100970669693117643201473234381614353922826310001554612548135731000100010002858228683287172863628736
62004286472221801200001004735285480017653300010001000100010001000100050001090580000217322848328670310300010001000300020002862128624116100110001000100000010000001000100013161960370143143527201523304381410323422818810001560812377138311000100010002875528670287072880828750

Test 2: throughput

Count: 8

Code:

  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[1], [x6], x8
  st2 { v0.b, v1.b }[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)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f24373a3f46494f51schedule 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)60696b6d6emap 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)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)l1d tlb miss nonspec (c1)c2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602068004062000000004051690800258802524295880100851688000080100800008000043590143758848645529080015380040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000000080001150180000121000511011611801438000008000080000801008004180041800418004180041
160204800406210000000402406080025081252419018010082307800008010080000800004359014375884864688908001508004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000002100800015802920180001021000511011611800378000008000080000801008004180041801628004180041
1602048004062000000012201902080025881252423998010086040800008010080000800004359014375884864049208001508004080040599241359998240100200800008000020024000016000080040800401180201100991001008000080000100800000210080003330980001121000511011611800378000008000080000801008004180041800418004180041
1602048004062100000029740195708002588125240242801008016180000802168000080000435901437588486457720800150800408016359924359998240100200800008000020024000016000080040800401180201100991001008000080000100800000210080001830980001121000511011611800378009108000080000801008004180041800418004180041
160204800406210000001220195108002588025240262801008229580000801008000080000435901437588486473420800150800408004059924359998240100200800008000020024035716000080040800401180201100991001008000080000100800000210080003410380001121000511011611800378000008000080000801008004180041800418004180041
160204800406200000000401951080025880252435318010082705800008010080000800004359014375884864042618001508004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000002100800011068000010000511011611800378000008000080000801008004180041800418004180161
16020480040621000010040427108002588025242474801008432280000801008000080000435901037588486457590800150800408004059924359998240100200800008000020024000016000080162800401180201100991001008000080000100800000210080001230380000121000512711611800378009308000080000801008004180041800418004180041
160204800406210000001292024000800258832524247680100853418000080100800008000043590143758848647184080015080040801635992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000221008000100980001121000511031612800378000008000080000801008004180041800418004180041
160204800406200000129402284080025883125240479801008191880000801008000080108435901437588486457661800150800408004059924359998240100200800008000020024000016025680040800401180201100991001008000080000100800000210080003370380061121000511011611801418000008000080000801008004180041800418004180041
1602048004062100000002051680800250832524151880100860418000080100800008000043590143763075646943080015080040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000000080001450780001121000511011611800378000008000080000801008004180041800418004180284

1000 unrolls and 10 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)5f6061696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)79map 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)a9acafatomic or exclusive succ (b3)bcl1d cache miss st nonspec (c0)branch mispred nonspec (cb)cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002680040620000000400469880025880252447078001081150800008001080000800004358429375884865126600080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000000780000012105020003163380037800008000080000800108004180041800418004180041
16002480040620000006400563780025880252456478001084694800008001080000800004358429375884865409900080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000110080000012105020003164680037800008000080000800108004180164802848004180041
16002480040622000000200563780025883252447048001081148800008001080000800004358429375884865408500080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000100380001012105020003163380037800008000080000800108004180041800418004180041
16002480040620000000200563380025880252447038001084694800008001080000800004358429375884865408500080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000100380001012105020003163380037800008000080000800108004180041800418004180041
16002480040621000000400563780025880252447078001080007800008001080000800004358429375884865408500080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000100380001002105020003163380037800008000080000800108004180041800418004180041
16002480040621000000200469480025881252447048001084694800008001080000800004358429375884865409500080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000100080001012105020003163380037800008000080000800108004180041800418004180041
16002480040620000006200563780025880252447048001081148800008001080000800004358429375884864344400080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000022008000100380002012105092003163380037800008000080000800108004180041800418004180041
1600248004062000000040046978002588025245647800108469480000800108000080000435842937588486570810008001580040804115994648618452434102320801208000020240000160259800408004011800211052701010800008000010800000218818000152038000117702105020005165480037800008000080000800108004180041800418004180041
16002480040643000000201469580025881252405888001085691800008001080000800004358429375884865408100080015800408004059946360020240010020800008000020240000160000800408004011800211090101080000800001080000021008000110180001012105020003163380037800008000080000800108004180041800418004180041
16002480040643000000201234080025883252456478001084694800008001080000801084358429375884864344400080015800408054359946360020240010020800008000020240000160000800408004011800211090101080000800001080060021008000120180001012105020003163380037800008000080000800108004180041800418004180041