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

ST4 (single, B)

Test 1: uops

Code:

  st4 { v0.b, v1.b, v2.b, v3.b }[1], [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
  mov x0, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 3.000

Issues: 3.000

Integer unit issues: 0.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 2.000

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk instruction (07)09l2 tlb miss instruction (0a)181e1f22233a3f40464951schedule uop (52)schedule simd uop (54)schedule ldst uop (55)dispatch simd uop (57)dispatch ldst uop (58)simd uops in schedulers (5a)ldst uops in schedulers (5b)5f696d6emap rewind (75)map stall (76)dispatch uop (78)map ldst uop (7d)map simd uop (7e)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd store (99)inst ldst (9b)l1d tlb access (a0)l1d cache miss st (a2)st unit uop (a7)l1d cache writeback (a8)acafbcl1d cache miss st nonspec (c0)cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? ldst retires (ed)? simd retires (ee)f5f6f7f8fd
6300729649238130033001004570286210001566430002000100120001000128041790620234982860428683310300010002000200050002872028655116100110001000100031001011000131318810008692231941760204383141381120585928172156291286113919100020002893928813288662894028759
63004287042230270260000048052865801115858300020001000200010001280317908823558285312867331030001000200020005000287512883211610011000100010003100004100103131569460696231341261201183296381317596228160153951297613769100020002873628612288012871128852
6300428873224031026018100473129142270115864300020001000200010001280417905323476285522866931030001000200020005000287062860411610011000100010000100003100103131129306686031631256202823205381620625728430159401291214085100020002905728984289382900828857
63004289722320360290000046682889801015924300020001000200010001281217899423624286552889631030001000200020025000288892897711610011000100010003100101100013130409326686230791260202953203381215576428600158141305214049100020002907429310288892891229005
63004292242330341250000047522881300015904300020001000200010001281017906523495286892894431030001000200220005000288312881911610011000100010002100100100010131719371695731161562200913198381221525628240156131295313828100020002890428839288522894628920
63004286862240240260010046602880700015847300020001000200010001281017911523472285582870533130001000200020005000289072876011610011000100010002100000100002130229351693631291150202383228382116566128331158091296713656100020002892828804289172880228979
63004288262240210280000044542874401015753300020001000200010001281117907623536286622883831030001000200020005000287792878111610011000100010003100000100102130389455685630851357202073209381620575228189156841322313962100020002893428915288482872528897
6300429036223030026100004706287260101582330002000100020001000128061790652356728689288593103000100120002000500028858288071161001100010001000210000110000313002935768413095135620208319438187595528237156691251914017100020002890328996292542893828764
63004289362240310270010046222863300016003300020001000200010001280417903523521286982878531030001000200020005000287582872511610011000100010002100010100002130669301693630771266202473200381625576128160154441312713829100020002893028815289162885428913
63004288332230251270010046212874000115797300020001000200010001280517903723516286192898331030001000200020005000288802872911610011000100010000100000100003130709518698731471461201693217381720565528315156191298513871100020002885428811287472890628797

Test 2: throughput

Count: 8

Code:

  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  st4 { v0.b, v1.b, v2.b, v3.b }[1], [x6]
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code divided by count): 0.5643

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)18191e1f2224373a3f46494e4f51schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)rob full (74)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd store (99)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)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2402074533035000000000013022045337001785425251998100172675800001001600008000050020841483297594145305450774539615029031493824010020080000160000200160000400000451814542711802011009910010080000800001008000003424310800021028000023400511001161144949000800001600001004521244795453694541545295
240204462793751010012190012136145449161621003252527181001721178006010016000080000500208882032950980447544525945369144930314942240100200800001602402001600004000004517044851118020110099100100800008000010080014143622170800160117800021636140511001161145350000800001600001004479445062452704554244932
2402044521335411000019001213314467316163103225251872100172281800001001600008000050020798243319518044965450954515415219031459824010020080000160000200160000400000452294511411802011009910010080000800001008001514021180800160120800021636140511001162145291000800001600001004555945438452994511745031
2402044508335011100021001182314507615161676125252130100172968800001001600008000050020882913323323045293453144511915065031492124010020080000160000200160000400000450314476211802011009910010080000800001008001514362489080016011880000160142511001161145409000800001600001004487545316452034508945362
24020445218350111006190011930145155161687972525296710017286580000100160000800005002064644329518604529745212451651505303147062401002008000016000020016000040000044736455611180201100991001008000080000100800151435233508001600148000223400511001161145013000800001600001004490544588449764485544976
240204452763500000002001259004496401614834252515851001723798000010016000080000500208388433194430452084518745226151510315168240100200800001600002001600004000004506645349118020110099100100800008000010080015143623161800161021800021436141511001161144952000800001600001004480345072453944526045246
2402044522035010100017001223514488216168679252522521001718568000010016000080000500207009332902650447194494144917148100314953240100200800001600002001600004000004522944823118020110099100100800008000010080015143621480800160120800021636140511001161145187040800001600001004563344903452334522445000
2402044507134911100014001227414502316166866252561411001730848000010016000080000500207554533191440450204495645478148780315522240100200800001600002001600004000004513145207118020110099100100800008000010080014153625060800140015800001636140511001161145466001800001600001004525644760448504898545098
2402044503634811100018001242514523601616930252521571001716218000010016000080000500208878533286880451464479844896147610315281240100200800001600002001600004000004538345199118020110099100100800008000010080014153624680800160014800021636141511001161144978000800001600001004530745054448714519345612
2402044506034711000019101189514523501613923252514911001728398000010016000080000500207659533407710451834494245359152320315317240100200800001600002001600004000004479145439118020110099100100800008000010080015153620910800160117800001636140511001161145380000800001600001004527745544451304532244987

