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

ST3 (multiple, 16B)

Test 1: uops

Code:

  st3 { v0.16b, v1.16b, v2.16b }, [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): 6.000

Issues: 6.000

Integer unit issues: 0.000

Load/store unit issues: 3.000

SIMD/FP unit issues: 3.000

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2224373a3f464951schedule 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)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)e0eaebec? ldst retires (ed)? simd retires (ee)f5f6f7f8fd
660083043224502722522826295511480004403298050017395600030003000300030003304124000200228472923029693314460303000300060009000294722945611610011000100030000303000224030301203020131469518692131011356202803215381936636029794174941373815241300030002950529569295232954030110
6600429988241017025019171411000465829705001745360003000300030003000330042402410022805292522965531060003000300060009000295492958211610011000100030020303000000300003000134409441692831411658205263346382030615828832164811300914960300030002965329684295212955229742
6600429686238024018000089000461829802001590960003000300030003000330412400010022762293292991031060003000300060009000294152946211610011000100030000303000000300000000131669552686931541254203533256381932576228763161351270714958300030002954429552294632956129602
660042955822802701900101000460229437001737660003000300030003000330542400010022750292772958333060003000300060009000295522944611610011000100030000003000003300003000131739433690331631053206363328381524595829036163481332214635300030002971229564297732963329725
6600429634238022024000088000459328784001675360003000300030003000330192400030022754286362897881060003000300060009000289462883711610011000100030000303000000300303000131839500686431631263197473233382133615128257160911242814274300030002891228947288342895928971
660042889522402802000101000458628783001675760063000300030003000330612402420022784286322898231060003000300060009000288622889611610011000100030000323000000300003000132379585691931061358196483167381832535628365155231239814037300030002895328793289382886328895
6600428923225027023000089000467628862001685160003000300030003000330522400040022728286962877731060003000300060009000288672888721610011000100030020003000040300000000131429404695331691464197963208382142565828333158251254414308300030002904928875289822886428965
660042892022402702401001000473828793001679860003000300030003003330762400040022750286412898931060003000300060009000288492892311610011000100030000303000000300003000131229253692931531159196883167381835556628510157981247714470300030002898728961289342899928850
660042897722402902101061000468028988001687660003000300030003000330582400040022757289222920231060003000300060009000291712910311610011000100030000303000000300003000134869912698531351059195473144382033636328486155391222414401300030002893729049289742900828615
660042864922302202000001000492828711001677760003000300030003000330532400030022788286612889031060003000300060009000287462870611610011000100030000303000000300003000133409642691530811458195893225382422595928304154001229313791300030002877128736288362868928685

Test 2: throughput

Count: 8

