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

STADDL (32-bit)

Test 1: uops

Code:

  staddl w0, [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 ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop
  mov x0, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 70 nops): 3.000

Issues: 3.005

Integer unit issues: 1.005

Load/store unit issues: 2.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03mmu table walk instruction (07)09l2 tlb miss instruction (0a)0e0f191e2223243a3f464951schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)5f696a6d6emap rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst int load (95)inst ldst (9b)9dl1d tlb access (a0)l1d cache miss st (a2)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbbl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)c2cfd0d1d2l1i 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)? int retires (ef)f5f6f7f8fd
7300534171256191150001006000533833950012210230041004200010002000110751691644931081337383422331030001000200020004000340352638117100110001000020002310041000004200462301494210579179473526777243183616444784754331851007189361673517581200010003408934128341163415034106
73004340552561901500010080005311339701022208300510052000100020001107116939549311013373934105310300010002000200040003404926331171001100010000200022100410000032004622015017109023800736118772415236234452144849330271005189621691417578200010003428534186340913418234103
73004340892551301400010100005589339121022160300510052000100020001115816831249276273375634140310300010002000200040003400026871171001100010000200032100510000042004630014898109972795035865552414235804455174748329921007189551692017815200010003417134079341363409134112
73004341072561501600010020005442339400022084300510072000100020001106017034549311553374334105310300010012000200040003402526661171001100010000200022100610000022006532014919107321805535606652431735074452245249330481007188731677717594200010003410134148341863421434094
73004342092551501800010080005318340290021982300510022000100020001093117042349311063373234156310300010002000200040003403926441171001100010000200020100210000062006622015203106863794736776652430235314449154451330021004192281692217601200010003412234141340803407434166
73004340492551701700010060005346340260122072300410072000100020001093019820249310233372534210310300010002000200040003406426941171001100010000200023100610000072007422015018106081798835635542407736224450194442329901007192291696517631200010003409934192341973414634134
73004340442551801600010040005327340130022008300610072000100020001101517020249310003374234157310300010002000200040003417426861171001100010000200020100410000022004422014996107822795335558662428836724450164347329401007189521662817851200010003402334088341373412534093
73004340252551701600010090005306340240022075300410052000100020001115016838449310523365534113310300010002000200040003404526531171001100010000200002100610000042002402014948109891798535748602424335284451185249330321002189891687317741200010003415834184341063406834162
73004341972561401500010080005329340180022135300510042000100020001098016929249310813384234068310300010002000200040003406426631171001100010000200002100210002062006320015121106252798235745682421335544449194651330371007192441664517661200010003411734184340313405434076
73004341102561401700010031005443339610022123300510052000100020001098616963749310113381634121310300010002000200040003395126521171001100010000200032100610000042004422015096108852805635206592410536344450104551330611007190431681217782200010003416634189341453418834052

Test 2: throughput

Code:

  staddl w0, [x6]
  add x6, x6, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 7.0069

retire uop (01)cycle (02)0309l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f1e1f20222324293a3e3f404346494f51schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)6067696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int load (95)inst int alu (97)inst ldst (9b)9d9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)l1d cache miss ld (a3)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafb6bbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
4020770088525000005251219110083913270106233740455781025404082043720000201002000020450093321900119249669997004470068645073650394010020200200003020040000700696211202011009910010000101001000001002017406801701987310246100431831586013620326055110759313103172269856203146620000201007007070070700837007070070
4020470069525000005253216010004911270054199343385752025406022055020000201002000020452803319846119849669927003170070645223650414010020200200003020040000700696411202011009910010000101001000001002018404911491987310244100191931605617120256271211060913103172269860202876620000201007006970071700707007170061
4020470068525000005243222310056459270057178729395749125405692038720000201002000020447473320336123949669897002870076645063650274010020200200003020040000700826511202011009910010000101001000001002019304571851987210239100611932297613820319243110556113102162269857203366620000201007006970069700727006970080
402047006952500000530012081000334870053163945375694325404402039820000201002000020448933321561110149669897002870068645073650354010020200200003020040000700696111202011009910010000101001000001002032006681911987110224100232531944811720175145210958713103172269856206426620000201007008270071700697007070070
40204700805250000052331169100048687005423873933573342540584205902000020100200002044660332158901234966989700297006964512365027401002020020000302004000070070651120201100991001000010100100000100202250455166198721029710058143176741042029405129856013102162269855203786620000201007007070073700707007370069
402047007252500000524012001001924613670070181746285692925405582032920000201002000020451013321917020249669887002970079645073650274010020200200003020040000700696411202011009910010000101001000001002024505751741987310260100302631958412220262143210846213102172269856204606620000201007008570086700697006970069
40204700815250000052582185100033407005417473240580982540410205902000020100200002045349332150301124966993700297006964507365026401002020020000302004000070073651120201100991001000010100100000100202330437125198731027710038153224441362024007028648013103162169856204946620000201007007070084700717007070070
402047007252500000527921961000484870054166239365743325404792044420000201002000020446973320979014849669907002970080645073650274010020200200003020040000700726311202011009910010000101001000001002022905551831988410227100451632057012320247048113252813102172269856202626620000201007007170070700777008270073
40204700695250000054071189100164610470107230731555705525404452063520000201002000020448503321925119949669897004470070645063650264010020200200003020040000700716111202011009910010000101001000001002022205751871987310264100421931764811820300075110133713103162269871202446620000201007008370136700707007070069
402047006852500000533311911000414870054221243395703825404542054320000201002000020450803321808121749669907002870069645063650254010020200200003020040000700696311202011009910010000101001000001002022405211591987510263100531632281813120218255212746413103162269856203436620000201007008670071700757007070078

