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

CASAL (32-bit)

Test 1: uops

Code:

  casal 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): 4.001

Issues: 3.006

Integer unit issues: 0.000

Load/store unit issues: 3.006

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)0e0f18191e1f22243a3f464951schedule uop (52)schedule ldst uop (55)dispatch ldst uop (58)simd uops in schedulers (5a)5f606163696a6d6emap 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 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)a9acafatomic or exclusive succ (b3)atomic or exclusive fail (b4)bbbcl1d 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)e0eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
740073305024901900190110010092005680326791120789300630093006229955001492996232606329279263006100230061003601232896262621710011000100013011543101120081212301399915012001576811890382643872953226153987444413464432512173961506215356300010013301132737329223279632806
740053313024602000150000010080105833329420120878300630093006229495001492972832658328349293009100330061003601832933263921710011000100013006042100920060053010999160020015988112902839137681150225813965444012556632487163131508514922300010013287832773330653281432889
740053264324602500240000010390105915328090020739300630033006230163001492968932530329858293006100330061002601832775263821710011000100003009042101120060093013999170120015960118493829339491052225163865444021434532431167511497515643300010013318932804327863276532754
74005328602490160017000001009000594333012002073330063009300623034600149299773269132867827300910033009100260183283526182171001100010000300604210052004007301699916010001554011530383033976745229093897444418464332389164991455315121300010013289432792328073309432937
740053275824702300170000010110105966329090020764300630063006229053001492968032673326858263006100130061003601233082262621710011000100003009042101020060093010999180120016000118945820838331148225203925444417474632534172391501315297300010013311332719327763330432926
7400532842248016001400000100801059163282800209163006300930062305940014929739326303312582830091003300610036012330542620217100110001000030060421009200600430189991501200161241198178290394474322637397244369433932365172251482415393300010013278232817328573293032987
74005328302470170016000001011010599533023002098830093009300623109400149295333267232898728300610033006100360123265226182171001100010000300604210102004007301599915012001585812016384374098846224393864443713494832344163481452814990300010013292633062329563281132635
7400532891248017001700000101300061283282401206293006300630062311211001492977632623330458273009100230061002601232695259221710011000100003013463100920060011301799916212311622211729684174024444227843934443414534532443166691509515702300010013271133060330473276332700
7400532770245014001700000100600057243271310207343009300930062301611001492954432786329278293009100330061003601232797261821710011000100003009042100620060083011999140020016587122443830538931240223714072443713464032337163831510115336300010013292333108326573279732855
74005325952450200022000001008010598932619002061630063006300922977900149298013287032567825300610023006100360123268926582171001100010000300604010112006007301199917012001595411628384363855745224474061444419463832328162181431915529300010013269333133326793301833188

Test 2: throughput

Code:

  casal w0, w1, [x6]
  add x6, x6, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 7.0067

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f2022293a3e3f4043464951schedule 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)60696a6d6emap 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)a9aaabacafatomic or exclusive succ (b3)atomic or exclusive fail (b4)b6bbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2c3branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
5021070081525222200005540242131562172700541851494733401031010030003101013000650515251670149669907006070069660044401072020330006202036001270068350112020110099100100001010010000010030204821018010196200561822707215330225999821541011329063011113160160070041100001010030000201007007170067700707007170067
5020470065525202000005549121731104592700562236344932401031010030003101013000650515251710049669887005870072660041401072020330006202036001270067350112020110099100100001010010000010030201825719710273200451620802211830243999821642211619465411113160160070038100001010030000201007006870070700717007270289
502047007152421000000535324221101156708981715434132401031010030003101013000650515251844149669887006170067660047401072020330006203176001270068350112020110099100100001010010000010030213822717710248200601523501613130277999821631413126860011113160160070039100001010030000201007006670071700697007070072
5020470069525222200005450212211128368700501633413832401031010030003101013000650515251573049669877006370901660045401072020330006202036001270072350112020110099100100001010010000010030220624521310241200601620801614930225999821591211626860111113160160070038100001010030000201007006770066700677006670070
5020470068525220210005566131901112336700551985403732401031010030003101013000650515251749049669907006070067660046401072020330006202036001270070350112020110099100100001010010000010030228820218710324200491426303014630310999821691412718460411113160160070038100001010030000201007007070067700677007170072
50204700675252222000053033022711201108700531935364432401031010030003101153000650515251992049669887006470069660043401072020330006202036001270284350112020110099100100001010010000010030312832217410226200802019702214530364999821643215221662111113160160070245100291010030000201007048270069704917007070071
5020470071524202200005510282111482128700521871364033401031010030003101013000650515251479049669887006170066660043401072020330174202036001270070350112020110099100100001010010000110030275830217410279200931925101814630404999821612011825060111113160160070040100001010030000201007007070069700687006870071
50204700655242002100055823020111601727090320434041324010310100300031010130006505152519260496698670060700736600454010720203300062020360012700693501120201100991001000010100100000100302606202215102362013121181017415730394999821533213333062111113550160070038100001010030000201007006970070700677006670072
5020470066525222000005589241601831527005921023135324010310100300031010130006505152519920496698670060700676600424010720203300062020360012700663501120201100991001000010100100000100302271520915110277200402024808213730219999821652410923460511113170160070038100001010030000201007006770081700697007270067
50204709145252202000053742219111611287172515533541324015910128300031010130006505152516170496698970061700656600464010720203300062020360012700703501120201100991001000010100100000100302736251171102952008722175062136303259998215124121246612211113170160070040100001010030000201007007270070700667007070068

