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

ST3 (multiple, post-index, 4H)

Test 1: uops

Code:

  st3 { v0.4h, v1.4h, v2.4h }, [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): 4.000

Issues: 5.000

Integer unit issues: 1.000

Load/store unit issues: 2.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)18191e1f22243a3f46495051schedule 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 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
640072889822225030003010045752841102017628500010002000200010002000200050002162116000600218222849828773327500020002000500060002862028560116100110001000200006020000002002060013243977570393248164197403278381323605922824410001536112399137692000200010002873828805286802877128766
64004287052220304000001048402857222017653500010002000200010002000200050002161816000700218662848028676310500020002000500060002870328748116100110001000200006020000002000060013129932270163153259198133118381415566122825910001552212443138382000200010002865728655287522865128764
64004288182220203000030045982852522017470500010002000200010002000200050002161916000400218832835328804310500020002000500060002860728626116100110001000200006020000022000000013174949370033155260197503174381518596522819610001516712561135682000200010002866028675285912886928694
64004287362220102000000049072859820017879500010002000200010002000200050002160316000700218902846528598310500020002000500060002879628714116100110001000200400020000022000060013186918270033192259197293210381616665822826110001510812690134562000200010002862828660287942872428583
6400428650223020201131004869286092001767850001000200020001000200020005000216241600040021799285082864871050002000200050006000286172873511610011000100020000602002000200006011113282936369633206160196383200381516636322831510001544212570133332000200010002870028681285992876328644
64004287962220102000010046452865602017653500010002000200010002000200050002162016000600219392839628663310500020002000500060002865928661116100110001000200006020000002000060013138961570273215259197823088381516645522818410001570812655136732000200010002866628786286812866328629
64004287362230203010010048082851120017639500010002000200010002000200050002162316000408219282847528693310500020002000500060002867628635116100110001000200006020020002000040013321948670063205267197213229381915646422819110001525512544140012000200010002874828813288152879628804
64004287402230501000010047732852800017644500010002000200010002000200250002161216000200219062855828701310500020002000500060002877228634116100110001000200004020000002000060013176958370253172264196403314381715636132822810001532912666134372000200010002855628661286302859228782
64004287632230305000000047792848620017595500010002000200010002000200050002161916000300219162858928835310500020002000500060002866828747116100110001000200000020000002000040013394958170313222364197213221382214696632824210001555912317135742000200010002883028752288182872228650
640042869422302040402410048072860322017692500010002000200010002000200050002162316000400217822846428798310500020002000500060002864928693116100110001000200000020000002000040013172953969953228261198253192381223656022822210001548212670137652000200010002863628762287452866428583

Test 2: throughput

Count: 8