Code:

  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [x6]
  st3 { v0.16b, v1.16b, v2.16b }, [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.5005

retire uop (01)cycle (02)03mmu table walk data (08)0918191e1f2224373a3f46494f51schedule 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)c2cdcecfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)dadbddfetch restart (de)e0? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
48020812004796400000300541301200281616025485821100245220240000100240000240000500551966319436331200211200431200493998434002548010020024000024000020048000072000012004212004211802011009910010080000800001002400000340024000200224000220000051090008170088120046240000240000100120049120133120043120051120050
480204120048964000006007856012002816161254892921002450392400001002400002400005005519567194404512002112004212004339987340024480100200240000240000200480000720000120043120042118020110099100100800008000010024000003400240000002240002034000051100008170077120039240000240000100120043120043120058120052120044
48020412004296400000000430301200271600254879561002457052400001002400002400005005519687195971612003312004312004339984340024480100200240000240000200480000720000120042120052118020110099100100800008000010024000003800240002102240000200010511000081700811120040240000240000100120043120049120059120051120050
480204120042965000003006085012003416160254864391002469122400001002400002400005005519567194816712002112004212004939986340025480100200240000240000200480000720000120043120042118020110099100100800008000010024000003800240002002240002240000051100007170088120040240000240000100120043120043120051120050120049
480204120049964000000002899012002716160254867691002443402400001002400002400005005519663196698912002412004214485739984340025480100200240000240000200480000720000120043120048118020110099100100800008000010024000003400240002008240002234000051100008170078120040240000240000100120043120050120060120051120050
4802041200429640000123001092401200271600254872421002466692400001002400002400005005519567193398612002112004812004339984340024480100200240000240000200480000720000120049120042118020110099100100800008000010024000003400240002002240002234000051100008170048120039240000240000100120044120043120057120656120043
4802041200439640000000085420120037161602548534110024536024000010024000024000050055195671927222120021120048120042399843400254801002002400002400002004800007200001200491200421180201100991001008000080000100240122034410124012200173224018223400005123000526001715120467240000240000100120352120502120504120352120350
480204120352967111439691004703012033616161807148678510024581124012010224035124021650055254821945556120445120349120507401651040236480550200240240240360200480720720720120352120356318020110099100100800008000010024000003400240002009240002234000051100008170078120040240000240000100120043120049120043120050120049
4802041200429640000031062600120028161641254832151002459612400001002400002400005005519567194212812002112004212004939984340025480100200240000240000200480000720000120043120042118020110099100100800008000010024000003400240002002240002234000051100008170048120039240000240000100120044120050120044120043120050
480204120043964000012300879401200271616025485288100244052240000100240000240000500551956719307981200211200481200433998434002448010020024000024000020048000072000012004812004211802011009910010080000800001002400000342224054263022400022340004516413675582624829253122369240000240000100120045120043120043120050120050

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f23373a3f46494f51schedule 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)c2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0ea? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
4800281200529301001000140566101200281616025484544102449992400001024000024000050551956719367251200231200481200423998434003448001020240000240000204800007200001200421200581180021109101080000800001024000003400240000000240002234000502011711120039024000024000010120050120044120044120050120050
48002412004393100000013230803201204881602709448645410244140240060102401172402165055253861942687123396120198120358401649403404806852024024024036020480720720720120657120206418002110910108000080000102401820341040240182071743240182234000505814421120181024000024000010120360120350120508120509120512
4800241203529670000000305926112003816161254877351024286024000010240000240000505519908193880512003712006212005139992340036480010202400002400002048000072000014510312005211800211091010800008000010240014144401240016411624000216441400502011711120050024000024000010120053120054120149120052120053
480024120054931110100121705463112003716161254863461024300724000010240000240000505519860196064612002712004712005339992340044480010202400002400002048000072000012004912005311800211091010800008000010240014154400240016011724000216441400501911711120050024000024000010120051120063120054120054120054
48002412005593111110091905603112003616161254833451024666624000010240000240000505519788193467012002512005312005239989340034480010202400002400002048000072000012004812005311800211091010800008000010240014144401240016111824000216441400502011711120050024000024000010120054120052120055120054120055
48002412005493011000001806136112004716161254868871024359724000010240000240000505520364193622612002612005112005439991340034480010202400002400002048000072000012005112005411800211091010800008000010240015154400240016002124000216441400502021711120050024000024000010120063120054120053120063120052
48002412004793111100062009331112003716167254832131024853424000010240000240000505519668194101212002812005412006239989340035480010202400002400002048000072000012005312005211800211091010800008000010240014144400240016001624000216441401501911711120050024000024000010120053120055120052120051120063
48002412005193011110001903209112003616160254832131024357124000010240000240000505519567195237012002112004312004339984340024480010202400002400002048000072000014474412005211800211091010800008000010240014154800240016201724000216441410502011711120049024000024000010120055120054120053120055120055
48002412005293011100001706796112003616161254833511024424924000010240000240000505519808193633112002612005112005439990340035480010202400002400002048000072000014534112005411800211091010800008000010240014154400240016001624000216441400501911711120051024000024000010120062120054120052120063120063
4800241200519311010000170533511200381616825489207102443312400001024000024000050551988419460651200291200531200493999034003648001020240000240000204800007200001200531200481180021109101080000800001024001514440124001600192400021401400502011711120051024000024000010120054120054120054120053120052