1000 unrolls and 10 iterations

Result (median cycles for code): 7.0066

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f1e1f20222324293a3e3f4043464951schedule 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)60696a6b6d6emap 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)9d9e9fl1d 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)a9abacafatomic or exclusive succ (b3)atomic or exclusive fail (b4)b6bbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2c3branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
5003070066525000000540726207100184148700461972304030400101001030000100103000050063251277149669830700497006636004540010200203000020020600007006434611200211091010000100101000000103013102142031020020080152223280302489998207630991560010127021744700311000066030000200107006570064700667006770063
5002470065525000000525522235100401567004820623836274001010010300001001030000500632512730496698407005470062360049400102002030000200206000070063346112002110910100001001010000001030189013219510198200611316538167303099998204932982680050127041744700291000066030000200107006470067700657006270066
50024700615240000105416321651000112070049197131403040010100103000010010300005006325156714966985070051700643600454001020020300002002060000700623461120021109101000010010100000010302470241195102402005420161202563027799982077341201820030127041744700261000066030000200107006470065700627006470062
500247006852400000052472716910040112470047123628243040010100103000010010300005006325177404966985070051700613600454001020020300002002060000700643461120021109101000010010100000010302770231154102582007128198721963027199982076581001760600127041724700281000066030000200107006270067700677006270065
500247006152500001052744018910096118470048151265263040010100103000010010300005006325160204966976070051700653600464001020020300002002060000700643461120021109101000010010100000010301510244171102512008314159221773028599982053321071620000127041742700271000066030000200107006270066700627006570063
50024700635240000105331361821003212870047179243413040010100103000010010300005006325180204966984070052700663600464001020020300002002060000700633461120021109101000010010100000010301860193151102612010416207641853036799982067321152200010127021724700281000066030000200107006470065700657006670063
5002470062525000000529052193100011647004618823235304001010010300001001030000500632515910496698307005370063360046400662002030000200206000070063346112002110910100001001010000001030184020917210249200861819354154303269998205724842360000127021744700281000060030000200107006670068700647006870067
5002470064524000000532130278100011167005016623445304001010010300001001030000500632517630496698207005270067360047400102002030000200206000070064346112002110910100001001010000001030198018317310260200571623316174302549998207034991940000127041744700291000066030000200107006870065700687006470064
5002470064525000000521345157100152207005013432533264001010010300001001030000500632515590496698407005570064360048400102002030000200206000070064346112002110910100001001010000001030167028518710266200812121814144302869998207244852380040127021763700221000066030000200107006570067700647006470066
50024700625250000005301381611000117270101213634303040010100103000010010300005006325155104966985070052700653600454001020020300002002060000700673461120021109101000010010100000010301770247168102482007411232182163029999982073421572680030127041744700301000066030000200107006870063700657006870067

