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

STRH (pre-index)

Test 1: uops

Code:

  strh w0, [x6, #8]!

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 2.000

Integer unit issues: 1.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)1e1f20223a3e3f4046494f51schedule 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)606d6emap stall dispatch (70)map 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 store (96)inst ldst (9b)l1d 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)aaabacafbcl1d cache miss st nonspec (c0)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
10051040701014761841025102362520001000100010001000507624582401040104082439332000100020001040124111001100010001013033214100504001310425557311611103710001000100010411041104110411041
100410408000106061210251102043620001000100010001000507704582401040104082438982000100020001040124111001100010001014028001005000510055397311611103710001000100010411041104110411041
1004104080061044000102515106252000100010001000100050770458241104010408243898200010002000104012411100110001000101664929100501965101910487311611103710001000100010411041104110411041
100410407000123801001025210732520001000100010001000507544582411040104082438982000100020001040124111001100010001026058491005010010101010327311611103710001000100010411041104110411041
10041040800013201001025144042520001000100010001000507704582401040104082438982000100020001040124111001100010001016060320100501410810235247311611103710001000100010411041104110411041
10041040700092000010250234252000100010001000100050762458240104010408243897200010002000104012411100110001000101403602210140106510145627311711103710001000100010411041104110411041
1004104071008361501025132252520001000100010001000507704582401040104082438982000100020001040124111001100010001020060028100502216810185487311611103710001000100010411041104110411041
1004104080009260801025113362520001000100010001000507624582401040104082438982000100020001040124111001100010001020037220100501005102510317311611103710001000100010411041104110411041
10041040701014201601025152242520001000100010001000507624582401040104082438982000100020001040124111001100010001024127300100500010101010557311611103710001000100010411041104110411041
10041040800014380641025000625200010001000100010005077045824010401040824389820001000200010401241110011000100010140291171006026185101910397311611103710001000100010411041104110411041

Test 2: Latency 2->2

