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

STCLRB

Test 1: uops

Code:

  stclrb 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.004

Integer unit issues: 1.004

Load/store unit issues: 2.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f1e1f22243a3f464951schedule 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)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 int load (95)inst ldst (9b)l1d 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)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
730053408825611811231001005100537333912002206730061003200010002000109231688024931012339133400531030000100020002000400033981265811710011000100020033021004100101320013122201486010761079663573857241933603444054846330201004190131672817601200010003409934132340763409534076
73004341162541231120100102310053303384500221153005100620001000200010977168896493109033849341033103000110002000200040003399627031171001100010002004320100410010142004613221149821064417966358115472415536174442114247329721006189321674617727200010003411534021340433407334129
730043406425511510151001005100528733891002202230021004200010002000109231682254931062338893415331030000100020002000400033925266511710011000100020044331003100101102001713321151281074607963357412472416435874440125049330281006191201688117661200010003414734060341053401434145
7300434076255122111810010091105352338770021975300410022000100020001106116836449309553381034028310300001000200020004000339402675117100110001000200333210061001004200131222115007105510798535311351241223651443174438330001005190651684617609200010003409334146336283411133980
7300434070255116111810010101005437336510022068300410042000100020001093316974949309323379334032310300001000200020004000339292620117100110001000200432210031001005200441002115095106210792735591143241533661443584548330131005188971653717486200010003406634017340263407234079
73004340422541171117100104810510531933856002201930041002200010002000110001684011493091633785340983103000010002000200040003398626311171001100010002002232100410010142003413320149991071817961359511452412835664438124741330061006190211658317741200010003405534074341063408234056
7300434041255123111910010111005347339331022044300710022000100020001106216882124931051338513409431030000100020002000400033961264511710011000100020043021007100102520025102221488110605180193567945241413586444284949330041002191961669517574200010003403633985340513402334006
7300434072255116111810010052105268339210022049300610072000100020001099716896449309833381834047310300001000200020004000339262682117100110001000200432210061001004200431232115130107740798735801047241873608443964643330071004190701679317701200010003406334093341793406834106
73004341092551181116100100510053493391301219453004100720001000200011056168256493097733859340873103000010002000200040003395126771171001100010002004422100410011162001514020150551067407995355712462414836174438164849325211004191091672817599200010003406934060341003400334086
73004341792551211116110100711053333388800220333005100220001000200011000168516493095633862340753103000010002000200040003394226081171001100010002003420100710010342001512021149651063017941356913482401736244434124946329551004191391681317541200010003403534070340223402734058

Test 2: throughput

