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 (64-bit)

Test 1: uops

Code:

  stclr x0, [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)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f1e1f2223243a3f464951schedule 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)5f696a6b6d6emap 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)9dl1d 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
7300533072249610111110021000583732968002112130041004200010002000109651687304929941032879329933103000010002000200040003280026611171001100010000200342210031001014200231222015549115990824839752912305737704447226663325561004172951458615771200010003320933128327613302533132
7300433425251411001110051100599532909002121930041004200010002000109781687504929823032995332103103000010002000200040003286626361171001100010000200320210041001003200231222115652117430830339353712324138364447146766324701004164251533515205200010003325133142331073325933126
7300432998247511010010051000583032802002079230021004200010002000109291687204930033033082328933103000010002000200040003287426411171001100010000200320010021001004200231222116278110871822539454662302337414438125967325011004166091550415807200010003291132841332703289933086
7300433128248811010010051100594032942002123830041004200010002000109641687324929784032979328783103000010002000200040003300726451171001100010000200432010041001014200231202115826115680828339462712295738624440186869323981004172731538416289200010003298232781332903298033308
7300433081249511010010051100600032765002119430041004200010002000109231687404930014033160331383103000010002000200040003314626291171001100010000200422210031001013200231222116258115880842840133612330737144445127170324071005177381502915194200010003322233277332633350832863
7300432910246311000010051000598633029002093030051004200010002000109681683104930147032925328163103000010002000200040003324526461171001100010000200422010041001104200231022015779112060823338741642293639994440135962324141004177161534616378200010003282733043329753301633074
7300433149250211011110091000594733077002094530021002200010002000109781687804929803032859331253103000010002000200040003293526391171001100010001200332210041001014200131202115316115550829738713632303837794440126066324711004182451444615967200010003315233165329673275932866
73004332712461011000010051100581633029002080530041002200010002000109231687904929799032991330843103000110002000200040003311726441171001100010000200240010021001012200011122116046115690826640271592319836834441186873324931002178421443116156200010003276232825328333296832918
7300432832245711010010051000600432806002136930051002200010002000109761682604929558032963328713133000010002000200040003289426391171001100010000200442210031001004200231022215664117151838939623582289638534441146665323251004170521530515689200010003271732988331333273233166
7300433069248511010010021000599833233002076230041004200010002000109171687704929756032696328653103000010002000200040003289026531171001100010001200340210031001014200231222015848117921834439604642298338144448196463324141004167351481215230200010003270932741329503268432788

Test 2: throughput

Code:

  stclr x0, [x6]
  add x6, x6, 8

