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 (multiple, post-index, 4S)

Test 1: uops

Code:

  st4 { v0.4s, v1.4s, v2.4s, v3.4s }, [x6], x8
  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
  mov x8, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 12.000

Issues: 13.000

Integer unit issues: 1.000

Load/store unit issues: 4.000

SIMD/FP unit issues: 8.000

retire uop (01)cycle (02)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2224373a3f464951schedule 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)5f6061696d6emap 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 tlb miss (a1)l1d cache miss st (a2)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
7200729001232101711150000880004723288850414657130001000800040001000800040005000519017160941024667287982879633013000400080009009200002879628874116100110001000400000240010004000000001312892846926315973318830327038091036352829410011547012225127084000800010002902628884288492892328710
72004288122320015001300000101476828759401452513014100080004000100080004000500051899716041000246242862128813310130134000800090002000028850288731161001100010004000011040042004000090001312692476938319183518844323838091035392828710001594512374124554000800010002884028888289192897028929
7200428811231011211151000510047542872104144831300010008000400010008000400050005190971617111924658287552871131013000400080009000200002874628684116100110001000400000040000024000000001308792296882309243318914318938111640342840010001566012200125264000800010002882928819288302890928732
720042877523100150015000000004653289774414589130011000800040001000800040005000519007162513082465428653286746291301340008000900020000287222883811610011000100040055121400401440004124201301594306879313584018836323438171441372824510001540112534127884000800010002882528854289032890628742
720042881323100140017000000004707290614014865130001000800040001000800040005000519137160110824695288322897331013000400080009000200002862128588116100110001000400000040000004000080001317694496928308972818660325038051239392813510001525211988124964000800010002904429103290462907329071
72004289222320012001700000000458628721001458013000100080004000100080004000500051906716097082468628614287683291301340008000900020000288652884711610011000100040000804000000400208004331309093426891309084119319328438111039442883310001673713206136814000800010002927129381289832890028961
7200429233233001000140000200146842864941143101300010008000400010008000400050005189971595608246512854028710310130004000800090002000029091290141161001100010004005500400401440004124101319594536889307353118819323638091537372821710001527412510127304000800010002875728667287892870729158
720042870023200140013000001004775288034014986130001000800040001000800040005000518957161331024642286562874331013000400080009000200002881128627116100110001000400008040000014000012000129539308682631437401860432133816934342839610001601412185126694000800010002872728832289212883428793
72004287072310114101610005100469329397331480913000100080014000100080004000500052081716125082475128993290673101301340008000900020000292602920311610011000100040000804000000400009000131399464683030667331936634093814742402862310001605912628126714000800010002916029130291312916829000
7200429198235001400800042601004637292294314950130001000800040001000800040005000519037168861824709289242915931013013400080089000200002944028903116100110001000400408040000004000080001318293456910308973819455336738131435322858110001570012404124864000800010002888328765287482891428858

Test 2: throughput

