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

STXRB

Test 1: uops

Code:

  stxrb w0, w1, [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): 1.000

Issues: 2.974

Integer unit issues: 0.000

Load/store unit issues: 2.973

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f223a3f51schedule uop (52)schedule ldst uop (55)dispatch ldst uop (58)simd uops in schedulers (5a)5f606164696a6d6emap rewind (75)map stall (76)dispatch uop (78)map ldst uop (7d)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst int store (96)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)a9acafatomic or exclusive fail (b4)bcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? ldst retires (ed)f5f6f7f8fd
710054545134021313000211197945385304542964295129821489022101000494232745398454044834108402948297059244540545379100117100110001000296622962229730232979100011000112217159555116208801434413225744458871131174531620430202661853610004539945405454034540645386
710044539934011313100211192845375304912974295629781486522261000494231145385454004886108752969296159604540245395100117100110001000296122963029480132972100011000112221459265101209901144390227544488911171124530520426202841850810004540045410454094539145393
710044540334001313103211196345381305072972295629801481522261000494231445401453984864108722971298759584539845405100117100110001000294722976229560232965100011000112215560175112209401004302227144438911201194531320388202791850510004540345405454024540845404
710044539433901313000211194645385305332981297229871493022261000494232545408453924872108932976297859424540545404100117100110001000294232971029760232973100011000122218260375093208101154178219644398851281264532320393202941849710004539945384453984539645396
710044540034001313100211195345391304662976296629841486632261000494230545407453884869108662983297759204540845412100117100110001000297122948129640062977100011000122218059895094207901124242227744428931141144532620399202721850210004538745398453964539745390
710044540234001313100211200245379305182977297729701481512261000494231345392454074841108892952296959584539445409100117100110001000294822967129750232963100011000122216759905107208101124389227444418941151144533520409202701846210004539745387453934539145394
710044538534011313100211198245367305302949295929501486612261000494232345389453894865108772962296859524539245386100117100110001000296832952229610232965100011000112224160475130208901184437229244418851111164532020412202541849310004538745392453924539345394
710044538134001303000211198445379305252984297029841488522261000494231645399453884854108922976298259364542745400100117100110001000298332960229730232957100011000122217660395113209901104370227544448861161164534120378202791849210004540345389453984539045395
710044541334001313100211194545361304802983298729631479102261000494231645396453894863108922979297659364539145393100117100110001000296422967129710132969100011000122215859545084210601124400227644448881191164530120398202861850710004540145399453984539445406
710044538334001313100211199845371304802981296229751476652261000494231245399453984842108852973297159484538945399100117100110001000297822949229690232969100011000122217959515080207901054263227144438901211174532620386202731845810004539945404453994540645402

Test 2: throughput

Code:

  stxrb w0, w1, [x6]
  add x6, x6, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 38.9249

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)1e1f2022293a3e3f404f51schedule 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)606467696a6b6d6emap 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 store (96)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)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafatomic or exclusive fail (b4)bcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
20206389233291600000319998042001160389198570694835585002989242595767887756975291274466011716932010000144938604703892503892528346759080181168148626079447377860479447315572083891273891271000112020110099100100001010010000100229649129174006229662006402000722965610000713761202094601561097835593892002914311000010100389137389136389282389259389128
2020438912629141001011999801381076038911331069279558500298924259576788773697486127445871171689501000004938617203891283892528352959088181295148625979449877877279450015573303892503891271000112020110099100100001010010000100229704162328900622965200001999822972210000012640002094601561097854653890682914251000010100389127389129389253389251389251
202043892502916000000199980000540389112006928055850029892425957678877369748612744602117169330100000493860460389252389252835725908818118014862847946267785467944971557330389127389127100011202011009910010000101001000010022964803873600022964800101962000122965610000017600002094601611097854603890672914231000010100389128389128389253389165389258
202043891342916101101200300800647403892351206927955850029893025957678877369748612744667117168950100000493861720389252389129835285920218116814862837944967786647945001557544389126389127100011202011009910010000101001000010022972702402370932296482095802000122973710000013120002094551611097060603890672914231000010100389253389253389253389129389128
202043891272915000000200070150066038911200692805585002989242595817887726974861274455111717639010000049386047038925038925283529592061813021486282794473778665794471155720038912738925010001120201100991001000010100100001002297742284484055229685700001999822965610000723681102094582611091953443892082914311000010100389207389259389129389128389129
2020438912829150000002000902100540389235706940455850029892425957678879669748612744703117169730100000493861720389128389252834685907918117014862577944977786637944731557208389128389126100011202011009910010000101001000010022964802844220076229673301602000122964810000014720002094581611097659653890672914251000010100389253389128389129389128389129
2020438925029150000001999800208603892373606940455850029893825957678879769748612744605117178570100000493860460389126389126834645908018129514862607944717786047944731557330389127389127100011202011009910010000101001000010022964803211600022964866092802000122973610000710881102094601561097659653890682914231000010100389129389251389253389253389251
202043891262916002000200130000790389237006940255850029892425957678879869748612744644117177020100000493861720389127389127834685921018117814862827944997787037945001557208389249389127100011202011009910010000101001000010022964803138600122964800001999822964810000011520132094591611097654423890672914231000010100389128389128389253389253389128
2020438925229160001001999878000510389111006940155850029892425957678877469753612744667117169210100000493861720389252389252835285920418118014862837945067786657944731557200389127389127100011202011009910010000101001000010022964803506100022964800001999822964810000014080002094601611097854653891922914251000010100389127389128389251389253389253
202043891282915000000199980010500389245006940255850029892425957678877169748612744601117169211100000493860470389250389250835275920418129314862577944737786647944741557208389249389127100011202011009910010000101001000010022964904020600122964802001999822964810000014080202094592611097855683891892914231000010100389128389127389253389128389251

