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

Test 1: uops

Code:

  st2 { v0.4s, v1.4s }, [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)181e1f22233a3f464951schedule 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 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)e0? int output thing (e9)eaebec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
64007296132381403100000469829151221838650001000200020001000200020005000216081600022182829261294373105000200020005000400029464294841161001100010002000602000000200006023731301193126909317426920440334938132169682883810001602413213146172000200010002954329613295482949829484
64004294602362300100004639293580218412500010012000200010002000200050002162016000221813294522969031050002000200450004000296182939511610011000100020000020001030200006001335493776998315926720563335438182568702871310001661713312146032000200010002955029593294802951428918
64004342772382205003004582285540017916500010012000200210012000200050002162516000112180828424287453105000200020005000400028929288431161001100010002000602000002200204001320696147021316926819739320238182169742824910001525712791138572000200010002878228617286572868428925
6400428744223210109100468228868001781750001000200020001000200020005000216051600012184628742289273105000200220005000400028944290581161001100010002000002000000200204201316191756986316127219988326538162167712841710001577413065142022000200010002890829072289682894128910
6400428985233211100100468628872201782850001000200020001000200020005000216301600012184828908290613105000200020005000400028729286941161001100010002000602000000200206001335992896999317116719790316838122667712818710001531912716138742000200010002864128756288002889028791
6400428715223230100100481928657001760150001000200020001000200020005000216281600042180928582287838105000200020025000400028733287211161001100010002000602000000200204001335094626918316727419686319338091867702814210001541712926134182000200010002874828844287562863128750
64004288212232302001004713284690217517500010002000200010002000200050002161916000142177728467287543105005200020005000400028579288411161001100010002000022002000200226001336392506963308536319708323538072063682827210001529012603138002000200010002884528620287412880528793
640042876522323030091004664286082217625500010002000200010012000200050002161916000162182228460288503105000200020005000400028663286722161001100010002000602000020200246001303495446872310816619748314438042770702818910001537912680138422000200010002875528649287742866828729
64004286362231202003004833285632217638500010002000200010002000200050002163516000192177128340287803105000200020005000400028634285981161001100010002000002002100200220001324592736954318126519763319038011869702828910001562912681140272000200010002871328755286772867128734
64004286932232102003004612285860217662500010002000200010002000200050002160916000202185528512287663105000200020005005400028704287031161001100010002000602002005200004001323093456993317436719694313538042156602821010001544512722136352000200010002884128750287432869528703

Test 2: throughput

Count: 8

Code:

  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [x6], x8
  st2 { v0.4s, v1.4s }, [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)09l2 tlb miss data (0b)18191e1f24373f46494f51schedule 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)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
32020780071620000000006202800301616103254042228010016515316000080100160000160000480499207935012971620800238004480044033040010020016000016048020040000032000080045800441180201100991001008000080000100160000000016000200216000224005163462128004280000160000160000801008077080774806478059480780
320204807726260014455839504137800301616025405476801001640181600008010016000016000048049921582561295625080023800458004503274001002001600001600002004000003200008004580046118020110099100100800008000010016000004000160000001116000204005109117118004280000160000160000801008004680046800458004580046
320204800456200000003048418003001602540494680100163986160000801001600001600004804992079721130162818002380044800450327400100200160000160000200400000320000800458004411802011009910010080000800001001600000400016000200216000224005109117118004280000160000160000801008004680046800468004580046
3202048004562000000030205180030161602540582480100163834160000801001600001600004804992079051130142408002380044800450327400100200160000160000200400000320000800458004411802011009910010080000800001001600000400016000200216000224005109117118004280000160000160000801008004680046800468004480046
32020480044620000001230332380030161602540596280100163901160000801001600001600004804992235902130077308002380045800450327400100200160000160000200400000320000800468004511802011009910010080000800001001600000420016000210216000224005109117118004280000160000160000801008004680046800468004580046
320204800446210000012303670800301616025406017801001651211600008010016000016000048049922377571295614080023800458004403264001002001600001604802004000003200008004580045118020110099100100800008000010016000000001600002021600022005109117118004280000160000160000801008004680046800458004680046
3202048004662100002030287380030161602540721180100164444160000801001600001600004804992238846129467308002380046800440327400100200160000160000200400000320000800438004511802011009910010080000800001001600000400016000200216000224005109117118004280000160000160000801008004680045800458004580046
320204800446200000003138488003016160254041448010016401816000080100160000160000480499223889313054820800248004580044032740010020016000016000020040000032000080045800461180201100991001008000080000100160000040001600021021600022005109117118004280000160000160000801008004680046800468004580045
32020480044620000001230542880030161602540411880100163335160000801001600001600004804992158256129792508002380044800460327400100200160000160000200400000320000800448004511802011009910010080000800001001600000400016000200201600022005109117118004380000160000160000801008004680046800458004680046
320204800446210000000051498003901602540377080100164898160000801001600001600004804992156998129532708002280054800450326400100200160000160000200400000320000800458004511802011009910010080000800001001600000400016000200216000224005109117118004280000160000160000801008004580045800458004580046

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0f1e1f2223373a3f46494f51schedule 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)60696b6d6emap 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
32002780058620000000600301800342400354034518001016590616000080010160000160000480049231938813027730800360800508004903394000102016000016000020400000320000800568005611800211091010800008000010160012123800160014001216000014601205021517558005480000160000160000800108005080046800518004680045
32002480045599000000300325518003516160254040278001016507616000080010160000160000480049207952012881090800250800458004803264000102016000016000020400000320000800508005011800211091010800008000010160000032001600000011160002254005021518558004580000160000160000800108004980049800458004680049
3200248005060000000040069961800301616025403568800101633531600008001016000016000048004920772751294211080024080045800440326400010201600001600002040000032024080045800451180021109101080000800001016000003220160000002160000454005021417538004180000160000160000800108004880046800508004580046
320024800455990000009005321180035240025406276800101610261600008001016000016000048004920788741301787080027080048800440330400010201600001600002040000032000080044800441180021109101080000800001016000003200160002208160002254005021617538004180000160000160000800108004680045800468004580050
320024800505990000000003782180030240025402223800101626631600008001016000016000048004923994401303109080028080048800480330400010201600001600002040000032000080049800491180021109101080000800001016000003220160002002160002232005021517458004180000160000160000800108005080045800458005080051
3200248004559900000030035201800292416025404197800101664701600008001016000016000048004923989511303481080024080049800440330400010201600001600002040000032000080048800451180021109101080000800001016000003200160000002160002232005021517548004680000160000160000800108004580049800508005080046
32002480049600000000600601800331616025404829800101660441600008001016000016000048004919197801301521080024080045800480326400010201600001600002040000032000080049800491180021109101080000800001016000003200160002000160002232005021517558004280000160000160000800108004780045800508004580045
320024800495990000003006421180032016025404830800101643321600008001016000016000048004922393751280066080482080048800450327400010201600001600002040034032000080049800491180021109101080000800001016000005620160002002160002254005021417538004280000160000160000800108004580047800468005080051
3200248004560000000600033180034240025404404800101677271600008001016000016000048004923886321299401080024080050800490332400010201600001600002040000032000080045800481180021109101080000800001016000003200160002002160002254005021517538004680000160000160000800108004680050800468005080051
3200248004460000000050073211800301616025405585800101645561600008001016000016000048004922845961290405080025080045800490330400010201600001600002040000032000080044800441180021109101080000800001016000005420160000002160002254005021517558004180000160000160000800108004580048800458004780049