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

STCLR (32-bit)

Test 1: uops

Code:

  stclr 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.003

Integer unit issues: 1.003

Load/store unit issues: 2.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk instruction (07)l2 tlb miss instruction (0a)0e0f1e1f223a3f464951schedule 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)acafbbl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)cfd0d1d2l1i 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
73005329402463310010001061323284800205963000100320001000200010909168705492952033108326953103000100020002000400032691264211710011000100002000021000100002200212216413123230842738140572267340544450175651323001003169361457415203200010003266832489326643273332773
73004328402450100010000160073292200207403004100420001000200010969168644492956732717328263103000100020002000400032800259711710011000100012000201002100002200322216480118760821638980492315537934439104657324801000176511473515445200010003261532804325953271432775
7300432533244111001000006033329980120550300410022000100020001098716886649296093275332749310300010002000200040003260825941171001100010001200020100310000020021221562811430085204056044227053897444554952322761000165171462815316200010003291432826329823254433381
73004326342461110010050057843287300209773004100220001000200010984168924492955032829327053103000100020002000400032584257811710011000100002000221002100005200332215767120710854137471462267440834446124246322761000172101429715534200010003280432620327083286832602
73004332792440100010080062573296600206173003100220001000200010912168942492965532572326083103000100020002000400032832257811710011000100002000201000100003200212216283114780851440500512291940344448124449323891004162731413915340200010003268732788325893284232615
73004327672441110010050159933278000206143003100420001000200010971168743492962532543325853103000100020002000400032769260511710011000100012000221002100000200222216505121560850039681492264639754443135454322661003165581440415271200010003267832995331863271433006
73004331742450110110000061473299600206833003100520001000200010911168924492960332718327653103000100020002000400032786261811710011000100002000021002100012200320216583121280845040270472299139544449145045323621002169351453915334200010003269733099327573269032669
73004327892450110010090161743298100207153000100320001000200010915168124492960532672327343103000100020002000400032608257811710011000100002000221000100002200222216561121300848840390442270740154449174751324001003169951460214878200010003259032583327323262132683
73004327482451110010040062243280800207863000100020001000200010911168758492966832857325443103000100020002000400032618261211710011000100012000221002100002200122016262120721837839731462287641444456184648322971000171541470915747200010003289732829327123272032658
73004331032452111110020058673273800205863003100320001000200010903168726492966632562327573103000100020002000400032653257511710011000100002000201002100005200012016648122960851540400432264741064445154847322931003168911487715303200010003284432620326603271132680

Test 2: throughput

Code:

  stclr w0, [x6]
  add x6, x6, 4