(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)181e1f2022293a3e3f404346494f51schedule 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)92inst branch cond (94)inst int load (95)inst int alu (97)inst ldst (9b)9fl1d 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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
402093007122510005975148161672991563005681956211232132432541296212822000020100200009172981412648130549269913007130071248123250294010020200200003020040000300717011202011009901001000010100100001002089941174103810875103112942873521321213132136737701101321310216113006821273101020000201003007230072300723007230072
402043007122511005891581817041061643005675678190240132872541331212502000020100200009171631412638132249269913006830071248143250294010020200200003020040000300716811202011009901001000010100100001002087231162105910996103423042867381275212962239327181053201310116113006821233101020000201003007230072300723007030072
402043007122511105909480116961241203005681572219236131742541247213062000020100200009171161412667131349269913006830071248143250294010020200200003020040000300716911202011009901001000010100100001002092231210110510966103112902879401268213032342047751065301310116113006821236101020000201003007230072300723007230072
402043007122511005858482517521241163005678264201236132342541261211302000020100200009170271412600137549269913006830071248163250314010020200200003020040000300717011202011009901001000010100100001002093731192110311028103302991915461281213492639036991032301310117113006821210101020000201003007230072300723007230070
402043007122510105812581316961101523005680067240254132312541277211942000020100200009170211412628037749269913006830071248143250284010020200200003020040000300717011202011009901001000010100100001002092831226103210945103192702873381368213612036127251048301310116113006821143101020000201003007230072300723007230072
402043007122511005906582017121221403005680270219253132002541276213132000020100200009168141412597132449269913007130071248133250294010020200200003020040000300716811202011009901001000010100100001002093361306106411009103182672867601298212521936437981088311310116113006821200101020000201003007230072300723007230072
40204300712251110585608511704121120300567875826920413254254125021260200002010020000916620141260903544926991300713007124816325031401002020020000302004000030071701120201100990100100001010010000100209010123910651098110311303191252129621375303580734920001310116113006821230101020000201003007230072300723007230072
4020430071226000059361843174410215230056803101235227132642541238214272010520100200009170541412662034149269913006830071248143250274010020200200003020040000300716911202011009901001000010100100001002088341221105710943103252993875441282213622743526751020321310116113006821253101020000201003007230072300723007230072
40204300712251000597518631696108144300567527116622013242254123121264200012010020000916932141263113424926991300713007124818325029401002020020000302004000030071701120201100990100100001010010000100209165115710801100710307321192548135821298293903752948301310116113006821278101020000201003007230072300723007230072
402043007122610005827482917041241603005679798182219132122541302212702000020100200009173861412586129949269913007130071248133250284010020200200003020040000300716911202011009901001000010100100001002087341237102710988103253011921401321212792238236721125301310117113006821171101020000201003007230072300723007230072

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0071

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f2022293a3e3f404346494f51schedule 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)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)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
40029300902252222100057251183717289910430056813201852001317325410892100420000200102000091596714126271329492699130068300712483803250514001000200202000030020400003007168112002110901010000100101000001020911131240109401092410320273189732127121215193550612920001329116113006821158101020000200103007030072300723007230072
400243007122500000100574968511776101144300568052722119313144254117521219200002001020000916222141336303194926991300693007124840032505040010002002020000300204000030071701120021109010100001001010000110208840128394801092710302311190340125521307193060716990001270116113006821056101020000200103007230072300723007230081
40024300802251110000059797827169689136300568112720121213237254115721071200002001020000916799141331703574927005300903009024854032506640010002002020000300204000030090711120021109010100001001010000010209040104296301095810328280189534117821258263120719918001270116123006820973101020000200103007230072300723007230072
400243007122500000000586678011688991563007580331209213131962541188210202000020010200009166381413094134149269913007130090248360325051400100020020200003002040000300716911200211090101000010010100000102091531208112101090110333303290554133221228253323732998321270116113006821077101020000200103007230072300723009130091
400243008022610000000600911857176085132300568122917422313205254128621172201052001020000915761141257803164926991300903009024837032505140010002002020000300204000030071701120021109010100001001010000010209515111410430109351032529639023211852120211338107991112311270116113006821074101020000200103007230072300723007230072
40024300712251101000059204854171210416430056792212391941316225410152113820000200102000091653614125380335492699130071300712484503250514001000200202000030020400003009071112002110901010000100101000001020904181173103201091310312278192234127321300163263728956011270116113006821065101020000200103007230072300723007230072
40024300712251001000057294822179299104300567932620521013156254110721117200002001020000915768141250203374926991300683007124835032505140010002002020000300204000030071681120021109010100001001010000010209411912101076010888103272751900341180211821531948141048001270116213008721188101020000200103008130086300763009130086
40024300712251010000057174828171212215230056789282001881315325410932105220000200102000091626314127160294492699130071300712483603250514001000200202000030020400003007170112002110901010000100101000001020924312971030010929103152531913681245212541738637021112301270115113006821220101020000200103007230072300723007230072
400243007122510010000564311827170411614430075791231652171317725411492107020002200102000091613714131040328492699130071300712483403250514001000200202000030020400003008566112002110901010000100101000001020909412791118010890103232920881401333212192433606661024001270116113008221207101020000200103007230072300723007230072
4002430071225000000005964084017528815230056754212251971320525410742105020000200102000091578414125810325492699130071300712483603250514001000200202000030020400003007169112002110901010000100101000001020902011511034010902103212851899801300212332529706851088001270116213006821081101020000200103007230072300723007230072

Test 3: throughput