1000 unrolls and 10 iterations

Result (median cycles for code): 38.9947

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f20222324293a3e3f404f51schedule 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)606467696a6b6d6emap 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 store (96)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)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafatomic or exclusive fail (b4)bcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
200263899542921110000200040126100072038993361070099550200290544259664760240697566126893691176475901000004938686903899363899487081159888188846145781076081475915976081115183383899373899471000112002110910100001001010000102298440306566012022972830120114199982298481000001504000201009351097432343900172897931000010010389948389937389949389949389937
20024389947292100000020057176140100801038993248070088550200290544259656760244697566126894191176477301000004938685703899363899497081759888188845145781076081275916676081215183203899363899361000112002110910100001001010000102297280365460002297300010994199982297811000001760000200995341097732343898882897931000010010389948389948389948389949389937
20024389947292100000020004070000003899330070088550200290544259671760246697566126893731176476101000004938685603899373899487085659890188862145781076080975916876081015183183899363899471000112002110910100001001010000102297280343370002297280000199982297301000001440000200995341097432343898842898011000010010389937389948389948389949389937
200243899472920000000199980200006703899285307008855020029054425965676024469762012689346117647730100000493868670389936389948708115988918886714578117608157591667609071518370389956441000112002110910100001001010000102297438343440002297430000200052297361000071248110201011341097032343898762897931000010010389937389950389939389938389937
20024389947292001000019998000000003899330070089550200290558259656760248697566126893921176465901000004938686903899363899487080959901188862145780676098775916376081415183383899493899481000112002110910100001001010000102297280284470002297280000199982297281000001824000201006341097432343898762897931000010010389992389948389948389937389937
20024389947292100000019998036000000389921007008855020029054425965876024269758012689392117646850100000493868680389947389947708095989918884814578087608227591757608191518348389946441000112002110910100001001010000102298439328730011422974311123106200082297561000071536120200996341097233353898952898031000010010389958389947389945389956389945
20024389955292111110020654020000403899326070100550200290544259656760240697566126893601176477301000004938685803899473899387080959901188858145780876082475916976082415184783899473899361000112002110910100001001010000102297320313930042297280020199982297601000001808000201016341097732773898762897931000010010389948389948389948389939389948
200243899362921000000199980000004803899213707008955021429054425965676024069756612689417117647610100000493868680389948389947708095989018896014578057608157593277608141518732390234669671000512002110910100001001010000102297280313930002297283000200072297281000001600000201003341097732343898962898011000010010389957389945389958390021389938
20024389992292100000019998000003218038992984700885502162905522596647602506975741268976211765035010000049386867038993639000870809599001888451457805760816759174760818151838239017744100011200211091010000100101000010229745832138170662297414000199982297281000001552000201003341097232343898842898011000010010389945389956389945389957389956
200243899442921100000199980000072003899210070100550200290544259656760239697566126893461176471211000004938685603899363899367081459906188845145781176081975917676082415183363899564410001120021109101000010010100001022986673544970127229743650122116200272298581000071296110201007341097432343898842897931000010010389949389937389937389937389949

Test 3: throughput