(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)1e1f202224293a3e3f404346494f51schedule 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)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)a9aaabacafb6bbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
40207300752251113708717410853963006517334717513008254064420849200002010020000913336141295112744926995300723007524819032502940100202002000030200400003007168112020110099100100001010010000010020233355230310301100391512391825620375515542486142201310116113006820580101020000201003007630076300723007630076
40204300752250003677219710054443006520928817612970254062420593200002010020000913527141274602904926991300713007124814032503340100202002000030200400003007569112020110099100100001010010000010020233054736710317100752102192425820339513722383870001310117113007120523101020000201003007230072300723007230072
402043007122500036811169108551203007025239504212921254064020686200002010020000913643141289002914926991300683007124819032502940100202002000030200400003007167112020110099100100001010010000010020221065528510314100351802472818320292513412555510001310116113007220629101020000201003007630076300723007630076
402043007122500037102217104054243006520338575312984254058020668200002010020000913563141300202864926995300723007524817032502940100202002000030200400003007168112020110099100100001010010000010020203055727610313100672102052420520326721102365510001310116113007220518101020000201003007230072300723007230072
402043007122500036792199108701043006521540678813005254068720688200002010020000913870141277902484926999300753007524820032502940100202002000030200400003007169112020110099100100001010010000010020249042830410257100322002338820020365513522136000001310116113006820857101020000201003007230072300723007230072
40204300662260003662220010054723006518736636513016254086120602200002010020000913645141287202734927004300753007524817032503340100202002000030200400003007564112020110099100100001010010000010020215062830110292100432002458223420339515511864680001310116113006820548101020000201003007630076300763007630076
4020430071225111372371921016056603006018346516312982254062520604200002010020000913365141278202784926991300683007124817032502940100202002000030200400003007169112020110099100100001010010000010020241457536110310100712002546023320387514542535343101310116113006820598101020000201003007630076300763007630076
402043007522510036504157100552203006518432835512957254066520664200002010020000913563141279412894926991300683007124822032502940100202002000030200400003007167112020110099100100001010010000010020194570330810300100701512155824720351414252035163101310116113007220511101020000201003007230072300723007230072
402043007122511036786185108571523006520531778312969254065620661200002010020000914002141281502764926991300713007124813032502940100202002000030200400003007564112020110099100100001010010000110020190394327610311100451902052624620371715852336723101310116113007220575101020000201003007230072300723007230072
402043007122511136477226100554830061186358162129512540693206142000020100200009132101412765127549269913007130071248130325029401002020020000302004000030075691120201100991001000010100100000100202084611298103151004320119730195204121116232124673101310116113006820579101020000201003007630076300763007630072

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0071

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)0f18191e1f202224293a3e3f404346494f51schedule 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 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)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
40027300752270000036611187101044720030065200206659129932540457205032000020010200009128441412953025049269913007130071248380325055400102002020000300204000030071681120021109010100001001010000010201975482600102361003817023046199203217174127056801270416223006820520101020000200103007230072300723007230072
4002430071225001003774218910144676030056187205463129832540549205272000020010200009130511412966125049269953007230071248410325130400102002020000300204000030071691120021109010100001001010000110201875783270102501003215014710420620198695219840701270215223006820547101020000200103007230072300723007230072
400243007122500000375011761007513230056203227678129832540547205052000020010200009129391412937026149269913006830071248360325052400102002020000300204000030075681120021109010100001001010000010201494483240102851003817016558197202608101116634301270216223006820532101020000200103007230072300723007230076
400243006922600000364621721006418030056179276542129712540590206232000020010200009126471412836027049269913006330071248390325051400102002020000300204000030075641120021109010100001001010000010201885442700102691003220017630120203034134221245401270216233006820622101020000200103007230076300763007230072
400243007522600000365712011008614430056247178568129842540545204932000020010200009132071412800026749269913006830071248380325051400102002020000300204000030071671120021109010100001001010000010202554012780102881005129018752190202765102215756601270216223006820547101020000200103007230068300763007630072
40024300712250000036622190100599230056149165273129542540522205212000020010200009127531412695125649269913007130071248370325055400102002020000300204000030071691120021109010100001001010000010201625752360103301005322021218221203155131121948701270216223006820869101020000200103007630076300773007630072
40024300752250000036102181100706430056167195752129542540503205022000020010200009134271412800125549269913006830071248340325051400102002020000300204000030071691120021109010100001001010000010201754873230102421003912016550170202985111222358301270216223006820507101020000200103007230072300723007230072
400243007122500000374021971007520030060200175456129712540472204002000020010200009131431412796127049269953007530075248380325051400102002020000300204000030071681120021109010100001001010000010201994462570102141003824019778158203254103214947101270216323006820513101020000200103007230072300723007230072
40024300752250000037172199100667230056188245759129942540606205872000020010200009133391412722125849269913007530198248410325051400102002020000300204000030071681120021109010100001001010000010202124292580102891004419021572187203568115121761401270216233006820557101020000200103007230072300723007230072
400243007122500000363521591007310430060200186363129632540636204452000020010200009129981412797127349269863007130071248370325051400102002020000300204000030075641120021109010100001001010000010202255622740102811006522018152158202813105118246301270216223006820588101020000200103007230072300723007630076

Test 3: throughput

