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

Test 1: uops

Code:

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

Issues: 4.000

Integer unit issues: 0.000

Load/store unit issues: 2.000

SIMD/FP unit issues: 2.000

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f22243a3f464951schedule 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)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)a9acafl1d cache miss st nonspec (c0)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
640072972523819024000010046802904600182224000200020002000200021607160006002183029133294123104000200020004000400029132291861161001100010002000040200010020004013178933969423215957203053217381420586228705160651312814996200020002944029415292972937929384
6400429373235250260000000457329124001829540002000200020002000216081600040021769290992940631040002000200040004000293692920911610011000100020000402000000200040130529199687231421254204813246381616545728584159701328914947200020002943629341294552954129502
640042942923623024000010047552917500183724000200020002000200021607160008002181829249295203104000200020004000400029398293661161001100010002000060200000320004013109943668483108958204393299382225546028807162551326015173200020002925829295293882931529322
6400429337237230240000000465529280001841040002002200020002002216161600030021798291632955431040042000200040004000293172944811610011000100020000402000000200040132599442694830921560205523300382325526428882162381339215018200020003056629799295192953829636
6400429767243251270666605280045063023300185344000200020002002200221609160003002187729281296347104004200020004000400029437295081161001100010002002040200000470200242130689378696331341358206903319382314595529160162481336214962200020002959129810295352953629863
6400429529237211280101328900469229474201829740002000200020002000215901601670021864291582938314104004200020004000400829333294371161001100010002002000200000405200040133369394695831021358207483302382614605528763160351311214789200020002957329441293612944529423
640042957423726019000010046492927300183594000200020002000200021603160166002186129168294733104000200020004000400029393293971161001100010002000040200000020004013138955069193218857205413281381219605028838159201319214928200020002957029680294582952729462
640042938223621020000000046772923100184624004200020002000200021622160164002188829129294653304000200020004000400029376293321161001100010002000040200000020006013205951269683127462205603284381716585728776164191317215301200020002947629471295102945529371
6400429396236210210001210047502920320183494000200020002000200021643160009002182029286295257104000200020004000400029402293701161001100010002000040200000020004013277942668833167951204163264381619596128850162191309514807200020002944329521295292952929418
6400429402237240260010100466229346001839940002000200020002002216011600020021832291382953831040002000200040004000294882950811610011000100020020402000020200040131549222693831661160203993269381922545928952160511342215005200020002947629502295172957229416

Test 2: throughput

Count: 8

Code:

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 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)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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
320207800716200000018306146080030161602532412810016497216000010016000016000050022397031295171800238004480045032832010020016000016000020032024032000080048800441180201100991001008000080000100160000034001600020051600022340510911711800421600001600001008004580050800458004480046
32020480045620000001230616608003016002532407610016399616000010016000016000050021575181294017800228004980049032732010020016000016000020032000032000080045800441180201100991001008000080000100160000036001600020011160002200510911711800411600001600001008021280045800468004580047
32020480045621000000305073080030160025322802100163779160000100160000160108500223972012983288002480045800458232632010020016000016000020032000032000080045800491180201100991001008000080000100160000034001600020021600022340510911711800411600001600001008012180045800508004580046
3202048004562000000369690444808003416169025326280100163557160000100160000160000500207873213048938002480044800440330320100200160000160000202320000320000800498004911802011009910010080000800001001600000340016000210111600024340510911711802021600001600001008005080045800458021780046
32020480049620000002430416608002916002532653810016363016000010016000016000050022397651297129800238004980049032832010020016000016000020032000032000080044800441180201100991001008000080000100160000234001600021021600024340510911711800421600001600001008004580046800508004580045
32020480210620000000304646080034161602532591110016499716000010016000016000050023959161298738800238004880049033032032620016000016000020032000032000080045800441180201100991001008000080000100160000034001600020081600022340510911711800411600001600001008004580047800468004580049
32020480044621000001323025890800290160253239521001633341600001001600001600005002239720129371980024800498005203273201002021600001600002003200003200008004580045118020110099100100800008000010016000003400160002109221600022340510911711800421600001600001008004780046800508004680045
32020480044620000000306132080203161602532624510016572516000010016000016000050020795571294068800248004480045032632010020016000016000020032000032000080210800441180201100991001008000080000100160000034001600022031600022340510911712800411600001600001008021380045800468004580045
3202048004462000000030433808003016160253263921001697071600001001631861632405222265387130366980023800448004501932632010020016000016000020032000032000080044800471180201100991001008000080000100160000042001600020051600022420510911711800421600001600001008004680046800458004580045
320204800886210000012306571080029161602532397510016459716000010016000016000050021582551302357800238004480121032732010020016000016000020032000032000080044800461180201100991001008000080000100160000042001600020021600022420510911711802061600001600001008004680046800458004680046

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f2223373a3f46494f51schedule 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)c2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
320027803896230111212641790045000824181616906932588110166324160060101601181601085021206131302675803318037780210849220320236201601201601202032024032048080372802123180021109101080000800001016012004262716090202146701610222420504804262380198160000160000108054580046802188038180210
32002480540622111011264880064170800301616025324208101651791600001016000016000050207940812942348002380215802130102633200102016000016000020320000320000800458004511800211091010800008000010160000042001600020021600022420501903173380042160000160000108004680274800468004580046
32002480044620000000041038340800300002532361210166081160000101600001600005021572371293693800238004480045032732001020160000160000203200003200008004680044118002110910108000080000101600001442001600020021600022420501903173280041160000160000108004680063800458004680046
320024800446200000000000597108003016160253243801016581816000010160000160000502294975130097580024800458004403263200102016000016000020320000320000800448004411800211091010800008000010160000144200160002005160000000501902173280041160000160000108004680046800458004680045
320024800446200000001230039900800300160253257721016648116000010160000160000502078321129521780024800438004603283200102016000016000020320000320000800458004611800211091010800008000010160000042001600020001600000420501903173380041160000160000108004780046800458004780046
320024800456210000000300417008003016160253220611016420416000010160000160000502079241129484680023800448004403273200102016000016000020320000320000800448004511800211091010800008000010160000042001600000001600002420501903174380042160000160000108004580052800458004680046
320024800456200000000300437408003116160253237311016561516000010160000160000502145910129988380024800448004303263200102016000016000020320000320000800458004411800211091010800008000010160000042001600001021600022420501904173480041160000160000108004680046800468004680045
32002480045620000000243004410080029161602532599110163779160000101600001600005021587371292511800238004580044032732001020160000160000203200003200008004580045118002110910108000080000101600001442001600021021600022420501903173380042160000160000108004580045800468004580046
32002480046621000000030059110800290160253240221016383416000010160000160000502145910129873880024800468004403273200102016000016000020320000320000800448004411800211091010800008000010160000042001600000051600022420501902173280041160000160000108004680045800468004680046
320024800446210000000310427808003016160253229471016383916000010160000160000502154709129679380023800438004503263200102016000016000020320000320000800458004511800211091010800008000010160000042001600020051600022420501903172380041160000160000108004580046800468004780046