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, D)

Test 1: uops

Code:

  st2 { v0.d, v1.d }[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)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e1f22233a3f464951schedule 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)l1d tlb miss nonspec (c1)c2cfd0d2l1i 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
6200629258228310111111100470929074111823430001000100010001000100010005000109048000160021660289872936931030001000100030002000293152924211610011000100010000301000000100013001301692956929311614420676321938051045472853110001623513149143231000100010002932429269291652929929174
62004292882261000001810047042909500183033000100010001000100010001000500010902800050021698290052930731030001000100130002000293292929211610011000100010000201000003100004121293291586929312604120669322638061048522858010001618713252142561000100010002938929303293372932129283
62004292782281111011800046652914100185113000100010001000100110001000500010913800000021714292992934131030001001100030002000293422958211610011000100010022411001011100010001319991636891315404621021323738161045482875910001640013514144891000100010002958329564294412949529368
6200429401236000000421004712290220018392300010001000100010001000100050001090580005002169229001294103103000100010003000200029229292071161001100010001000030100000310000010134119797705032161461979733813805943442805210001440212192126281000100010002860628727286552861828163
6200428220212200000121005062281751017396300010001000100010001000100050001090880001700217092805928313310300010001000300020002823028361116100110001000100003010000001000030013722100227183334714519634337938061443392784610001441812146129981000100010002815228139281002817228351
6200428415211101010121005233282500017857300010001000100010001000100050001090480001100217002858228689310300010001000300020002847728692116100110001000100000010001001000020013697101737128335904419793323238141345552841310001565713101138171000100010002864728675288932881428684
6200428527222300001010050462812900173483000100010001000100010001000500010907800061021686281842824931030001000100030002000282302839511610011000100010000201000000100000001379410033721935301461966833373814842452785810001419612309133081000100010002827928309282852828628317
620042812021210000001005134281321017321300010001000100010001000100050001091380001000217392810428257310300010001000300020002833428312116100110001000100000010000001000020013663103437276343204219456339338071046512791710001458512108124051000100010002832328318282302812828155
620042832921200100001005155283310017167300010001000100010001000100050001091180006102176428364283993103000100010003000200028339283361161001100010001000020100000010000010137669756712433850491969033183809946442841810001453312358130811000100010002832128350283872814528473
6200428293212100000151005134282551117173300010001000100010001000100050001091280001100217432824728437310300010001000300020002829128216116100110001000100002010000031000021013841101207128333204619635332238121145422802810001471412324127131000100010002828028189285362835228275

Test 2: throughput

Count: 8

Code:

  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[1], [x6], x8
  st2 { v0.d, v1.d }[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)l2 tlb miss data (0b)18191e1f22373a3f46494f51schedule 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)c2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
160206800406200001002010350800258822524023280100814538000080100800008000043590143758848652906800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000002100800010068000102100511001162180037800008000080000801008166583112816338004180041
1602048004062000000154043030800258812524126080100843028000080216800008000043590143758848643469800158004080165599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000002100800013038000112100512801161180037800008000080000801008004180041800418004180041
16020480040621000000011721080025881252402878010081477800008010080000800004359014375884864348480015800408004059924359998240440200800008000020024000016000080040800401180201100991001008000080000100800077290080068018800017170511002161180037800008000080000801008004180041800418004180041
1602048004062010000090116180025997525240261801008344080000801008000080000435899437588486444038001580040800405992435999824010020080000800002002403601600008004080040118020110099100100800008000010080007729028000821118000172971511002161180037800008000080000801008027380041800418004180041
1602048004062100000040802080025882252415808010086043800608010080000800004359014375884864529980015801648004059924359998240780200800008000020024000016000080040800402180201100991001008000080000100800000000800010038000182971511001161180037800008000080000801008004180041800418004180162
160204800406201000009020511800259912524214980100818048000080100801168000043632613758848653980800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000882900800080088000182971511001162180037800008000080000801008004180041800418004180041
160204801636201000007012318014698732524166780100834668006080100800008000043589903758848652815800158004080040599243599982401002008000080120200240000160240800408004011802011009910010080000800001008000872900800080010968000182100511001162180037800008000080000801008004180164800418004180041
16020480040621000001324010350800258822524022280100801328000080217800008000043590143758848652788800158015980040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000002130080001103800011000511001161180037800008000080000801008004180041800418004180041
160204800406210000002028400800258812524097280100801328000080100800008000043590143763084640366800158004080040599243599982401002008000080000200240000160000800408004011802011009910010080000800001008000002100800011018000102100511011161180037800008000080000801008004180041800418004180041
160204800406210000004014610800258822524434580100842458000080100800008000043590143758848642407800158004080040599243600852401002008000080000200240000160000800408014611802011009910010080000800001008000002102800010018000002100511001251180037800008000080000801008004180041800418004180041

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)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)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)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
1600268016562212001113217900375408002588125244748800108469380000800108000080000435842937588486417420800158004080040599463600202400102080000800002024000016000080040800401180021109010108000080000108000001700800010028000182500502031665800378000008000080000800108004180041800418004180041
160024800406200010001212003755180025911125240932800108569380000800108000080000435840937588486512680800158004080040599463600202400102080000800002024000016000080040800401180021109010108000080000108000771700800080088000182570502051634800378000008000080000800108004180041800418004180041
160024800406201100000900469618002510116252456968001081724800008001080000800004358405375884864276908001580040800405994636002024001020800008000020240000160000800408004011800211090101080000800001080000825008000700148000182570502031654800378000008000080000800108004180041800418004180041
16002480040621100100012004691180025100225244752800108474280000800108000080000435842937588486464000800158004080040599463600202400102080000800002024000016000080040800401180021109010108000080000108000871701800071088000182570502041695800378000008000080000800108004180041800418004180041
16002480040620111100012001147180025980252413918001082360800008001080000800004358409375884864344108001580040800405994636002024001020800008000020240000160000800408004011800211090101080000800001080007025008000801118000182571502041674800378000008000080000800108004180041800418004180041
16002480040620100000090037591800258112252411628001085680800008001080000800004358405375884865126808001580040800405994636002024001020800008000020240000160000800408004011800211090101080000800001080008000080001000800017070502041686800378000008000080000800108004180041800418004180041
16002480040620100000122003789180025111122524002080010811488000080010800008000043584293758848651376080015800408004059946360020240010208000080000202400001600008004080040118002110901010800008000010800078250080008108800018070502041665800378000008000080000800108004180041800418004180041
16002480040620111000090046951800251111225240032800108568980000800108000080000435841337588486484480800158004080040599463600202400102080000800002024000016000080040800401180021109010108000080000108000772601800081088000011700502071665800378000008000080000800108004180041800418004180041
16002480040620000000030046940800258832524058580010800098000080010800008000043584293758848643450080015800408004059946360020240010208000080000202400001600008004080040118002110901010800008000010800000000800010028000111700502051674800378000008000080000800108004180041800418004180041
160024800406200000006300469408002580025241160800108001980000800108000080000435842937588486400360800158004080040599463600202400102080000800002024000016000080040800401180021109010108000080000108000001700800010018000101700502051645800378000008000080000800108004180041800418004180041