Code:

  stclrb w0, [x6]
  add x6, x6, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0071

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)0e0f1e1f2022233a3e3f404346494f51schedule 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)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)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
402063007122500020338310431011030056224172112918254046620441200002010020000912646141274912524926995300723006524819325029401000202002000030200400003007165112020110099010010000101001000001002005514151730100701001010303438200583173402010013101161130062203226620000201003006630053300763006630076
4020430065226000003400819108030043364710129122540411204332000020100200009124681412174125149269853006230065248103250324010002020020000302004000030075611120201100990100100001010010000010020024022256010052100053118223520045021126514314113101171130068203499920000201003007230072300593007230059
4020430071225100103378420101503005022720281292525404172040920000201002000091255514125020254492699130071300712481232502940100020200200003020040000300716711202011009901001000010100100001100200541424976010078100093218305920078229249990013101171130072202976620000201003006630076300763006630076
40204300752250001033811120101603005616523111289425404032042920000201002000091255814127531236492698530052300752481032502340100020200200003020040000300676111202011009901001000010100100000100200200223480100451000521222029200711272451230013101161130072203519620000201003007630066300663007830076
4020430075225000003438112410100300562346161290825404492040120000201002000091210414127891240492698530072300652480632503340100020200200003020040000300656111202011009901001000010100100000100200180753701004910000101822382003604795412513113301161130068203259920000201003007230074300723005930072
40204300712251100033871181017430050421181212915254037920434200002010020000912732141293202774926991300713007124803325029401000202002000030200400003007158112020110099010010000101001000001002004516125560100921002522191864200521205733180013101171130062203039620000201003006630076300663007630053
402043006522600000340692410003005617412201289325404252041620000201002000091217714128390244492699530065300652482032503340100020200200003020040000300755711202011009901001000010100100000100200260237690100841002112282898200741624422030013101171130062203146620000201003007630076300763006630066
4020430071225111003381224107030037245101412918254042320413200002010020000912640141188002604926993300713007124816325029401000202002000030200400003007164112020110099010010000101001000001002007014131710100711000912231673200672231301760013101161130062203286620000201003006630076300663007630066
40204300652250000033919191020030056221815129072540442204492000020100200009125851412141024149269953006530075248103250104010002020020000302004000030075611120201100990100100001010010000010020025014651010075100011130344820030249107925114113101161130068203460920000201003007230072300723007230072
402043007122511100338623810140300602421519129552540440204202000020100200009125551412963027149269913031030081248153250284010002020020000302004000030071641120201100990100100001010010000010020040032984010059100051000522003434295015114013101161130068203539920000201003007230072300723007230072

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0080

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f202223293a3e3f404346494f51schedule 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)rob full (74)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)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)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
4002630080225110120003419103410018283006026291433129452540414203522000020010200009119801413006133849270003007530075248390325061400102002020000300204000030075711120021109010100001001010000010200461522511301013410023102808420064252101004401411270215113007720392131320000200103008130076300763008130076
400243005822610102000343813620002603006020132521129302540353203642000020010200009120771413179025849270003005830080248460325055400102002020000300204000030080701120021109010100001001010000010200461421094010096100132132347320132264111352071311270116113007720361131320000200103008130076300763008130076
4002430080225100100003431103610021030060322419201286525403692036020000200102000091219614132371248492700030058300802484603250614001020020200003002040000300757111200211090101000010010100000102005314122620100891001121352282201043981058180141127011511300722037813020000200103008130081300813007630081
40024300802261011200034741036200703006501834141293925404182039620000200102000091208514129491263492699530080300802484303250604001020020200003002040000300807011200211090101000010010100000102004613160580100981001540482472201093509891691401270116113007720358131320000200103008130081300593007630081
4002430080225101100003410103210017030065291717121291025403902036720000200102000091212114131931249492700030075300752484203250614001020020200003002040000300807011200211090101000010010100000102005214210590101171000921363482201072568622051401270116113007720400131320000200103008130081300763007630081
4002430080238111020003430103900020030065311615171290625403962030820000200102000091193814128811253492700030077300802484803250554001020020200003002040000300807011200211090101000010010100000102004715152740101011001021400852009015511551551421270216113007220359131320000200103007630081300813005930081
40024300752251100000034321145100160300602823181612920254039320320200002001020000912278141297912564927000300723008024824032503840010200202000030020400003008059112002110901010000100101000001020050151277801010910009213536792007527812854701401270116213007220362131320000200103008130081300813008130081
4002430080225111100003433928100153630065242412251290825403612036420000200102000091202614122031241492700030077300802482603250554001020183200003002040000300807111200211090101000010010100000102004615153720100921001741560902011015011651791411270115113007220349131320000200103008130081300593008130081
40024300802251100000034661361100130300652324181212935254036120415200002001020000911757141295312334927000300803007924848032505640010200202000030020400003007571112002110901010000100101000001020049151316301008910008203436882007827414631801401270116113007220359131320000200103008130081300813007630080
40024300802251111000034431137100164300653211191012942254038520484200002001020000912187141319212294926978300803008024844032505640010200202000030020400003007571112002110901010000100101000001020057153388901011910013116128111200771441247156141127011611300722038101320000200103008130081300593005930081

Test 3: throughput

Code:

  stclrb w0, [x6]
  mov x7, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 10.2794