1000 unrolls and 10 iterations

Result (median cycles for code): 7.0074

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f202224293a3e3f404346494f51schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)6067696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)79map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int load (95)inst int alu (97)inst ldst (9b)9d9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)l1d cache miss ld (a3)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafb6bbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
4002770093524101102005279824410484321670070212139395618925403522025820000200102000020449213321602083496700570029700696453236504940010020020200003002040000700696221200211091010000100101000001020221145511521988810228100552731919017720331265811562113112701161269856203389920000200107007170070700717007070088
40024700695241100000053048218108420700551331412257872254059620498200002001020000204433533216521294496698970031700696452936504940010020020200003002040000700696311200211091010000100101000001020302146231891987210211100421632771081462020825498751013112701161169856205449920000200107007070087700707008270070
4002470082524111001005236820710163411270054153228305675525401932034520000200102000020608013343148125349669897003070069645393650494001002002020000300204000070085641120021109101000010010100000102026216508171198721022610055193217581822021827589954514112701161169856203619920000200107007070070700707007070070
40024700815251100000052737182105636367006819112435581792540314203492000020010200002043945332099101154966990700297006964529365049400100200202000030020400007006962112002110910100001001010000010203371951719119872102731005753218613413320358162812054314112701161169856202769920000200107008570085700767008570089
400247008452511110000526572201004852700541902423357580254025920347200002001020000204528233218220139496700370029700696454436504940010020020200003002040000700726811200211091010000100101000001020247145821631987210216100392121544417220357282812549613112702161169873204999920000200107007070086700707007070084
4002470069525110100005263919310837160700542632493657751254035920354200002001020000204533933221551131496699770030700846453936504940010020020200003002040000700696411200211091010000100101000011020220166031951987610272100632131805213620225276812049813112701161169856202979920000200107008870070700707007070070
400247007053011000000528412480112853204700501764555357628254033620281200002001020000204511433218451214496698970033700656452936506040010020020200003002040000700656811200211091010000100101000001020226056521119868102441000819017280134202773661119415001270116116985220314101020000200107006670067700667006670073
400247006952400000000525202281005915270059196053375805225402802049820105200102000020448533321929128149669947003370089645343650534001002002020000300204000070074701120021109101000010010100000102017413424180198741024710039213178701302022438381105601401270116116987820327131320000200107007470074700907007570074
4002470088525110102005215717920144441687005916623832565462540360206722000020010200002045471332123002424966994700387008364549365054400100200202000030020400007007465112002110910100001001010000010202331448617119872102361000830122532179202032451129400001270116116985320325101020000200107007070079700677006670082
40024700695250000000053080197101603918070050224457475600725406132033220000200102000020453373320193187496698570025700656452536504540010020020200003002040000700656811200211091010000100101000001020245053418719870102071006025020266115202552650120433001270116116985420483101020000200107006670066700667008570066

Test 3: throughput

