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

SWPL (64-bit)

Test 1: uops

Code:

  swpl 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): 2.000

Issues: 2.000

Integer unit issues: 0.000

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 instruction (07)mmu table walk data (08)l2 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)5f6061696a6d6emap 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 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)e0eaebec? ldst retires (ed)f5f6f7f8fd
72005336162511001010010013370005799330701128087200020002000100006004930247332023321031220002000300033129528711710011000100002000022100410000042002202200160601081918329403439123526391244455470693260917248161861629120003341133287332633325633160
7200433574248601010000010370105515331391128494200020002000100007004930254329993374331220002000300033144522211710011000100002000022100410000052004202200160041168818256396316623365367744465368663260417250156951682020003326133636336823367933260
7200433222250401010000011120105959330551128223200020002000100005004930206329733330231220002000300033074525911710011000100002000022100210000022002512221153681160818219390706523389369044465372713278917300161691778620003327333229333143352633123
7200433299252511110000010491105864330200028260200020002000100016004930161333443358531220002000300032979520411710011000100002000022100210000042004202200160111094608277388005923296385944455465623262217294160861770820003336333307332883338433591
720043336625240100011221322208105829331591128164200020002000100007004930115329083324331020002000300033400524311710011000100002000022100310000022002502200158421157918287389226923501385844515766683258616924153751677120003330233600331743319033723
7200433386248501010010011210105797335671128172200020002000100003004930627330853368231320002000300033138522921710011000100012000022100010000022006202200157831092028314395516323804390544425771653278118316151331792120003355833293331473327933243
7200433066252301010010011260105834329811128296200020002000100005004930551329103318631220002000300033012519511710011000100002000021100410000042002302200159861099818065385926623482384744435667633274918083153471767320003376633346333383309633772
7200433214251401010000012850105981331810128163200020002000100005004930426332843322031320002000300033139527811710011000100002000021100210000012002402200161211176128137375406923712388344485865563279217505152081645020003322633187337593364233288
7200433285251801010000010400105586334371128210200020002000100005104930092329543340231220002000300033125522211710011000100002000022100410000032002302200160811170618375393406423709389844485166573259217210152431641220003372633523336223312133145
7200433139251501010110011050105850333951128126200020002000100003004930197329803323631220002000300033151523011710011000100002000022100510000022002302200162661184708328373516823315388644515464653267517305161021667220003363333601336253317433590

Test 2: throughput

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 7.0131

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)0e0f181e1f2022293a3e3f404346494f51schedule 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 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 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
302097013452510001072987820170411614870108808181371684965725301001010020000101002000060351332304704967046700907013065747366335301001020020000102003000070131801120201100991001000010100100000100209231512647711992510909102492886934401126210994208736811521301310116116989210000131320000101007068170142701347013370134
30204701285251000007199784317209216070119810181371494966725301001010020000101002000060305332406804967051700937013465751366343301001020020000102003000070130801120201100991001000010100100000100209140113577519934108361025727618633610062117252050432968001310116116989610000131320000101007013870132701357013570137
302047018052510000074107795172810410470113822321531584966625301001010020000101002000060351332319114967041700907012765766366341301001020020000102003000070130811120201100991001000010100100000100209381611807271993110873102672932932381200211023198738211921301310116116989310000131320000101007013670134701297013770133
30204701295251000007357783517041001487011981428164123496752530100101002000010100200006030833234761496705770091701516576136633130100102002000010200300007012680112020110099100100001010010000010020914151171776199361084410232284688436112721100521674219921401310116116988910000131320000101007012870135701747013470132
3020470137526110000750578501728951047012480927138153496752530100101002000010100200006032933235701496705770088701306576436634030100102002000010200300007012780112020110099100100001010010000110020931151354754199361086010246285488044108921184519474041128001310116116989810000131320000101007013270127701377013670130
30204701185250000007447781017369216470110800191471384966425301001010020000101002000060351332304814967047700827013465766366342301001020020000102003000070133801120201100991001000010100100000100209181612787351993810860102502785910361148211015226741211201401310116116990110000131320000101007013470135701317012970130
30204701335261000007420781116169592701208111816213449664253010010100200001010020000603023323383149670487009270127657623663333010010200200001020030000701288011202011009910010000101001000001002088201296787199351083010246270189244119321117520204141112001310116116990310000131320000101007013870138701347013470134
302047012652500000071917830172810013670110776141391564966125301001010020000101002000060351332319214967042701007012665764366344301001020020000102003000070134801120201100991001000010100100000100209051412177921993810855102602644909361040211054201736210481401310116116988610000101020000101007012970127701237012270122
302047012052600000071277802170499967012081730150149496572530100101002000010100200006029933236671496705470091701316577336634130100102002000010200300007013580112020110099100100001010010000010020920141247786199391085910245292491436115321125418074009681301310116116989810000131320000101007013670131701397013270137
30204701355251000007289783217208811270108777181461344966225301001010020000101002000060351332304614967045700967013965770366340301001020020000102003000070128801120201100991001000010100100000100209351412437671993510871102522735896381102210955228739611201401339116116989410000131320000101007013970137701297013570132

