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

Test 1: uops

Code:

  casal x0, x1, [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)03l1i tlb fill (04)mmu table walk instruction (07)09l2 tlb miss instruction (0a)0e0f1e223a3f43464951schedule 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 cache miss st (a2)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)acafatomic or exclusive succ (b3)atomic or exclusive fail (b4)bbl1d 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)e0eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
74007341132553100111009053703396110122012300630063009230515001493094333671340318253009100230091002601233963269621710011000100013006401008200607301699918101502610819580003647056237433542444012484732964189801644617601300010013411434055340583406034046
740053406625500000010100531133869111219583009300630062313290014931063336033399372630061002300910026012339622665217100110001000030064010072004011301799917101514810592380023592048237523584443211505332988188451648317711300010013395334163340153407034068
740053396425500000010110538833985110220763006300630092303811001493097433575340827263009100330061003601233894268221710011000100003006441010200618301199916021508810784280333578048238023552443315535232962187791633817521300010013399634014340363400634077
74005340292550000001007053003392210021941300630093006231257001983097233618340098253009100330061002601833945263621710011000100003009441010200609301299917001486910601380733585051237543574444012474432996190821638617657300010013402634037340223409934008
74005340752560000001011053933381310221913300930093006230043001493098633596340527253009100230091003601234085266721710011000100003009041010200408301799917121491510474380273556056237393529443015545233025188351639817460300010013405933944341033399634103
74005340832550100001011052543381611121912300630093006229773001493094433697339858253006100330091003601234012267721710011000100003006631010200408301799916021489210553479823607148239443647443715494933000189131666717381300010013405834064341193414434110
74005341232540000001010054153390410021977300630063006231309071493098633613340818263009100330061002601234002269621710011000100003006041011200609300899915121514011026379993609045237873583442712565632991189111658017658300010013408234093340703406634066
74005340662550000001009153823391410121936300630063006229588001493097533689340648253006100330031002601233964271421710011000100003006031009200609301299916121500510681280933579051238093581443713575033008190931656517443300010013402834147340673415234023
74005340852550000001010053093383210122094300630063006230395001493098333627340708253006100230061002601834007270121710011000100003009001008200608301699917121501210471379223596051237343582444010485132977190131628017506300010013397433973340973408534082
74005340392560000001010054533387010121957300630063009230855001493100433618341287253006100330061002600633973271421710011000100003006601008200408301299917121522110706579953569056237913629444215535233065188631638517337300010013409034028340673402334083

Test 2: throughput

Code:

  casal x0, x1, [x6]
  add x6, x6, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 7.0099

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f1e1f2022293a3e3f4043464951schedule 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)696a6d6emap 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 mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
502227011952510000071011517741744115148700898041071101563340100101003000010100300005051325671749670187008870098360081401002020030000202006000070105360112020110099100100001010010000010030889139178361099820370255869010213063137899982232514543983614741131011711700641000066430000201007010170101701097010270104
502047010352511100071751658101728431047008975611910814636401001010030000101003000050513256960496702270108700973600614010020200300002020060000700893541120201100991001000010100100000100310130936765110532030826889103411983138799982231412443888401200131011711700601000066430000201007009870096700947010070099
50204700955250000106992156844176011007007977511210615325401001010030000101003000050513255732496701470081701023600744010020200300002020060000700943541120201100991001000010100100000100308680823806110092032425400721239314069998223271344297180050131011711700641000066430000201007009770097700967009670099
5020470090525000000699414679616805711270079787121114149334010010100300001010030000505132566154967008701307010236007740100202003000020200600007009635411202011009910010000101001000001003095915884816109952037824688404811663136899982136114139477014580131011711700721000066130000201007010370098701067009670103
502047010852511100071331538381704210470093767118108152334010010100300001010030000505132564854967024700957010036008140100202003000020200600007010036011202011009910010000101001000001003088414895798110542036123892005012783132799982132915939792214380131011711700651000066630000201007010470101701037010670102
50204700945241000007190159806172011610870085824121108141334010010100300001010030000505132564064967023700827010136008740100202003000020200600007010036011202011009910010000101001000001003091415923814110192035424691904212623134999982133715141183214180131011711700651000066130000201007010770103701047010070097
50204701005251001107165133790171211226870082795115100154344010010100300001010030000505132573664967025700907010136008340100202003000020200600007010436011202011009910010000101001000001003091314881834110562033923387104412113133999982232514342384614470131011711700631001466430000201007010070100700977010870104
50204701005251001007162135823177612484700898361141041703340100101003000010100300005051325632449670247008870103360087401002020030000202006000070102360112020110099100100001010010000010030918084278811029203362858860302707313359998223171484388160050131011711700611001466430000201007009370511700927053070093
50204700955280000107096150831180801967008080612110114834401001010030000101003000050513255913496701570083700983600824010020200300002020060000700933541120201100991001000010100100000100309080985805110212036324991903012173133599982231014244880808120131011711700611000066430000201007009970097700977009070096
502047009952500000070831408051720122144700807611151061393440100101003000010100300005051325672049670217008570099360079401002020030000202006008470502354112020110099100100001010010000010030907085871510990204042658920401222313899998213251584037440340131011711700641000066430000201007010370095700907009170092