Code:

  stxrb w0, w1, [x6]
  mov x7, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 38.0107

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)181e1f22233a3f4f51schedule 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)6064696a6b6d6emap 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 store (96)inst int alu (97)inst ldst (9b)9fl1d tlb access (a0)l1d cache miss st (a2)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)acafatomic or exclusive fail (b4)l1d cache miss st nonspec (c0)c2cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
10205380101284780080019998000238009607048352929010697518575106979157365437010461833110000493770270380107380107130437599712489799265951909993844119099187687838010738010710001110201100991001000010010000100458866458866004588660199984588661000010000010172656114111072141145380062119710000100380108380108380108380108380108
1020438010728473008001999801018538009207027152927110696518575106969157365439110461792110000493770270380107380107130437599602489859264331910093843919099187688238010838010910001110201100991001000010010000100458866458866004588660199984588661000010000010172704114711071139146380040119710000100380109380108380108380108380108
1020438010728476007001999801018538009207027152927210696518575106979157365437910461833110000493770270380108380107130437599572489799264321909993844119099187740838010738010810001110201100991001000010010000100458866458866004588660199984588661000010000410172668114211059141145380043119610000100380109380108380108380111380108
1020438010828472007001999801018438009207027152927210696518575106979157365438410461797110000493770290380108380109130437599472489799265161909993843919100187687838010738010710001110201100991001000010010000100458866458866004588660199984588661000010000010172668114711072145146380040119710000100380108380108380399380108380108
1020438010728482007001999800018538009207027252927210697518575106979157365438410461792110000493770270380107380109130437599552489859264321910093843919099187688238010738010910001110201100991001000010010000100458866458866004588660199984588701000010000010172664114611059146142380042119610000100380370380109380108380108380108
1020438041128478006002008500018538009207044652928510696518575106969157365438410462183110000493739750380110380107130440599572489859264321909993843919100187687838010738010710001110201100991001000010010000100458866458866004588660199984588661000010000010172664114611072146146380040119610000100380108380108380108380108380108
1020438010728477006001999800018538016407027152927510696518575106979157365437910461792110000493770270380107380107130437599552489829264321910093843919100187687838010738010710001110201100991001000010010000100458866458866024588660199984588661000010000010172666114111072147147380041119610000100380108380108380110380108380108
10204380107284720050019998000183380361497027152927710703518575106969157385437910462974110000493770270380107380107130437599512489799264321909993844119099187687838010738010710001110201100991001000010010000100458866458866004588660199984588741000010000010172667114711064136150380040119710000100380110380108380110380108380108
1020438049728498008041999800018338009207027152927110697518575106969157365437910461792110000493770270380107380107130437599472489799266061910093843919099187688238010738010710001110201100991001000010010000100458866458866004590150200024588661000010000010172668114711196145146380040119610000100380108380108380108380108380108
1020438010728472007001999800018538038107044752927510697518575106969157365437910461792110000493770270380107380109130437599552489819264321910093843919099187688238010738010710001110201100991001000010010000100458866458866004588660200104588661000010000010172668114711070146141380040119610000100380108380108380108380108380108

1000 unrolls and 10 iterations

Result (median cycles for code): 38.0011

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f22233a3f4f51schedule 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)6064696a6b6d6emap 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 store (96)inst int alu (97)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)a9acafatomic or exclusive fail (b4)bcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
1002538001128470000001999801003799960702675197321067518665106791580554241047037901000049376931038001138003413834859939249327917028191095389819101907784380020380011100021100211091010000101000010458956045895600458956002001945895610000010000000169648431106442433799871171000010380012380012380012380012380013
1002438001128460000001999800003799960702675197321067518665106791589654231047048601000049376931038001138001113834859955249343916872191095389219101907784380011380011100011100211091010000101000010458956045895600458956001999845895510000010000000169726421108042433799441171000010380013380012380085380179380012
1002438016628490010562001000003799960702675197321067518665106791580554241047039401000049377145038033738053413837659983249600916878191095389219101907784380011380011100011100211091010000101000010458956045895600458956102000245895610000010000000169646441108043423799451171000010380012380014380012380012380012
1002438001128460000001999800003799960702675197321067518665106791580554241047039901000049376931038003538001113834759939249331916969191095389119101907782380033380011100011100211091010000101000010459264045935502459259042906945895610000010000000169646441108042423799441171000010380012380012380012380012380012
1002438005128470000001999801003799960702675197321067518665106791580554241047039411000049376931038001138001113834859955249327916872191095389219101907782380011380011100011100221091010000101000010458956045895600458956001999845895610000010000000169648421108042423799441171000010380012380012380012380012380012
1002438001128460000002001300003799960702675197321067518665106791580554241047039411000049376931038001138001213834859940249330916872191095389119101907782380011380011100011100211091010000101000010458958045895600458956002000545895610000010000000169646431108042423799451171000010380012380012380012380012380012
1002438001128460000001999800003799960702675197311067518665106791580554241047039411000049376931038001138001113834859940249325916872191095389219101907784380011380011100011100211091010000101000010458956045895600458955001999845895610000010000000169648411107941413799441171000010380012380012380012380013380012
1002438001128460000001999800003799977702675197321067518665106791580554241047039401000049376931038001138001213834859939249329916872191095389119101907782380011380011100011100211091010000101000010458956045901700458956302001645895610000010000000169646421107742433799441171000010380014380012380012380012380012
1002438001128460000001999800003799960702675197441067518665106791580554241047057801000049376931038001138001113838459943249327916872191095389219101907784380011380011100011100211091010000101000010458955045895600458956001999845895610000010000000169648431108042423799441171000010380012380012380014380012380012
1002438001128460000001999801003799960702675197321067518665106791580554241047037911000049376931038001138001313834859942249333916872191095389119101907784380012380054100011100211091010000101000010458956045895600458956001999845895610000010000003169648421108042423799441171000010380012380012380012380012380014