Test 3: throughput

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 21.1410

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)0e0f18191e22233a3f43464951schedule 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)6063696a6b6d6emap 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 cache miss st (a2)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafatomic or exclusive succ (b3)atomic or exclusive fail (b4)bbl1d 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)e0eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
4021021007815841100002402600021140645534301421003004210030042500285884401492083420210089211410132000423014200102143004210214600842100891506211020110099100100001001000001003004201724029200280014019440609999114019120111727741511711209899101023000010101211423210079211413210079211410
402052114101574110000240311002114084063430142100300421003004250028766680149208341021008921077113200053301421010214300421021460084210076151721102011009910010000100100000100300420024032200280014107440619999114020020111727741011711209888101003000010101211424210077211422210066211455
40206211421157411100024030100210063466343014210030042100300425002876831014920834102100892114211320138630142101021430042102146008421008915162110201100991001000010010000010030081281724035200280014024440669999114021000111727741011711209899101023000010101211424210077211411210079210090
40205211410157411000024026000211406466343014210030042100300425002876649014920833102100652114121320138730142101021430042102146008421142115082110201100991001000010010000010030042281724032200280181402244060999911402412011172774121171121122001023000010101210090211409210090211424210079
402052114221573110000240261002113840603430142100300421003004250028588410149207009021141121009013200042301421010214300421021460084210089150721102011009910010000100100000100300422817240362002811101401544060999911401600011172774081171121120401023000010101210079211411210090211411210090
4020521142315741100002402401021140840634301421003004210030042500285884111492070090211422210089132000293014210102143004210228600842114121508211020110099100100001001000001003004228172403020054501402144059999911402312011172774141171121123101023000010101210066211411210090211424211467
4020521008915831100002401401021140746634301421003004210030042500287666301492083430210089211423132000423014210102143004210214600842100811505311020110099100100001001000001003004201724026200280014021440619999114018120111727742111711209888101023000010101211424210077211423210090211450
4020521007815831100002402901021006346634301421003004210030042500285884011982083580210078211421132013863014210102143004210214600842100891516211020110099100100001001000001003004228024032200280014026440539999114016120111727741311711211217101023000010101210090211424210090211410210090
402052114211573110000240260102113844663430184100300421003004250028764831149206998021141221084213201385301421010214300421021460084211412150821102011009910010000100100000100300422817240342002888414022440609999114018120111727741511711209899101023000010101210090211424210090211411211475
4020521007815831110002403401021139740634301841003004210030042500287682701492083190210078211412132013873014210102143004210214600842100791505211020110099100100001001000001003004228172403220028158014020440619999114018020111727740911711211229101023000010101210066211413210090211424210090

1000 unrolls and 10 iterations

Result (median cycles for code): 21.1397

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)0e0f1e1f22233a3f43464951schedule 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)6063696a6d6emap 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)a9acafatomic or exclusive succ (b3)atomic or exclusive fail (b4)bbbcl1d cache miss ld nonspec (bf)l1d cache miss st nonspec (c0)branch cond mispred nonspec (c5)cdcfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
400282114171573000000024024110121007327634300491030039103003950285876701492069972114082100741020005330049101003330039100336007821007615052110021109101000010100001103003902815240302002700140234405799991140171121065374124183320985106603000010011210076211423210086211421210089
40025210079158400000012402900012100732003430049103003910300395028586550149208330210085211419102013763004900100333003910033600782114111484211002110910100001010000010300390280240262002600140154405699991140100020065174143183320986506603000010011210077211410210075211408210089
40025210076158300000002403701012113842603430049103003910300395028767510149207008210077211411102013763004910100333003910033600782114221495211002110910100001010000010300390015240302002610140214405799991140170000065174163184420985400603000010011211418210089211411210089211421
4002521139915730000000240280000210073206343004910300391030039502876757114920834421007421142010201376300491010033300391003360078211410150421100211091010000101000001030039000240302002710140274405299991140160120065174123183320985700603000010011211409210089211409210086211426
400252114101573100100024027010121005026634300491030039103003950285863601492069972114092100651020004430049101003330039100336007821139914932110021109101000010100000103003902814240262002600140294405799991140190020065174073183321119719613000010011210106211413210079211411210066
40025210077158400000002403301002113950803430049103008110301235028616890149207005211422210076102002673004910100333003910033600782102971503211002110910100001010000110300390013240312002600140234405199991140200000065174114183321118500003000010011211409210861210067211403210077
400252100881584000000024014000021006226034300491030084103003950287662701492070082114082100851020004230049101003330039100336007821007415042110021109101000010100000103003902814240322002600140264405199991140140100065174163183320984209603000010011210078211412210089211420210066
4002521007415830000000240271001211393287343004910300391030039502858808014920699421140921006510200056300491010033300391003360078210088151221100211091010000101000011030039000240312002700140214405999991140130120065174143183321118506603000010011210089211409210087211420210089
40025210085158400000002402900002113842773430049103003910300395028584820149206996211407210076102000423004910100333008410033600782114101495211002110910100001010000010300390013240312002720140314405999991140120120065174133183320985400603000010011211423210077211412210089211423
400252114101573000001124030010021007327734300491030039103003950287661301492083392100762114101020139030049101003330039100336007821140615042110021109101000010100000103003902715240282002704140234406399991140150120065174123183321117209003000010011210086211419210075211411210077