1000 unrolls and 10 iterations

Result (median cycles for code): 7.0094

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f181e1f20222324293a3e3f4043464951schedule 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)6061696a6b6d6emap 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)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)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 mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)d9ddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
500347011252520020006843154777100672221287007973741001173340010100103000010010300005006325459400496701307007770093360077400102002030000200206000070094355112002110910100001001010000103090820799715108432034722186504410433120199982118215338773220800012700417011700601000099130000200107009870091700927009770098
50024700895253300100665314478310044843108700807772117993340010100103000010010300485006325534200496701307008470098360075400102002030000200206000070093355112002110910100001001010000103093319790717108512034221085805210253126099982122714738483416340012700117011700561000099030000200107009470092700947009370096
5002470096525300000069001437611003842124700827464103118334001010010300001001030000500632551650049670170700807009636007240010200203000020020600007009735611200211091010000100101000010308742078672710872203352128710449953117099982120115134282320300012700117021700631000099130000200107009470095700957010070095
5002470093525210000067401518041007042104700817873119114334001010010300001001030000500632551510049670160700817009336007640010200203000020020600007009335511200211091010000100101000010308761684872610856203482198480789673112899982120614037771317351012700117011700601000099130000200107009970098700957009570096
500247008952530020006793154773100752612870074758510511133400101001030000100103000050063254085004967014070079700963600744001020020300002002060000700913551120021109101000010010100001030908237887331090120325229868900889983125899982118515740875217010012700117011700581000099030000200107009570097700967009470095
500247009452520021007009140816300728471127008076628711933400101001030000100103000050063255239004967014070086700873600794001020020300002002060000700963551120021109101000010010100001030894158467051088920347202873019896231187999821189151391704173130012700117011700601000099130000200107009670089700977009870098
5002470098525300200067621607841003365132700747791109110334001010010300001001030000500632551010049670150700847009436007440010200203000020020600007009435511200211091010000100101000010308747895747108522026321688504610133123299982120413838668061100012700117011700501000099130000200107009570098700957009770097
500247009152522000006841146763300680310470073751310710633400101001030000100103000050063255089004967021070074700903600774001020020300002002060000700923551120021109101000010010100001030871177487671089620264225850042105931212999821206163373710173730012700217011700551000099130000200107009970093700907008970098
5002470092525210120067751487741006802324700797513113953340010100103000010010300005006325446600496701107008470093360080400102002030000200206000070089355112002110910100001001010000103085019844763108952033922238474410663127099982118614538269617890012700117011700631000099030000200107009170093700937009270100
50024700915252000000685116579410048831327007776831041013740010100103000310010300005006325537310496701407008470095360083400102002030000200206000070088355112002110910100001001010000103090422721747108942035722386989912410263122299982121315536071419070012700117011700651000099030000200107009570096700907009570095

Test 3: throughput