Code:

  stclr w0, [x6]
  mov x7, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 10.2071

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f233a3f4346494f51schedule 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)a4ld 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)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
302051097868190000000200001510102445112128354525408401986420112101002000046909074969032012749980589883498126930656947633010015741113102032000520206400099864854111102011009910010000100100001100201514312901981810001002108130763924712628011171722016001032732220112101002000010100102858102831104022103239103960
3020410453777200000001855611099749081179543253856517815207401010020000403522346624531155499175895903959359386289545030100190515321020320005202064000910091336611102011009910010000100100000100200270313102209610019211082033142898210310111722022422996324120423131302000010100103392102594101754102551104216
3020410548579200100002141936610101694111118583825405222050320396101002000047802684968403117049100954102847103156101612610025230100718529102002000020200400001051105331110201100991001000010010000010020000031330197861000100103613000811133124310111716180160010098627212821010020000101009852998144968269680299544
302049697173200000001966511010561221216856172540533206772024110100200004570876495830601734997055101349100678978937950523010014961462102032000520206400099817249211102011009910010000100100000100200000310019896100010010786295509971123310111716210160010334816203941310020000101009836099117100381100201103020
3020410113476300000001835211010249311008410834400231995320789101002015741487224796931115349979951016291017149764169395230100163011001020320005202064000910315743611102011009910010000100100000100200000312601929910001001054430303911112131011171625016001041162320346101002000010100104032103170102574103307104042
30204101249762000000019230100102542010986868254261522670202191010020000453415648726001289499613598586977019389714977463010074199210203200052020640009103511654111020110099100100001001000001002000003128017940100010087572936189061243101117171801600951851320278101002000010100104243103406100941101477102490
3020410327477100000002024310110229411313866432543433223792056910100200004801753501393411014994338996639770594048610084530100590744102032000520206400091020436411110201100991001000010010000010020000031300197671000100110782923899891283101117170016001020253517897101002000010100100953102288102800103414101609
3020410234976910000001938911010532211315855402539804194802045210100200004334714484878312964999931103890103302998136100150301007088021020320005202064000910450759611102011009910010000100100000100200000312501989510000009496296151087512600111717230160010315572006410100200001010097767995789882498482101146
302041039937830000000175241001024382121384946253993219466206101010020000410382146660081176499956810328610403998509810053930100100211101020320005202064000996860439111020110099100100001001000001002000003100203991000000969229801112411031211172225224229985028175141010020000101009491594621939269527697865
3020498486719000000020640100102578006832272540197181312113010100200003437902443118011864995423102187101815963907982843010055985710200200002020040000104899500111020110099100100001001000001002000000330209941000100923929054105701031011172222225221048781018770101002000010100105371103259102102102205103734

1000 unrolls and 10 iterations

Result (median cycles for code): 11.1672

retire uop (01)cycle (02)0309l2 tlb miss data (0b)0e0f1e1f22233a3f4346494f51schedule 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 cache miss st (a2)l1d cache miss ld (a3)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)acafbbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)cfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
3002511181683910002289100001112654015916092545688273462007210010200005485751532067301072491087970111693111737107478310804430010353510020200002002040000111826388111002110930145101000010100000102000027002602210001015594348531412212406401631622111452324392662000010010111726111672111672111618111629
300241114638350000231051000111752315091810254604122981200141001020000548312053275391107149108691011169911168310733631076763001027241002020000200204000011184753011100211092342510100001010000010200002727023975100010145763430314332126276401821522111497423908662000010010111477111644111496111284111379
30024111506837000025652110011167800149183625474692741120067100102000054811015330728194249108675011179411168410745731080003001017181002020000200204000011163951611100211092434710100001010000010200002728024198100010133623474215823023276401821622111342324542602000010010111205111719111353111419111604
3002411169783800002295210001118073141491846254532825570200301001020000547378553166161103949108701011179611170110727531078943001011171002020000200204000011177772411100211092316610100001010000010200002727024882100010158123322812278023276401721622111253324341062000010010111609111791111724111884111681
3002411183283700002135901001118100140913042543126227822000510010200005486357531937019844910852401114971116511072883107923300101825100202000020020400001116384561110021109288981010000101000001020000270021567100000138953400615448022276402021622111503224974662000010010111782111778111663111604111769
30024111777835000023783110011173201514916282544152232262000310010200005475549531518611029491086320111839111616107349310786630010352510020200002002040000111518427111002110931483101000010100001102000027290223011000101313833300113691006403021622111127023593662000010010111859111512111597111409111239
3002411142083500002309210001115742131491998254548124342200371006420000545546753178771104349108370011141411159010717631082003001051310020200002002040000112115548111002110927655101000010100000102000002792399710001213037345321222212827640021622111439225667602000010010111793111677111532111407111651
300241116758360000244250000111514314149156725440952394520056100102000054836045326447111984910879401116191116601074483107863300103626100202000020020400001117134251110021109273821010000101000001020000272902383410097013591341881163712127640021622111455425755662000010010111593111717111397111487111666
30024111524837000025534010011155600159185925476112853820008100102000054437535313173111934910868601117741118671074143107986300102024100202000020020400001118107041110021109284881010000101000001020000270025051100010134293270514541030276402821622111060026195662000010010110978111125111172111046111050
30024111603838001022656110011179020159056125421242269820053100102000054783335326937110364910822601113401115341071563107806300108261002020107200204000011159552211100211092729910100001010000010200002729024846100011123093035812642022276401021622111184325640002000010010111471111666111785111624111736