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

Test 1: uops

Code:

  st2 { v0.s, v1.s }[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)09l2 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)5e5f6061696d6emap 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)a9acafl1d 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
620062938222722002200000004606290810018275300010001000100010001000100050001091780000500217372898729393310300010001000300020002936529189116100110001000100002010000001000200133889657689331511450206893271381512494822857610001618813236145191000100010002932629363293582927329323
62004292092272500170000100466929207001836430001000100010001000100010005000109078000030821770289682931331030001000100030002000291902925011610011000100010000201000000100020013118941368733190843206283180381413494722859510001611213448142681000100010002935729272293332929229379
620042945522724002000000004524291510018246300010001000100010001000100050001090880000170021692289252938231030001000100030002000291632920611610011000100010000001000000100000013016930168993111144920651325638069494842860210001625813337144191000100010002938129277291812935329426
620042938822922101800000004533292190018289300010001000100010001000100050001090380000200217162896329331310300010001000300020002924829190116100110001000100000010000001000200133059311688730961449207643167381219464322850610001621013162142491000100010002923329283291632943129263
620042920222818002500000104591290670018276300010001000100010001000100050001090280000800217222908429274310300010001000300020002921029242116100110001000100402010000001000200130459146694732061243207433245380912515022854610001607613028141491000100010002929629437293192933529477
620042949922715002100000004624291110018264300010001000100010001000100050001090880000900217562901229362310300010001000300020002925329243116100110001000100002010000001000200130409377689331531748206773210380713474822858210001616913073144081000100010002928829366293342955429306
62004293432271800170000010467029159001840330001000100010001000100010005000108928000090021736289122942731030001000100030002000293122926211610011000100010000301000000100020013117939969903186849207433248380811514522849710001636613201141501000100010002922729348293102933429136
620042930722724001900000004543290170018371300010001000100010001000100050001090880000300217182901429246310300010001000300020002921629221116100110001000100002010001001000200130539415686331801241207083219381410494622860410001611613034143041000100010002947929356293742941329265
62004292632271700220000010466829096001824630001000100010001000100010005000109008000020021731286682929431030001000100030002000292802925411610011000100010000201000000100020013025945668673111124620599315938147475122848910001614213296144611000100010002931429289291252915829212
620042948022718002100001004581290370018405300010001000100010001000100050001090980000300216812898429332310300010001000300020002915629260116100110001000100002010000031000200129639288688830871147207323111381210434622850610001617213419144301000100010002941029349292882930629313

Test 2: throughput

Count: 8

Code:

  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[1], [x6], x8
  st2 { v0.s, v1.s }[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)18191e1f373a3f46494f51schedule 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)c2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)d9ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
160206800406200000000942330800250012524545180100843418000080216800008010843589903775084646537080015800408004059924360082240108200800008000020024000016000080040800401180201100991001008000080000100800077170080008101480000117000511011631180037800008000080000801008004180041800418004180041
1602048004065210000021121831800251111225240239801008176780000801008046482808435899437588486404290800158004080040599246599982401002008000080000200240000160000800408004011802011009910010080000800001008000770018000811220580000825710511013401180037800008000080000801008004180041800418004180041
160204800406521100111291035080146881252401908028480851800008010080000800004359014375884864310008001580162800405992435999824044020080000800002002400001600008016580040118020110099100100800008000010080000017270800011058006110000511021611180037800008000080000801008004180041800418004180041
1602048004064700000112336120800258113252411358019183439800008010080000800004359014375884864025808001580040800405992435999824010020080000800002002400001600008004080040218020110099100100800008000010080060017008000110110580001117000511011611180037800008000080000801008004180041800418016180041
16020480040652000000129185008002588125240997801008023380000801008000080000435901437588486425510801178004080040599873599982401002008000080000200240000160000800408004011802011009910010080000800001008000001700800001058000110000511011611180142800008000080000801008004180041800418004183577
1602048004063800000012310350800258812524126080100811608006080216800008000043613863758848652738080015800408004059924135999824010020080000800002002403601600008004080040118020110099100100800008000010080000017028000110780061117000511011601180037800008000080000801008004180041800418016480041
160204800406470000001533424208014801112524023280100820848000080216800008000043590143762988655316180015800408004059988360080240100200800008000020024000016048080040800402180201100991001008000080000100801200173008006110480001118000512821611180037800008000080000801008004180041800418004180285
160204800406520000101353820800258802524251480100810358006080216800008000043590143758848643483080015800408016159924135999824010020080000800002002400001602388004080040118020110099100100800008000010080000017008000100109980062117000511011611180037800008000080000801008004180041800418004180041
1602048004064200000000850080025801252412608010080664800008010080000800004359014375884864034508001580040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000017008000110280000117000511011611180037800008000080000801008004180041800418004180041
16020480040643000000363874080025880252411358010080803800008010080000800004359014375884864441208001580040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000017008000120580001117000511011611180037800008000080000801008004180041800418004180041

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)l2 tlb miss instruction (0a)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)l1d tlb miss nonspec (c1)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
160026800406201100000120011481800250110252411638001081113800008001080000800004358409375884864343808001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800077260080008008800018257000502007164580037800008000080000800108004180041800418004180041
16002480161621100100012101482180025110125241157800108002180000800108000080000435840937588486434380800158004080040599463600202400102080000801202024000016000080040800401180021109101080000800001080007725008000811780001807100502004165580143800008000080000800108004180041800418016280041
160024800406221001000121011531800250012524470580010811478000080010800008000043609223758848648471080015800408004059946360020240010208000080000202400001600008004080040218002110910108000080000108000792501800081011800018257000502005165580037800008000080000800108004180041800418004180041
160024800406201000000120016581800251192252411568001084695800008001080000800004358405375884864344418001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800077250180008018800018257100502004166580037800008000080000800108004180041800418004180041
160024800406211000000700137818002511112252411588001081148800008001080000800004358409375884864344108001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800077001800081011800008257000502006165680037800008000080000800108004180041800418004180041
1600248004062110000012120014711800251111225241163800108474280000800108000080000435840537588486400760800158004080040599463600202400102080000800002024000016000080040800401180021109101080000800001080008700080008108800018257000502006167680037800008000080000800108004180041800418004180041
1600248004062010000012700178018002511112252400328001081146800008001080000800004358405375884864343808001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800087260080007011180001707100502004164580037800008000080000800108004180041800418004180041
16002480040620110000012002566180025002252409328001081147800008001080000800004358397375884864207008001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800077250080008108800018257000502005164480037800008000080000800108004180041800418004180041
160024800406211100000200116718002511112252411138001080012800008001080000800004358409375884864499808001580040800405994636002024001020800008000020240000160000800408004011800211091010800008000010800087250180008008800018257000502003164680037800008000080000800108004180041800418004180041
1600248004062010000009003197180025109625240019800108147180000800108000080000435840537588486434440800158004080040599461760020240010208000080000202400001600008004080040118002110910108000080000108000982500800080014800018257000502007165580037800008000080000800108004180041800418004180041