Code:

  staddl w0, [x6]
  mov x7, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 22.0129

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f22233a3f4346494f51schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)6067696a6b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)797bmap int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int load (95)inst int alu (97)inst ldst (9b)9d9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
3020522079516541111000027542151002201320502020032550541274842304010100200008513993105231180552492170650220161220129215441621632130100188418331020320005202064000922016790411102011009910010000100100000100200000322126754100666444784369891670102030001117161075801600219371212275520032000010100220165220162220110220126220129
302042201641649000001002751510002200762472025362550894271172333610100200008379594105240580501492170400220134220107215451621634630100205622891020320005202064000922013695611102011009910010000100100000100200000320271971000100167683682817374103400111716108070160021941115827716131002000010100220133220139220130220117220125
30204220131164900000000277331000220088095201893255054727719232961010020000822795110527304046749217052022012822013621546962163683010019851697102032000520206400092201409041110201100991001000010010000010020000033222657610000001692236427170701173100111717105960160021949220326811131002000010100220104220138220150220118220160
30204220160164900101000272040011220147000202135255058727788230621010020000842416110525644049749217037022012922013321544262163183010018922010102032000520206400092201159541110201100991001000010010000010020000030182633010001001724237155172401193100111716111740160021941619527675141002000010100220117220149220156220133220130
30204220149164800000000272121001220090277202024255073227450228361010020000855544710524313054049217041022013322008521543962163693010015861795102032000520206400092201638901110201100991001000010010000010020000002526419100000015800364201681200330011172210559224222194401402711901002000010100220159220108220119220123220128
3020422010016490000000027293000122012427020225325506942773222789101002000084255561052348605084921704202201562201342154016216289301002011181610203200052020640009220111842111020110099100100001001000001002000003117266511000100169813702816720103100111722107712252221949117727512141002000010100220106220128220136220154220132
30204220155164900000000273770011220091080202293255071527864232791010020000856849110528293048349217050022012022012021540662163473010020631994102032000520206400092201669691110201100991001000010010000010020000033026817100010017011377621684400000111716107140160021941916127169131002000010100220148220126220118220140220136
302042201321648000010002764810112201501002019232550788277492313010100200008397755105261210567492171140220119220142215502621635530100200117871020320005202064000922012982811102011009910010000100100000100200000312326647100340017008369981707112032001117171073301600219427198277990002000010100220134220101220140220176220138
3020422014116490000000027552001122014405720217525505652757623125101002000084205651052525605574921702802201412201402154366216409301001862217710203200052020640189220111894111020110099100100001001000001002000000026686100340017194374791734315163222111171610728016002193892112704713002000010100220109220098220133220151220133
302042201181649111100002722116013220096712020215225508822818723048101002000084979871052589005204921702332201112201572154656216398301001609191810203200052020640009220155844111020210099100100001001000001002000003202723410000001688936868166081223100111716102260160021941915327568141002000010100220128220160220120220118220146

1000 unrolls and 10 iterations

Result (median cycles for code): 22.0253

retire uop (01)cycle (02)03l1d tlb fill (05)09l2 tlb miss data (0b)0e0f191e1f2223243a3f404346494f51schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)6067696a6b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)797bmap int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)92inst branch cond (94)inst int load (95)inst int alu (97)inst ldst (9b)9d9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch cond mispred nonspec (c5)cfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
3002522020516490000003241211000220266001212200718255286232812200661001020000106820321052388801291492171630220243220257215344321648530010121141100202000020020400002202877211110021109483741010000101000001020000031353154610001002157541642215471353100064015353215222193132327900102000010010220214220262220252220256220286
3002422025716500001103167510000220214001202011732552922328132006110010200001067590210524395013424921717102202512202612154193216469300101481271002020000200204021822029966211100211095672610100001010000010200000313931478100010021473414932143313000006401522421622219419232794002000010010220270220292220256220268220263
3002422027516500001003159911001220284021110201186255293132779200691001020000106554651052269801373492171513220320220259215396321650730010113137100202000020020400002202597201110021109537091010000101000001020000035393150810001002146741520215011031000640153282152221940503276310102000010010220244220245220272220278220222
30024220271165000000031574010002202520013132013622552871327642011110062200001060542310523347013504921717502202952202732154273216515300101311261002020000200204000022024766411100211094907710100001010000010200000310314191000000214334148721376130000064015268216322193670326710102000010010220226220266220240220268220272
30024220259164901000032359353000022025200013201202255295432714200911001020000106171831052424301318492171750220260220324215413321644530010119130100202000020020400002202196481110021109656061010000101000001020000031333157410001002159341598215851293500064015283115222193851328240102000010010220250220300220268220254220250
3002422024516500000003154010000220258018132010002552825327422010410010200001060617210523286013564921719702202212202492153243216499300101201201002020000200204000022028370711100211095797210100001010000010200000036315071000100214644152721387000000640153832162221936313273110102000010010220266220276220328220286220296
3002422026516500000003148110000220298018132014762552868328202007310010200001061313010527086013384921713902202652202632153283216482300101391411007720000200204000022025772811100211094712710100001010000010200000313531502100010021466414552150403131000640153532162221934913272810102000010010220284220284220282220258220256
3002522032016500000003150701000220224009820124025527843282320085100102000010618450105245560135049217171022022722023121534432165243001098100100202000020020400002202577231110021109529891010000101000001020000035343152810001002150841484215230290000640152072162221937013268014102000010010220318220260220296220274220316
3002422026716500001103173101000220274001202012722552903328522007110010200001065178810524989013554921716102203092202962154053216502300101111261002020000200204000022030966621100211095348110100001010000010200000313531484100012021519415282147112931000640151932172221943123275410102000010010220232220251220276220244220288
30024220236165000001031879110002202420000201337255291932817200591001020000106524041052442701298492171820220273220257215372321645330010125124100202000020020400002202597071110021109476681010000101000001020000031353147910001002146541416214481303100064015356216222194200326781002000010010220295220258220256220282220264