retire uop (01)cycle (02)03l2 tlb miss data (0b)0e0f18191e1f223a3f4346494f51schedule 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)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)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
302051113978330100019616110102123315128484725402251987520538101002000046484625024759117849991631028281033339818869550730100129111861020320005202064000910411351911102011009910010000100100000100200000270188551000100925529288891802127011171613016001054831222794662000010100104296104430105287105367101642
302041048687840000020793111103244201184779254143121657204491010020000433774348473110323491018881043251049781011937101251301007137481020320005202064000999302531111020110099100100001001000001002000002724198121000100111932924184700192701117161101600954332421444602000010100101491100619100850101690101175
3020410583578800000217991101041122811796192540037192202071510100200004152162465300207149927039642998590959358964653010097368910200200002020040000104293424111020110099100100001001000001002000002724202051000000100493156310522002601117221522522101969331993066200001010010392310453610311910145697935
30204988957380000020990011101341011108578125405252081820646101002000047385385018525118949966611008131010069699669932930100109694310200200002020040000993355081110201100991001000010010000010020000002319664100010010226295919258102701117170016001015271619072106200001010010477810455210538210402996886
30204102841766000001847911010331941088218025401972037020604101002000044186974912390112349100937104587103080977327100126301007967901020320005202064000910253338411102011009910010000100100000100200000025194641000000102983355195261027011173118016001030421321035662000010100105711105209104191102838106020
3020410517978300000192301101036931111184491254171820855200541010020000443692348537681216491006981032671032169780961014913010013838761020320005202064000910454533811102011009910010000100100000100200000272118304100018401089031186104111230011171717016001018932519094062000010100101599101855101744101615101769
3020410427878700000210251001046762111188262254144020518207141010020000429302748862171169491004521044431042159983261003303010068710751020320005202064000910005452311102011009910010000100100000100200000272419678100019409771284999918100011171612016001017311120076602000010100100165101232997089846398927
302041028177710000019954010965550101084517254016319833205651010020000444184048862991212499717610100910137397694793937301001704125610203200052020640009984624791110201100991001000010010000010020000002519132100010011082299078708122270111717001600105732312052210020000101001018311017991016239935094702
302049594472200100207551101031084150854702540734220392049610100200004975633516192701264910255210323310048295462810001030100776896102032000520206400091001475251110201100991001000010010000010020000027211946410001109096742978188191192701117181401600102356161933706200001010010067310130010046110068497636
302041000457450000019173111102175310128611025408492053920273101002000045411344936797069499842010297410287798398610148830100842104610203200052020640009103280510111020110099100100001001000001002000000222128410001124010765310691022910270111717130160010049251973560200001010099707993429912599634102623

1000 unrolls and 10 iterations

Result (median cycles for code): 11.1728

retire uop (01)cycle (02)03090e0f1e1f2223243a3f4346494f51schedule 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)cdcfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
30025112086838100235451000011163520139185411546986252972019210010202855517343531683419904910875101118521117281074051310788630010192110020200002002040000111677522111002110927487101000010100000102000002727238801000175012683328211475612627006401731643111143222970662000010010111736111688111583111861111762
30024111047832000243090100011193120159185925443112418820005102152000054752685332109112304910877701118511118451072923107796300102426100202000020020400001116103671110021109265171010000101000001020000027282459610001130014652335821363612327006401741643111113225354662000010010111793111796111684111569111630
30024111746837001240931100011162331414919762546778259272004310010200005501944533361711124491086340111560111568107242310797830010101110020200002002040000111711340111002110929694101000010100000102000002726221311000185013722341671207312627006401641634111424126689662000010010111586111381111642111622111739
3002411169683601023851110001117723141491695254429622868200051001020000549637353378090107849108823011158611189910743931079923001017141002020000200204000011175635711100211092759510100001010000010200000272920160100018201019031282146991240006401731644111150324230062000010010111538111476111701111493111814
300241115808370002423611000111597314149175125428432380520004100102000055116435316558095949108641011162911160210745231072753001014191002020000200204000011167140811100211092987510100001010000010200000272822294100018701479831905134501250006401731544111302326073662000010010111736111570111532111765111814
30024111647837000248891000011155121615915332545254255382005410010200005399054531035511002491083780111796111604107543310797730010132210020200002002040000112045471111002110926298101000010100000102000002729231141000045015463338891260202127006401541644111196123289662000010010111781111635111807111777111904
300241116128360002276210000111895001591742254501526363200011001020000552325153312370419491054820111521111692107404310785030010333210020200002002040000111756549111002110924155101000010100000102000002728234901000150013592365531575412627016402141644111180226517062000010010111915111897110947111172111030
3002411178983900025306101001118270151491564254388523408200011001020000551741553349660101449108511011179311176210747931079253001015241002020000200204000011182148211100211092704810100001010000010200000270247261000136014681331241337712627006402131643111432323515662000010010111757111813111641111880111708
30024111730838000245661010011159031414919342547400278942008910010200005479563532047711172491085350111749111612107203310797330010232910020200002002040000111421485111002110928115101000010100000102000002729245541000179015892336201218412227006402241544111602222866662000010010111433111395111523111442111728
300241118598360002355910000111675414159170425443632441820019100102000054841675323510097049108423011168311148610727131077763001033231002020000200204000011140451511100211092789710100001010000110200000272723367100017001499933853141601027006401841744111369224330662000010010111868111699111707111558111736