Code:

  casal x0, x1, [x6]
  mov x7, 8

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 21.0092

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)0e0f18191e1f2223243a3f43464951schedule 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)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d1d5map dispatch bubble (d6)dde0e7? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
402082100901778001000240160100021140040534301421003004210030042500287667401492083172100922114081320139030142101021430042102146008421140815082110201100991001000010010000110030042028024034200280014026440619999114018012011172707424017020988200131053000010101210093211414210082211427210555
4020521009215830000002411701000210077455343014210030042100300425002876727014920834621008121141220201414301420010214300421021460084211413149721102011009910010000100100000100300420280240322002800140164406699991140180120111727074100170210270100603000010101211421210077211411210089211409
4020521142215740000002403110000210061266343014210030042100300425002858826014920834221008821141113200051301420010214300421021460084210076152121102011009910010000100100000100300420014240372002810140234405499991140120120111728174170170211216009613000010101210089211400210089211418210089
40205210088158400000024030000002100610703430142100300421003004250028767610149208319210065211411132013743014210102143004210214600842114221510211020110099100100001001000001003004202715240332002800140244406199991140131120111727074080170209885006603000010101212398210086211411210066211410
4020521142015730000002406500010211394260343014210030042100300425002874044014920833021007721139913201386301421010214300421021460084211460151421102011009910010000100100000100300420015241332002900140234405399991140200100111727074150170209883000613000010101210075211420210086211412210078
40205210074158400000024013000102100612663430142100300421003004250028585010149207960211420210085132009183014210102143004210228604202100941505211020110099100100001001000001003016802813240292002812140214406999991140161000111728074150170209883009613000010101211399210089211423210089211422
402052114111574000000240270001021007320534301421003004210030042500285850901492070082114212100851320002930142211021430042102146008421012215122110201100991001000010010000010030042000240282002800140234405599991140160100111727074140170209891009003000010101212352210089211423210089211398
40205211411157300000024022100102100622553430142100300421003004250028586800149208338210076211408132013713014221102723004210214600842114761504211020110099100100001001000001003003902715240322002900140254405799991140191000111727074100170211226009603000010101211009211412210077211409210089
40205210065160000110024013000102100732003430142100300421003004250028766580149208329210088211397142013843014210102143004210214604202123931493211020110099100100001001000011003004222714241292002800140294406099991140121120111727074090170209894010613000010101211421210077211412210079211421
402052124121574001100240250000021006206012030142100300421003004250028588680149206994211399210067372000493014210102143004210214600842123781504211020110099100100001001000001003004202714240302014130140264406199991140170120111771074120530211215009903000010101211409210066211590211410210086

1000 unrolls and 10 iterations

Result (median cycles for code): 21.1399

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f191e1f22243a3f43464951schedule 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 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)c2branch cond mispred nonspec (c5)cdcfd1d5map dispatch bubble (d6)ddfetch restart (de)e0eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
400282100981584101100024028121012100833883430049103003910300395028588250149207012021141321007610201391300492210033300391003360078211423150821100211091010000101000001030039000240342002620140194405799991140130020000651740831822209858101023000010011211413210090211409210077211422
4002521142315730000000240220100211411454343004910300391030039502859159014920833502100892114122020140530049111003330084100336007821142314842110021109101000010100000103003902817240252002600140214406199991140180120000651741621822209866131053000010011211400210128211400210079211411
40025211423157400000102401501002100774653430049103003910300395028768031149207002021142421007810200060300495010033300391003360078211410150821100211091010000101000011030039001724032200260014025440579999114018012320065174252182220986401363000010011211422210101211431210099210099
400252100871584111001024050121022114150883430049103003910300395028768380149207018021142921009810200066300492110033300391003360078210087151521100211091010000101000001030057192825240402003801140464406499991140351212310065174302182220986601023000010011210079211416210090211426210082
400252100651583000001024025000021007440034300491030039103003950287693901492052290211410210078102000603004950100333003910033600782100761516211002110910100001010000010300390281724031200260014020440579999114018010000065174162182220986913003000010011210090211416210083211423210618
40025210089158300000102402601002113984603430049103004010300395028586671149208344021007621142410201392300495010033300391003360078211424150821100211091010000101000001030039000240332002600140244405099991140170120000651741121822211183101003000010011210090211410210079211412210090
4002521007615840000010240350000211395406343004910300391030039502858482114920699802114102100781020139130049101003330039100336007821142315082110021109101000010100000103003902817240322002600140224405999991140180020000651741521822211201131003000010011210093211409210093211427210077
400252100811583000001024013010021140745534300491030039103003950287718001492069850211413210065102000573004910100333003910033600782114231508211002110910100001010000110300390280240312002600140204405399991140190120000651741021822211174131053000010011211416211427211398211413210066
4002521007815740000010240260100210074456343004910300391030039502858720014920701202100812100781020005730049101003330039100336007821008915082110021109101000010100000103003902817240312002600140214405899991140180120000651741621822211190131023000010011211411211424211422211424211414
400252114231573100101024101121012114153893430049103003910300395028770071149207018021009821009810200066300493210033300391003360078211430150921100211091010000101000011030058182802405020038001405944061999911402212123000651741821822209875131353000010011210099210072210099210073210088