Code:

  stclr x0, [x6]
  mov x7, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 10.3172

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)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)67696a6b6d6emap 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)branch 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
30205109773802110118793000097285411982998254266020801205501010020000442332448947931724910304101060981057349774169998730100844637102032000520206400091048683521110201100990100100001001000001002000031002012910000010651304999403123311117161121611980052719681062000010100102564103507104742106216104856
30204105463783110019668110010014620108077725409141911320903101002000041315114791556291491007540104293105339991397974393010088373810203200052020640009105494488111020110099010010000100100000100200000001964710000092663077510919025301117172311612104423181911110102000010100103195102621102893102519104020
3020410324876711001980410009864939118268369391871922820532101662000040217424678594177499295809618794984909547100880301009861059102032000520206400091049893521110201100990100100001001000001002000027001992210001097692937099971253111171725116111008771920044992000010100100793100016976009924099675
30204101159744110020319100110314401214819132540126195812022310100200004740414499506715849100683010212410248299439710083230100707866102542010520206404021041644262110201100990100100001001000011002006727260199291012701059830222961410011171724116111075106231270102000010100103982104595104569104495104861
3020410472378211002115410001004633111182874254078121818206871010020000428886348093151734999134010448410565799225610123230100648655102032000520206400091047714741110201100990100100001001000001002000030200196141000118944299359199126271117180116111048412620225002000010100103327104676105807104651102834
302041056717921100206831001101945012086300254124420782201401010020000453724149147741594997149010046899572959786986573010081180110203200052020640009101415413111020110099010010000100100001100200000210207901000001011929456101070163111171620116111050171220122062000010100103163101188101264102313103718
302041037817791100210061101982544121082755253929218950202111010020000470098650485712124910023501015381011379657389266030100185713521020320005202064000998275408111020110099010010000100100000100200003123019505100000950828906120741031111716231161110293061905310102000010100104253103988104798103875101353
30204104627789110020495140001045554010851342540680211812060610100200004713905490160216049102530010298610359197958698376301008069641020320005202064000910267254211102011009901001000010010000010020000300019477100001950631273101110263011171724116111017834213741002000010100102388102577103341103416105202
302041012467601100181991000101905397853142540001195842028210100200004570944496665318049100670010372110500010031171003173010083377710203200052020640009102527372111020110099010010000100100000100200002726023283100010937129629953912231111717011611982482520186662000010100103354103104103444103642101781
302041033367751100199501000103853290863872542330214172040910100200004764900502130513449100274010233010368910054979956530100689694102032000520206400091099765301110201100990100100001001000001002000030220201641000101393932743107181283111171627116111046241522951062000010100101528103210102857103995101361

1000 unrolls and 10 iterations

Result (median cycles for code): 11.1696

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 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)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)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)acafbbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)c2branch mispred nonspec (cb)cdcfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
300251116048381110000258701610411158001709192725457052471020081100102000054565825318218110654910851001117471116541072763107873300101817100202000020020400001117654531110021109298091010000101000011020000272922717100010138703406513277125270006402141622111357126075662000010010111702111753111513111545111576
300241114978350000000229011100111767315149144225438182314220001100102000055069755321480110514910871601115571113711069783107943300104217100202000020020400001116194731110021109286991010000101000001020000272822568100010119773236713596125270006591721522111341224853662000010010111584111582111626111700111590
300241119938380000000228441100111465015159196525465942482420007100102000055053285332027110584910881701118431117591076393107910300101019100202000020020400001117444281110021109281481010000101000001020000272823980100010153843669513383125270006402121522111410323298662000010010111673111506111728111710111672
30024111825838000010023020110011189031515905612540669205172000410010200005501215533099701058491085380111588111599107351310797730010814100202000020020400001114815011110021109280701010000101000001020000272725567100010142173497813044023270006401621622111423123820662000010010111623111594111724111651111580
3002411167583600000002269411001117222141591694254481624585200031001020000551073553322191938491086350111594111614107225310818930010302610020200002002040000111887522111002110924016101000010100000102000002922516100010147833427513100126270006401821622111505223569662000010010111831111594111892111804111654
30024111492837000000025209110011180231414917932545591248602004810010200005468334532179311090491084520111561111594107333310806430010814100202000020020400001117174551110021109270041010000101000001020000272923157100001139853404112701125270006402121522111307325759662000010010111583111813111875111736111788
30024111744836000000023067110011185831515919442544609249232000810010200005425196532036008664910877601117511118861075273107827300101418100202000020020400001115614991110021109242571010000101000001020000272822644100010122083282112546123270006402021622111330225066662000010010111744111535111685111700111950
3002411179683700000002180210001116332141491755254464123983200051001020000547268853171360100749108689011194611174510730831072263001000100202000020020400001111823631110021109261551010000101000001020000272823586100010133563362813597126270006401821622111110223717662000010010111047111063110935112046111059
300241116408400000000237671100111506015159179325445112548020073100102000054855075328372111784910856401116031115851074423107973300101431100202000020020402261116265221110021109266271010000101000001020000272824417100010128833441215518126270006401821622111376324602662000010010111782111917111902111935111631
30024111897837000110023707101011163401414914692543561254392001210010200005493484532881819694910888301119201115371075483107993300103326100202000020020400001114145221110021109284201010000101000001020000272922498100010148063365612166123270006401921622111436326411662000010010111710111690111859111878111965