1000 unrolls and 10 iterations

Result (median cycles for code divided by count): 0.5648

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)191e1f222324373a3f46494e4f51schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)rob full (74)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd store (99)inst ldst (9b)9fl1d tlb access (a0)l1d cache miss st (a2)a4st unit uop (a7)l1d cache writeback (a8)acafbcl1d cache miss st nonspec (c0)cfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2400274480636200003000118041449801616697362525288910172076800601016000080000502066633327287404486145039448851488103150562400102080000160000201600004006024305744859118002110910108000080000108000042236180002028000224250200216114511780000160000104518144618446654516644669
240024450373480000300013405144792160209062525177110172868800001016000080000502089436333392504507345096455111485503150152400102080000160000201600004000004501945134118002110910108000080000108000042220180000028000224250200116214523980000160000104524745205450934531245115
2400244532934800003000130180451801616138762525252710172718800001016000080000502082861328329604498845259451631505703154172400102080000160000201600004000004485345213118002110910108000080000108000042237180002038000224250220216214499880000160000104514245218448954505044944
2400244519434900003100125660452571616110142525237410172977800001016000080000502095859328665804510944771446301470303156162400102080000160000201600004000004516145240118002110910108000080000108000042220680002028000224250220216114539380000160000104504445332455174518345158
2400244483936200000100120770448651616248492525073010172133800001016000080000502090804331610504488145173449451484603150582400102080000160000201600004000004526845192118002110910108000080000108000034229880002058000223450200216214509280000160000104546645053449274519344741
2400244545335000000000120920453841616128562525177810172471800001016000080000502084201332979604486645329452991483103146992400102080000160000201600004000004476844683418002110910108000080000108000034233780002028000223450200216214544880000160000104511344823448414534745496
2400244509335100000000117740453941616118572525217610172197800001016000080000502076776333059704499544973447041519203150542400102080000160000201600004000004513445187118002110910108000080000108000034248180002028000003450200116114486980000160000104521644808451524533745037
240024447043490000200012086145218161618911252508551017310380000101600008000050207450932923330450944520045023149740315192240010208000016000020160000400000448464526311800211091010800008000010800003422248000000800000050200216224514380000160000104491445166449604537344902
240024450403510000200012345044918161628732525289610171771800001016000080000502087502329058104516145063450451488403146442400102080000160000201600004000004512445010118002110910108000080000108000034223780000058000223450200116124495680000160000104496245089450674527245028
240024450983520000500012093045033161648412525143210171966800001016000080000502076718334875304518144941456531464603149922400102080000160000201600004000004491644681118002110910108000080000108000034216880002008000223450220216214523580000160000104493145209455304510645038