Count: 8

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f222324373a3f46494e4f51schedule 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)6067696b6d6emap stall dispatch (70)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)c2branch mispred nonspec (cb)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
96020719909715531010000020100828761198340161611741735625112506180100729257320000801006400003200004005009297274107386450019953401981911994453964933735410401002003200006400002007200001600000200077200011131802011009910010080000800001003200141438262950320196211932000216361410510901171120023980000032000064000080100199192197981197291201153198913
9602041974871535111100012180008479002013341514133016401251129154801007222163200608013264000032000040050091901841071287600200196020168219969240840339268104010020032000064024020072000016000002021772006821180201100991001008000080000100320015153425453032223410203200021636000510901161120141080000032000064000080100200816204863198847199049200859
96020420135115640000100361700084379120192915161595165302511201088010072807932000080100640238320000400500921477310671136002016390199253197753382213402621040100200320000640240200720000160000020072120016821802011009910010080000800001003200141436251410320016011832000214361400510902171119922880001032000064000080100197686196811200633202411201379
96020419715515481000100121050019043911991851616135316640251125332801297244043200608010064000032000040050091313971088306900199560020065920196140730340548104010020032000064000020072000016000002003232009331180201100991001008000080000100320015153625434032001610101232000216341410512001171120096180000032000064000080100202059197537201659201890200362
960204201530154812101000201084761119981516161524170442511284538010072627532000080129640000320000400645930279810704038001981080201395198952419393410911040100200320120640000200720000160000019780619891911802011009910010080000800001003200151436254330320016009413200022341400510901171220039280000032000064000080100199354201505200654200139199486
96020419910515351100000132190108212912003601615121416281251123276801007286543200008010064000032010840050092229651079333800218036019983719979239797123946710401002003200006402402007200001600000200569201249118020110099100100800008000010032001415362601613200160053200022361400511001161119648980029032000064000080100201490201454201980202458199966
9602042006711549110000001900084013019975816161414168632511300618010072612532000080100640000320108400500924096610806257001995330201247200991393731340692104010020032000064000020072000016000002007581989811180201100991001008000080000100320137173626846032025800300932024214361430516601431220027180667032000064000080100202045202222201729200298200342
9602042000131538122004452819601082928119881016161587150422511201508010072734332000080100640000320000400500923957710855299001993450199953197843380643384571040100200320000640000200720000160000019926220017111802011009910010080000800001003200151436265210320017101732000216361411510901161119886880001032000064000080100201923200020202073200346201546
9602042018651558000010045210009183311985261616172516790251130653801007284733200008010064000032000040050092173731071166700200486019896520074638411337136104010020032000064000020072000016000001993121998201180201100991001008000080000100320014153826462132000200173200022361400510901171120036580000032000064000080100198341201455198384198736198215
96020419792915561010100019010889771202418161616571660125112160180100724733320000801006400003200004005009181589108742360019854802017322019144105233898910401002003200006400002007200001600000198750200215118020210099100100800008000010032001515402398303200160017320002140000510901172119932280000032000064000080100199913198844200837198299200362

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)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)6067696b6d6emap stall dispatch (70)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)c2cfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
9600272013351559000002555008346202006321616143517259251124405800397249713200008001064000032000040005492651051075221410202317021859619869140514104085210400102032012064000020720000160000019880819933611800211091010800008000010320000002453703200020023200022420503103173319921480000032000064000080010198289198915199683197817199207
960024201366153600000300843720201026016114515652251122680800107307333200008003964000032000040005891744001077266000199663019812519926138265338112104001020320000640240207200001600000198861198288118002110910108000080000103200000422721903200020053200022420501903173219797480000432000064000080010199353203064199635199143201328
9600241997631559000003009013302000281616151816000251125425800107285223200008001064023832000040005091601701077002600199993020026319826841464340476104001020320000640000207200001600000197394198011218002110910108000080000103200000422508403200001053200022420501903163320100780000032000064000080010198300198481199907200176200179
960024197590161900001323008559002010371616200316262531121681800107283733200008001064000032000040005091501491086207201199010019934620082039420338003104001020320000640000207200001600000202468201497218002110910108000080000103200000422614503200022023200602420502002173519858880000032000064000080010199345202220199402199151199099
9600242002091556000018300835480199114160144915961251127576800107322113200008001064000032000040005090961991096775000201343019746320146939421337838104001020320000640000207200001600000199854202212118002110910108000080000103200000422554903200020023200022420501903253320105980000032000064000080010201915201572198992199401202065
96002420009215560000123008382801976881616159816262251125460800107234543200008001064000032000040005092680071078628400200842020057319830438451340892104038520320000640000207200001600000203080198058118002110910108000080000103200600422612103200021013200002420501903173220025380000032000064000080010200747200166201052200494200737
9600241996311561000012310810790200846161611571733913711269688006871840032018080126640714320324401068946945911092421002000060199747201338414163439993104076020320360640720207205401601800200723201354518002110910108000080000103202492422581303201823031273201822420501902163219998780000032000064000080010200981200413199794198974201828
960024198141153300009300893190201109016133616527251127857800107279573200008001064000032000040005092878461085912101198756019958020184841545340224104001020320000640000207200001600000201520198184118002110910108000080000103200000422522303200020003200022420501902173320144380000032000064000080010197550199246199983200804200876
960024198945155400000300865590198866161614761714725112887480010722598320000800106400003200004000509229344106574170020043202011642003064047334169210400102032000064000020720000160000019882020220311800211091010800008000010320000002498603200020023200022420501903172219711280000032000064000080010200236200296198706198908200384
9600242017241572000063008639601974571616158216559251126795800107258313200008001064000032000040005592815321076383110198692020067320054941091339848104001020320000640000207200001600000201180199239118002110910108000080000103200000422490503200020023200022420501903163220090680058032000064000080010200780200040201882198964199893