1000 unrolls and 10 iterations

Result (median cycles for code): 7.0121

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f20222324293a3e3f404346494f51schedule 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 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)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)c2branch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
30029701285252200110073292812100824111116701077892313615349668253001010010200001001020000599683323335149670430700957012165780366360300101002020000100203000070132791120021109010100001001010000010209253137877019941108421025428849193811102116551872425113620012700001150001169882100001010020000100107012370124701297012470123
3002470128525200010007142280010068897148701098002715216149663253001010010200001001020000599683323287149670400700867011965772366353300101002020000100203000070119791120021109010100001001010000010209602124579919932108701025230639614011492113651931386107210012700001150001169882100001010020000100107066570676701237012270128
30024701195251100000073442809100776108156701128152513615449661253001010010200001001020000599683323096149670410700827012865780366350300101002020000100203000070127791120021109010100001001010000010209162117681519936108601024931739374010902113952062398102410012700001150001169884100001010020000100107012270122701247012370126
30024701225252002100073402784100776111152701488613115414849661253001010010200001001020000599683323288149670460700817012765779366360300101002020000100203000070120791120021109010100001001010000010209083124877419930108761025326629478010592115052030409125611012700001150001169884100001010020000100107012370124701247010770120
3002470120525110000007357284010072883144701037833015315149662253001010010200001001020000599683323192149670420700807012065783366362300101002020000100203000070123791120021109010100001001010000010209264129080819932108751024629418893411142111851822442104820012700002150001169883100001010020000100107012270125701267012570124
3002470120525110100007365281830070411612870109799151401334966225300101001020000100102000059968332295114967046070089701236578136635630010100202000010020300007012279112002110901010000100101000001020958210607671993010833102552781911361151211175211240099220012700001151111169885100001010020000100107012170123701237011970129
30024701185252000000074602846300720119160701097941913716449662253001010010200001001020000599743323047149670420700937012265771366352300101002020000100203000070122791120021109010100001001010000010209261130877719933108911024728129413211582113052060398105620012713111150001169887100001010020000100107010870128701227012170117
30024701195641100000072692807100704103124701097971313515049659253001010010200001001020000599683322904149670400700797012565778366357300101002020000100203000070129791120021109010100001001010000010209262125179919935108841025930119093211032113252012413104820012700002150001169884100001010020000100107013170125701247012470128
3002470126526100000007197285610075297128701098102914214549660253001010010200001001020000599683323191149670410700857012365772366351300101002020000100203000070127791120021109010100001001010000010209389120380919932108071024429918795011302112651942396104820012713111151111169887100001010020000100107012270123701287012070132
30024701195262002000073302819100792107148701147923116913649659253001010010200001001020000599683322998149670410700807011365781366352300101002020000100203000070122791120021109010100001001010000010208993129278819931108541024829628853611152112152071415118400012700001150001169885100001010020000100107012170124701227012670132

Test 3: throughput

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 18.0048

