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, 4H)

Test 1: uops

Code:

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

Issues: 2.000

Integer unit issues: 0.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e1f223a3f464951schedule 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)5f696b6d6emap 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)c2cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? ldst retires (ed)? simd retires (ee)f5f6f7f8fd
620062928821911801161000454729127001832820001000100010001000109068000102168702893629254310200010001000200020002920229206116100110001000100003010000001000101012856923668593063542206903075381414474328440163731345115148100010002925529241292272931429230
620042925221901800190421045252907000182602000100010001000100010907800042171902890429274310200010001000200020002921029168116100110001000100230110010011000121012808920268183033840206733053381013444628408164531356215029100010002935829288292932935029276
6200429376219021001709104626290800018235200010001000100010001090280005217030289762926431020001000100020002000291622918211610011000100010000001000000100002001278391256833308463920637309538107474628493163131343315058100010002939229303292882926929229
620042927322011410161150045982913100182882000100010001000100010901800032173202898529250310200010001000200020002941529241116100110001000100122210010111000101012982905768193029105120755315138147444528566162841353815030100010002929729329292902928729306
62004292632190190017048104608290890018250200010001000100010001090580000216800289192927031020001000100020002000291882921911610011000100010000001000000100002001289492646857304174320575308038166404928463164231364015042100010002927329320292922928429214
62004291992181211117100144842906500183262000100010001000100010901800052172602897329359310200010001000200020002924629209116100110001000100222110010111001121012790909968133019741205623114380610424228478162521354714974100010002922429222293222918929303
620042914221902000160151045472904000183142000100010001000100010904800002174102892829187310200010001000200020002927129175116100110001000100002010000001000020012868909468443068543206663099381513394628501165291342815204100010002927729309292012922029301
6200429240219116111219004558290470018305200010001000100010001090880000217060290012925531020001000100020002000291852923011610011000100010022211001011100112101295592326826305574020638308538088424128493162121345515167100010002928829265292692935529276
6200429341219018001909104639290621018260200010001000100010001090080005216960289552928231020001000100020002000291872916411610011000100010000201000100100002001272090666856305654420724308938159454328449164701331615097100010002933529345292652926329295
62004292692191181118100045552912200183702000100010001000100010904800052169402893929452310200010001000200020002918129085116100110001000100220110010121000221212889899368343050740206973067381515424828414163751344815068100010002933429232293262929329266

Test 2: throughput

Count: 8

Code:

  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [x6]
  st2 { v0.4h, v1.4h }, [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): 0.5007

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 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)rob full (74)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 cond mispred nonspec (c5)cfd0d2d5map dispatch bubble (d6)d9ddfetch restart (de)e0e8? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020640043311000000300039690400281616025162453100809398000010080000800005001839712650356004002140043400431995903200011601002008000080000200160000160000400424004311802011009910010080000800001008001514440080016011480002242000511000516033400390080000800001004004440044400444004340044
160204400433110000003000919040027161604916286710081908800001008000080000500183992864923700400214004240042199590320001160100200800008000020016000016000040043400431180201100991001008000080000100800151444008001601168000200000511000416044400390080000800001004004340044400444004440043
16020440043310000000000014600400281616025162501100813868000010080000800005001839712644903004002140043400421995903200011601002008000080000200160000160000400434004311802011009910010080000800001008001514440080016011880002140000511000316033400400080000800001004004440044400444004440044
16020440043310000000000039720400281616025161580100826828000010080000800005001839712645759054002140042400431995903200011601002008000080000200160000160000400424004311802011009910010080000800001008001415440080016012180002042000511000416055400390080000800001004004440044400434004340043
160204400423110000000000354204002816160251634001008186880000100800008000050018397126498250040021400424004219959032000016010020080000800002001600001600004004240042118020110099100100800008000010080014144498080016011780002242000511000316032400400080000800001004004440044400444004340044
16020440043310000000300027740400271616025162345100814088000010080000800005001839712642953004002140044400421995903200011601002008000080000200160000160000400424004211802011009910010080000800001008001514440080016011780002242000511000316033400390080000800001004004340044400434004440054
16020440052310110001321400024270400271616025161741100839728000010080000800005001839712650451004002140044400421995903200001601002008000080000200160000160000400424004211802011009910010080000800001008001517443080016111780002160000511004416054400390080000800001004004440043400444004440043
160204400423100000000000136504002801602516353610081231800001008000080000500183971264905600400284005240050199670320012160100200800008000020016000016000040042400421180201100991001008000080000100800151500080016001480062246000511004316054400400080000800001004004340044400444004340043
1602044004231100000001004207040027016025162216100833868000010080000800005001839712642953004002140042400421995903200011601002008000080000200160000160000400434004311802011009910010080000800001008001515440180016001880002042000511050316023400400080000800001004004340044400444004440043
16020440042310000000300017230400271616025161535100813428000010080000800005001839712645614004002140042400421995903200011601002008000080000200160000160000400424004211802011009910010080000800001008001514442080016001780002242000511000316033400400080000800001004004340043400444004440043

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)l2 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)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)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)a9aaacafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch cond mispred nonspec (c5)cfd0d2d5map dispatch bubble (d6)daddfetch restart (de)e0? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600264005331011000180146914003216160251646211081645800001080000800005018397126445021040021400434004319982320022160010208000080000201600001600004004240043118002110910108000080000108000004200800025003800001401400502000151602220400598000080000104005340052400534005340056
160024400533101100121901529140047161512516314710847428000010800008000050184009665137200400294006240054199903200341600102080000800002016000016000040052400541180021109101080000800001080014154400800164800380002042000502000201602120400408000080000104004340043400444004440043
16002440042310000000091104002800025161378108092380000108000080000501839712642064004002140043400431998232002216001020800008000020160000160000400424004211800211091010800008000010800000420080002900980002044000502000221602119400408000080000104004340043400434004340044
1600244004231000000301391040028161602516121310843718000010800008000050183971265348500400214004340043199823200231600102080000800002016000016000040042400421180021109101080000800001080000042008000090088000220000502000211602119400398000080000104004340044400444004440044
16002440042311000000036640400271616025160883108301880000108000080000501839712648014004002140043400431998232002316001020800008000020160000160000400434004211800211091010800008000010800000420080002400148000220000502000191601319400398000080000104004340044400444004440044
16002440043310000003013620400291616025163875108177080000108000080000501839712646656004002140043400431998232002316001020800008000020160000160000400434004211800211091010800008000010800000420080002700880000242000502000201602019400398000080000104004440043400444004440043
16002440043310000003013650400280002516111410807728000010800008000050183971265522800400214004240042199823200231600102080000800002016000016000040042400421180021109101080000800001080000042008000011001780002042000502000181601915400398000080000104004440043400444004340044
16002440043310000000037580400271616025161655108121180000108000080000501839712656185004002140042400431998232002316001020800008000020160000160000400424004211800211091010800008000010800000420080002800280002242000502000201602011400408000080000104004340044400444004340044
160024400423100000031136204002801602516540410808378000010800008000050184000064011800400214004240043199823200231600102080000800002016000016000040043400421180021109101080000800001080000042008000210001480002242000502000141602011400408000080000104004340043400434004340044
16002440043310000003087404002816160251606761083243800001080000800005018397126535230040021400424004219982320023160010208000080000201600001600004004240042118002110910108000080000108000004200800023300580002042000502000191601915400408000080000104004340043400434004440043