Code:

  strh w0, [x6, #8]!

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0040

retire uop (01)cycle (02)03mmu table walk data (08)18191e1f2022293a3c3e3f4046494f51schedule 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 store (96)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)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)aaabacafbcl1d cache miss st nonspec (c0)c2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? ldst retires (ed)? int retires (ef)f5f6f7f8fd
102091004075000206786770164087011610025794518861252010010100100001010010000522119468824149696010040100408674387472010020010000200200001004012211102011009910010000100100001001091001311356063310259248874328471092415110700710117111003710000010000101001004110041100411004110041
1020410040750002136768081680830116100258015610160252010010100100001010010000522115471113149696010040100408674387472010020010000200200001004012211102011009910010000100100001001087001193353265610236268872368031090212109200710117111003710000010000101001004110041100411004110041
102041004075000220285800172873110810025748827711825201001010010000101001000052214146882414969601004010040867438747201002001000020020000100401221110201100991001000010010000100108920118735006261026724685632809109108113100710117111003710000410000101001004110041100411004110041
102041004075000206778805175288214810025784547161252010010100100001010010000522079468824149696010040100408674387472010020010000200200001004012211102011009910010000100100001001089401131391069310241253870327101089712105300710117111003710000210000101001004110041100411004110041
1020410040750002190727841760760961007776655706825201001010010000101001000052203946882414969601004010040867438747201002001000020020000100401221110201100991001000010010000100109080116037526551024726790836822108939114770710117111003710000110000101001004110041100411004110041
10204100407500020438879316886011201002576760685325201001010010000101001000052211346882414969601004010040867438747201002001000020020000100401221110201100991001000010010000100108700121034806591025625890032842108959118000710117111003710000010000101001004110041100411004110041
102041004075000196272774171281014410025764803957252010010100100001010010000522015468824149696010040100408674387472010020010000200200001004012211102011009910010000100100001001090801290362067910291278914388511094012118200710117111003710000010000101001004110041100411004110041
10204100407500019718078716726801161002579882735125201001010010000101001000052205746882414969601004010040867438747201002001000020020000100891221110201100991001000010010000100108700135835416261027023989638838108846105600710117111011610000410000101001004110041100411004110041
102041004075000193876802171281010810025773866358252010010100100001010010000522109468824149696010040100408674387472010020010000200200001004012211102011009910010000100100001001093101366370066810262258874588311087812118400710117111003710000010000101001004110041100411004110041
102041004075000217275794172087111610025785734951252010010100100001010010000522125468824149696010040100408674387472024720010000200200001004012211102011009910010000100100001001091401236357365710267302862328511091310115400710117111003710000010000101001004110041100411004110041

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0040

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)1e1f2022293a3c3e3f4046494f51schedule 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 store (96)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)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafbcl1d 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
10029100407511023229182617048201161002577710874632520010100101000010010100005210094688240496960100401004086963877020010201000020200001004012411100211091010000101000010109317132236906861029731909364090310918211254706403162210037100003010000100101004110041100411004110041
1002410040762202310100800179268010010025774120906025200101001010000100101000052107346882414969601004010040869638770200102010000202000010040124111002110910100001010000101090171366352066410286272492944850109182812361426402163310037100003010000100101004110041100411004110041
1002410040751102280918121680890104100257778476632520010100101000010010100005210094688241496960100401004086963877020010201000020200001004012411100211091010000101000010109238135235106591029829008863891210910211213726403163310037100004010000100101004110041100411004110041
100241004075110222077785173682015210025770781116625200101001010000100101000052108146882414969601004010040869638770200102010080202000010040124111002110910100001010000101085171347367066510271248490348832109142912681426402163310037100003010000100101004110041100411004110041
1002410040751112058808021744760112100257515657672520010100101000010010100005210254688240496960100401004086963877020010201000020200001004012411100211091010000101000010108877137637606701028525208925091310879201305706403163310037100001010000100101004110041100411004110041
10024100407510120919779317527601161002580236916925200101001010000100101000052107346882404969601004010040869638770200102010000202000010040124111002110910100001010000101089616130535326731029030218965087210924211250706403163310037100005010000100101004110041100411004110041
100241004075220208810183717207901601002582910388652520010100101000010010100005209934688240496960100401004086963877020010201000020200001004012411100211091010000101000010109079135540706521028429308983884310900221160706403163210037100000010000100101004110041100411004110041
100241004076111237094798174479010810025785841015825200101001010000100101000052102546882414969601004010040869638770200102010000202000010040124111002110910100001010000101087914125837306651027728109205089910918181238706403163310037100004010000100101004110041100411004110041
10024100407511021189577116887501081002576790846025201181003910000100101000052104146882404969601004010040869638770200102010000202000010040124111002110910100001010000101092015132139706711029027508764680710928231138706403163210037100001010000100101004110041100411004110041
100241004075200211810081516968801041002577597776025200101001010000100101000052106546882414969601004010040869638770200102010000202000010040124111002110910100001010000101090371373347068010287270290544857108962212211426402163310037100005010000100101004110041100411004110041

Test 3: throughput

Count: 8