retire uop (01)cycle (02)03mmu table walk data (08)09l2 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)60696a6d6emap 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)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)eaeb? ldst retires (ed)? int retires (ef)f5f6f7f8fd
2020518004813490101100321492100180033314161587642520100100200001002000050085653551491769681800391800391760456177502201002002000820030012180048144011102011009999539100100001001000001002000003801292203214210002002215142163221651635380111716155001160017893540101020000100180049180049180040180053180053
2020418005213480000100321580101180024216015876825201001002000010020000500856536414917695918005118003917603661775012010020020008200300121800481440111020110099995401001000010010000010020000000129212321631000200221754214422162163538011171615510016001789264001320000100180053180049180049180040180052
2020418003913490001100321392100180037213141587402520100100200001002000050085653611491769701800521800481760456177493201002002000820030012180048144011102011009999543100100001001000001002000003801292213215810000002215742145221551634380111716154940170017893630101020000100180049180049180049180049180049
2020418004813490000000321380101180037116161587642520100100200001002000050085658161491769681800521800481760366177502201002002000820030012180048144011102011009999536100100001001000001002000003839129219321371000000221494214722145160380111716154910160017893931131020000100180040180040180040180049180049
202041800391348000000032152200018003721314158761252010010020105100200005008566145149176968180039180048176045617750220100200200082003001218004814401110201100999953910010000100100000100200000001292123214010000002214742160221741640380111716155020160017893510101020000100180040180049180049180049180040
2020418003913490000000321512100180033301315876125201001002000010020000500856580614917695918005218005217604561775022010020020008200300121800522873111020110099995451001000010010000010020000038381292213215110000002215142147221501635380111716154900160017892610101020000100180049180049180040180040180040
202041800481349000000032137010018002401614158763252010010020000100200005008565362149176968180039180052176036717750220100200200082003001218003914401110201100999954610010000100100001100200000380129221321551000000221594214722144160380111716154940160017893600101020000100180049180049180053180049180049
202041800481348000000032154010018003301601587632520100100200001002000050085658101491769681800481800391760456177492201002002000820030012180053144011102011009999536100100001001000001002010503839129223321381000210221534213822137163438011171615494016001789260010020000100180049180049180040180049180049
202041800481348000000032161200018002420015876125201001002000010020000500856580614917696818004818004817603661774932010020020008200300121800481431111020110099995431001000010010000010020000038381292193216110000002217142143221481639380111716154920160017893930101020000100180053180079180049180051180899
202041800521348000000132476280012180033101415875425201001002000010020000500856674604917695918003918005317602661774932010020020000200300001800521440111020110099995401001000010010000110020000038381292213214610002102214842143221441534380111722155272252217891640141020000100180899181723180476180894180905

1000 unrolls and 10 iterations

Result (median cycles for code): 18.0048

retire uop (01)cycle (02)03l1d tlb fill (05)0e0f191e1f22233a3f4346494f51schedule 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 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)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)l1d tlb miss nonspec (c1)c2branch cond mispred nonspec (c5)cfd1d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaebec? ldst retires (ed)? int retires (ef)f5f6f7f8fd
200251800441349011032209161001800330181815876025200101020000102000050856636414917697318005318005317606531775282031622200002032013181740145431100211099954510100001010000110200000302912921232150100001022172421372218916283426006401555723322178922000002000010180049180049180049180049180040
20024180044134801003221014001180031018015875625204321020000102000050856633414917697318172718004517605831775262001020200002030000180045146311100211099953210100001010000010200272734421292143218410255022220442191222011627026306401554621622178929009902000010180047180054180046180046180054
2002418005313491110321971600018003890181587572520010102000010200005085663701491769751800531800531760573177533200102020670203000018005314631110021109995351010000101000001020025253401305203218210016002221042184221462038000640154932352217892430101002000010180040180045180040180052180049
200241800481348010032151200018003321615158763252001010200001020000508565355149178645180039180044176056317752820010202000020300001800892905111002110999533101000010100000102000003829129219321451000200221604215722156025000064015493216221789251010602000010180049180040180045180040180049
2002418004813810100321482001180033315151587612520010102000010206125085653551491769591800511800481760563177519200102020672203000018004414541110021109995431010000101000001020000230281292193214910002002216142136221412343800064015523216221789154010602000010180049180049180049180045180040
2002418004813490110321462000180029214015875325200101020000102000050856580614917696418176418005117606031775282062220200002030000180039290211100211099954510100001010000010200000029129219321351000200221324214222171235400006401552821622178924200002000010180045180040180049180040180466
20024180048134901043217721011800331141415875425200101020000102000050856581019817696818004818004817605631775282001020200002030000180039145411100211099954610100001010000010200000382912922032165100020022173421522213203500006401554121622178929109902000010180054180054180054180054180047
2002418005313491100321512001180033114141587542520010102000010200005085659511491769641805001800391760603177528200102020000203000018046714542110021109995351010000101000001020027270411292153219810017022221142187221422343000064015498216221789240010602000010180049180049180045180040180040
200241800391349010032147200118003321716158755252001010200001020000508565361149176968180048180048176056317752820010202000020300001800481454111002110999544101000010100000102000000291292193215010002002213042143221622000006401549421622178920206602000010180049180066180050180049180040
200241800481348000032151200118003301614158759252001010200001020000508565801149176968180048180048176060317752820010202000020300001800481454211002110999540101000010100000102000003828129219321511000000221644214822142225000064015518216221789244010602000010180040180049180040180049180040