Code:

  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  st3 { v0.4h, v1.4h, v2.4h }, [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.0006

retire uop (01)cycle (02)03mmu table walk data (08)0918191e1f2223373a3f46494f51schedule 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)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)a4st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)branch cond mispred nonspec (c5)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
32020780058621000003002050080030161602540556180100166301160000801001600001600004804992159008129808508002480045800440327400100200160000160000200400000480000800448004511802011009910010080000800001001600000440160002002160002640005109117118004280000160000160000801008004680046800468004780046
3202048004562000002130072150800330002540533380100165426160000801001600001600004804992079751130074908002380044800440328400100200160000160000200400000480000800448004411802011009910010080000800001001600000400160002002160002240005109117118004180000160000160000801008004680045800468004680046
32020480118621000003106272080030161602540450780100164856160000801001600001600004804992078849129614908002480548800450327400100200160000160000200400000480000800468004511802011009910010080000800001001600000400160002102160002240005109117118004280000160000160000801008004780046800468004680046
32020480046621000003005772080028161602540566580100163734160000801001600001600004804992157016130638708002380044800450325400100200160000160000200400000480000800448005411802011009910010080000800001001600000400160002102160002242005109217118004580000160000160000801008004780046800458004680045
320204800446200000930054160804781616255934048548027916793316018080277160354160324481555279753113050131804768022880047032640010020016000016000020040000048000080044800451180201100991001008000080000100160000044016000210111600041440005109117118004180000160000160000801008004580046800478004580045
3202048004462100000300406808002916160254049708010016686516000080100160000160000480499230642912872630800248004580045032740010020016000016000020040000048000080044800451180201100991001008000080000100160000040016000200216000220005109117118004280000160000160000801008004680055800458004680045
32020480043621000003005503080030161602540418080100163568160000801001600001600004804992079212129060108002480045800450327400100200160000160000200400000480000800448004411802011009910010080000800001001600000001600020010160002240005109117118004380000160000160000801008004680045800458004680046
32020480045620000003004358080029161602540575780100165121160000801001600001600004804992079508129723108002480046800450327400100200160000160000200400000480000800448004311802011009910010080000800001001600000400160002102160000240005109117118004380000160000160000801008004680045800538004580046
32020480045620000003005813080029161602540393980100165862160000801001600001600004804992079404129349008002580044800440326400100200160000160000200400000480000800458004511802011009910010080000800001001600000400160002102160000240005109117118004280000160000160000801008004780046800478004580045
3202048004662000000000441108002916160254044698010016525116000080100160000160000480499207894512979870800248004580044032740010020016000016000020040000048000080044800451180201100991001008000080000100160000040016000000216000220005109117118004280000160000160000801008004680045800458004680046

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 data (08)09l2 tlb miss data (0b)18191e1f2224373a3f46494f51schedule 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)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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
32002780053620110100211700582328003716160254059598001016476216000080010160000160000480049279977413041310800278005280051033540001020160000160000204000004800008005380053118002110910108000080000101600121246001600140014160002144612050193175580050800000160000160000800108005280050800538005280054
3200248004962011000091500313728003716160254052538001016423316000080069160000160000480049263970713042870800238004980049033340001020160000160000204000004800008005180049118002110910108000080000101600131246001600121014160002144612150193173380049800000160000160000800108005380053800538005480054
320024800536221101000150060152800370160254056968001016470516000080010160000160000480049247975612967900800278005380053033440001020160000160000204000004800008005380053118002110910108000080000101600121246021600140014160002144612050193173380050800000160000160000800108005080050800528005180051
3200248005062011000001200568128003616160254051718001016469916000080010160000160000480049255984313058570800288005080137033540001020160000160000204000004800008005280053118002110910108000080000101600121346001600740016160002144412050194174480049800000160000160000800108005380053800518005280053
32002480051620100100211700469928003516160254073998001016597616000080010160000160000480049255979912955200800258005280053033440001020160000160000204000004800008005080052218002110910108000080000101600121244001600141014160000144412150194173480049800000160000160000800108005380054800528005180053
320024800516201011000150023532800381616025404809800101643741600008001016000016000048004927997191296793080027800528005203354002952016000016000020400000480000800538005211800211091010800008000010160012124600160014001516000214012150195174480046800000160000160000800108005180054800538005380056
3200248005262110200001700162128003616160254054588001016554216000080010160000160000480049255973712942280800278005280053033540001020160000160000204000004800008022280053118002110910108000080000101600121346001600140015160002144612050194176580049800000160000160000800108005180053800548005480055
32002480053620100000015004848280038016025405494800101649861600008001016000016000048004925597731317633080037800528005303324000102016000016000020400000480000800538005311800211091010800008000010160012124400160014001516000012012050194174480049800000160000160000800108005480053800548005380054
32002480051621110000211000047032800351600254033208001016379316006080010160000160000480049279972712925480800258004780049032940001020160000160000204000004800008004880051218002110910108000080000101600121246001600120112160002124412150193173380047800000160000160000800108004980054800538005380304
32002480053620101000315007187280037016025406204800101647111600008001016000016000048004925553261287337080027800538005303324002952016000016000020400000480000800528005211800211091010800008000010160012124600160012101716000012012150194174480046800000160000160000800108005280053800538005280052