Code:

  strh w0, [x6, #8]!
  strh w0, [x7, #8]!
  strh w0, [x8, #8]!
  strh w0, [x9, #8]!
  strh w0, [x10, #8]!
  strh w0, [x11, #8]!
  strh w0, [x12, #8]!
  strh w0, [x13, #8]!
  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.5096

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2022293a3e3f4046494f51schedule 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)6067696a6d6emap 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 store (96)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)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
802094073030730003001824856804172011410440717773172118281632516049080540800008010080000408436187842413854937645407304082030671330670160100200800002001600004085775118020110099100800001008000010080875264017501168708050925908897215678139444341962700511021723408588061580000801004078740717407704081940772
80204407943052000200182477880516641051284080373016031803191251605668343780000801008000041734818767480388493766240777409533079133083116010020080000200160000409278811802011009910080000100800001008098416413145368898052824908653416828139749545402700511021622407398093180000801004075040766407124081640793
80204407803051000100169570779616721089240741782166716971702516523886246800008010080000401451187708402029493767440811408093070833069516010020080000200160000406828711802011009910080000100800001008089229424548378728055126328423615858138157544492700511021722408028032480000801004072840729408404077640681
802044069330520200001860716786176011672407297661675181017625164625805288000080100800004111641867988114084937722407694069630674330730160100200800002001600004076684118020110099100800001008000010080876274481476198278047724508816414798138748845162000511021722408258062180000801004071640750408304077740786
8020440777306200000017737508791648868440708752180117081742516317084392800028010080000402579186779201783493767540735407493056433070416010020080000200160000407557511802011009910080000100800001008092936448147688568057423509103214508136756043312500511021622407608020580000801004079840636407474075140746
802044076030520200001752780769169611414440718767161619631732516071881643800008010080000401882187460802494937656408114076130672330718160100200800002001600004068875118020110099100800001008000010080889244632523158788049828108516816548139662639382200511021722406998074180000801004074040683407814072040696
80204408333063000000175576274716961101124067376918511598172251608158077980000801008000042278318744441206949376074078840777306883307081601002008000020016000040734761180201100991008000010080000100808767434050098498052425808783216418136946338271300511021622408168461780000801004077840792407914074140788
802044077030520000001719808793169611212840703780186017641662516597885542800008010080000421077187271602984937640408394079630778330618160100200800002001600004075788118020110099100800001008000010080907254121481118568051625408737415648135151836432600511021722407608572380000801004086240781407164085640724
8020440697305202000018726957901664961204070076316481857185251607568043680000801008000040888818727600186549377224068140747307493307471601002008000020016000040693751180201100991008000010080000100808892837584671184080522253082112615968136549037782700511021622407898063280000801004083040741408314094840647
80204406463052000200192962076817121061444083775915941813183251608828101180000801008000040302418704360381493770540702407273072033079416010020080000200160000407608711802011009910080000100800001008086428468663258418056227318463215218138655042641300511021622407938055480000801004083440746407694074240854

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)1e1f2022293a3e3f4046494f51schedule 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)6067696a6d6emap 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 store (96)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)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9aaabacafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
8002940681306000162981080717121261124080474818531533129251614778073480059800108000040196818796521211149376774074040834307213308231600102080000201600004076192118002110910800001080000108089914364145812864805702370869301679813245784222140502061667408708055580000800104082540841409214088140788
8002440816306010195684376816881112244087079714861794120251605668060480000800108000040122318751121910493763640727407543075133074016001020800002016000040783751180021109108000010800001080904039295021590280476260084872164881413512396900502071666407748097280000800104077740760407334083040748
8002440848306000165975779516961131204079573917191661120251623568073280000800108000040123418728561200493770940768407783067733075316001020800002016000040885751180021109108000010800001080874039164681783080541249085142152881423529384600502061764407848060080000800104079440794407464079940756
8002440768306000164191176616481271084073774415791623134251602538577480000800108000041762418769121158249376604081940713306903306531600102080000201600004078675118002110910800001080000108083503754462786880493246087228151081306494406500502061774407548275780000800104071040829407434073840753
800244072830500015876787801680871084079873316951480124251637028215080000800108000040136618759041167493777240809407043062333084416001020800002016000040821751180021109108000010800001080861040284761289380538238085934157981418503387600502071664407308046780000800104073040839407974070440802
80024408303060001830739787164811710040740775171518001222516040682874800008001080000401389187525616849376194071740822306523307691600102080000201600004072475118002110910800001080000108085803881434983880465252083230157581361536372300502061763407858041580000800104074740788408364072340726
800244076530510017466407481568106140407047721884168213725160256805988010980010800004010051872760129949377364088440825307263307171600102080000201600004080875118002110910800001080000108084804414471586180542255090428144681410534416400502041764407238846380000800104075540806409304084940738
80025408243051001689815824165610010840843732176615191202516057180682800008001080000401929187209212284937656408004082230643330736160010208000020160000407179111800211091080000108000010808821443175037844805362580872381514814015313720140502071674407008063080000800104078940755407684076640772
8002440751305100159978478217361121044078673417051494982516065880456800008001080000401136187434813554937667409194071030713330724160010208000020160000407839211800211091080000108000010808601635754769848805252630890321633813634933547140502071646407638058280000800104070540776407164081640714
8002440700305100177676876216641051164073176415631666123251606278041580000800108000042042818740911244493762340748407253071433068816001020800002016000040713821180021109108000010800001080865036804858852805372660873106155581402508392300502041646407748747380000800104074240838406994076240785