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

Test 1: uops

Code:

  st2 { v0.4h, v1.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): 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)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 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)l1d tlb miss nonspec (c1)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
6200628993232213102000031004638286351017817300010001000100110001000100050001091180008216472857828720310300010001000300320002866428663116100110001000100003010011011000230001331494136920310215020525329138032054592832310001579212709136841000100010002881628880288622881128789
62004288362310100010011531000466228539111774730001000100010001000100010005000108998000821741285442880531030001000100030002000287852878311610011000100010000021002004651001031101314693937002315405220158322038141557592824710001530212964140081000100010002901028840288002880628851
620042882823200101120013220004734286951017833300310021000100110001000100050001090780006217482871228684310300010001000300020002884128777116100110001000100123010000111000140001320492556877316125720133321538132147502828610001565312943139211000100010002886428931289322882328814
620042884223100111111001000467628634001777830001000100010001000100010005005108998000721704286342888191030001000100030032000288702877811610011000100010000301001004301001021101318292926921310025520103319238182056572823410001567912718138231000100010002890528992287512885528787
6200428854232000010100020004777286290117891300010001000100010001000100050001089680009216672857828939310300010001000300020002880728834116100110001000100004110011051000130001301593926939314604420322326838151850532833310001603413141138981000100010002894528872288332882828919
62004288972360010101001442100471828812111798730001000100010001000100010005000109058000821708286242882731030001000100030002000288232884611610011000100010000021002200100003101471327091476949313115620535321138111248532850710001599212876141881000100010002901529208292642918428861
620042910623210111110002001475628817101776130001000100010001000100010005000109088000621713285502887231030001000100030002000287662875311610011000100010033401001004811000140201301093826924315814820343327238102354592826710021580812859139491000100010002898129058288522885828927
62004290102330000212211321790014636287641017833300310011001100210001000100550251090680004216892884929023310300010001000300020002905229093216100110001000100300310040201001031301307893146863312915020241316638122554492812610011581113012138181000100010002893830178291252901929221
6200429154235001220201132266001474628943111843030001000100010001000100010005000109078000921747288942931231030001000100030002000290492916811610011000100010000411001008100010114161312993526978313705720426335338101351572821810001559012959139861000100010002905528774287912848628670
6200428599222010001000010014690285000017718300010001000100010001000100050001090380004216852842928565310300010001000300020002871928617116100110001000100003110010001000031101339093296974331114721351328538143351462907010001731814446182631000100010002896128914288262870228772

Test 2: throughput

Count: 8

Code:

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 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)c2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602068004062010000180101480080025883252402228010086044800008033380000800004359014375884864310708001580040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000000080001105800000000511001611800378000008000080000801008004180041800418004180041
160204800406210000012300108008002588125240996801008267880000801008000080000435901437588486555220800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800013018000111700511011611800378000008000080000801008004180041800418004180041
1602048004062000000030011590800250802524022280100810358000080100800008000043590143758848648062180015800408004059924359998240100200800008000020024000016000080040800401180201100991001008000080000100800000000800010008000101700511011611800378000008000080000801008004180041800418004180041
16020480040620000002431014800800258812524440380100814508000080100800008000043590143758848648046080015800408004059924359998240100200800008000020024000016000080040800401180201100991001008000080000100800000170080000003800010000511011611800378000008000080000801008004180041800418004180041
1602048004062000000040012208002580325244403801008116080000801008000080000435901437588486453750800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800011008000111700511011611800378000008000080000801008004180041800418004180041
1602048004062000000020011308002588125241260801008148080000801008000080000435901437588486402070800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800010028000111700511011611800378000008000080000801008004180041800418004180041
1602048004062000000153108960800250802524126080100801598000080100800008000043589903758848644450180015800408004059924359998240100200800008000020024000016000080040800401180201100991001008000080000100800000170080000005800020000511011611800378000008000080000801008004180041800418004180041
16020480040620000000300116008002508225241260801008103580000801008000080000435901437588486444580800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800010008000111700511011611800378000008000080000801008004180041800418004180041
160204800406200000003009908002588125241255801008017980000801008000080000435901437588486424100800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800010018000111700511011611800378000008000080000801008004180041800418004180041
1602048004062100000030066408002500025245277801008103580000801008000080000435901437588486431000800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800000008000011700511011611800378000008000080000801008004180041800418004180041

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)696d6emap 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)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002680040620100100157100375618002511112252437668001083756800008001080000800004358405375884864516480015800408004059946360020240010208000080000202400001600008004080040118002110910108000080000108000882500800080114800018257150203816462080037800008000080000800108004180041800418004180041
160024800406201100000900047421800251111225245640800108207080000800108000080000435840537588486513678001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800078250180008118800018257150204216373780037800008000080000800108004180041800418004180041
16002480040621110000070001147180025910125241484800108469180000800108000080000435840937588486542298001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800087250080008008800018257050204016394080037800008000080000800108004180041800418004180041
1600248014862111010050771002418002511111382414738001081721800008001080000801084358417375884865126580015800408004060009360020240010208000080000202400001600008004080040118002110910108000080000108000772500800082011800018257050204116394080037800008000080000800108004180041800418004180041
1600248004062111000007000172418002511112252457018001081296800008001080000800004358405375884864767780015800408017960095360020240010208000080000202400001600008004080040118002110910108000080000108000872500800081011800018257050204116401580037800008000080000800108004180041800418004180041
160024800406201100000900037541800251111225241790800108114880000800108000080000435840937588486434448001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800077250080008017800008257150201516374180037800008000080000800108004180041800418004180041
16002480040620110000090004738180025911125241158800108563580000800108000080000435840937588486512718001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800099250180008008800018257150203816431780037800008000080000800108004180041800418004180041
160024800406201000000900020701800251111225241896800108469580000800108000080000435840937588486427608001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800078250080008118800018257250203716434280037800008000080000800108004180041800418004180041
16002480040620110100012000474218002511101252420798001081380800008001080000800004358417375884865689680015800408004059946360020240010208000080000202400001600008004080040118002110910108000080000108000872500800080011800617257150203816391580037800008000080000800108004180041800418004180041
1600248004062010000101850003024182222111114881242547801038150380120801268011680216436069337629886449628011780040802825994619261356245790208012080240202403601604808016280163318002110910108000080000108013072557080068031091800618257350563934243980248815548000080000800108028780161801628016380163