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

ST2 (multiple, post-index, 8B)

Test 1: uops

Code:

  st2 { v0.8b, v1.8b }, [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): 2.000

Issues: 3.000

Integer unit issues: 1.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2223243a3f464951schedule 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)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)c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)dfe0? int output thing (e9)eaebec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
62006286442231717000010004849285190117680300010001000100010001000100050001089980001621633283812868531030001000100030002000285442856811610011000100010000100000100003013277962970033120848199613173380719405022810010001555812646136831000100010002864728793286432867328648
620042860522315160000100045842839011177453000100010001000100010001000500010907800012216492840928693310300010001000300020002861928576116100110001000100001000001000030130349358694331931042200293230381121413922818010001575012545136051000100010002875328693285982854728588
62004287012221713000010004846285691117647300010001000100010001000100050001090880001721720284122859031030001000100030002000285562863311610011000100010000100000100003013156950469253157542200693216380721353822818410001565912785136781000100010002875028633286992864428643
6200428757223162200090000471028569111761230001000100010001000100010005000109038000721673284662867431030001000100030002000286562865311610011000100010003100000100003013193948369213237841201043132381523414222813610001563912604136531000100010002862028673286222875828658
62004286792231422000010004616286011117530300010001000100010001000100050001091080001821712284682849531030001000100030002000286332871511610011000100010003100000100003013258950269753169943199523162380715363822815310001531512752135951000100010002863328571285602852928793
620042863022217150000100047332851511176653000100010001000100010001000500010904800018216482842028632310300010001000300020002817628518116100110001000100031000001000000133089512697431381052201003202381416404022816010001540112604134041000100010002862528706287042854928552
62004286332221916000010004767285711017674300010001000100010001000100050001090180001621660284212865631030001000100030002000286362860211610011000100010000100000100003013112943468823219944200443202380919444222827110001553812704137161000100010002868728619286362856428601
62004287462231718004011004939285710117727300010001000100010001000100050001090480001721676285182874531030001000100030002000285602861711610011000100010000100000100003013050940268773131946200553192380118434822819910001541612458134301000100010002863128721286972871128727
62004286092222016000010004778285421117721300010001000100010001000100050001089880001821706283882872931030001000100030002000285742859411610011000100010000100000100003013099944169073168745199083228380416424122815410001541912803137841000100010002864128600286002868628598
620042858622211140000110047132846901176473000100010001000100010001000500010910800092170928412286673103000100010003000200028679284721161001100010001000310000010000311413129945968903223545199883054381213484322818810001543012703134491000100010002865028675285302869028642

Test 2: throughput

Count: 8

Code:

  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [x6], x8
  st2 { v0.8b, v1.8b }, [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): 1.0005

retire uop (01)cycle (02)0309l2 tlb miss data (0b)18191e1f222324373f46494f51schedule 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)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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020680535647104552844000015968039188290109246008805608240380240805658046480324436372337714126475170804278052380537601093460332241460200804788072720224179716096080407805305180201100991001008000080000100802400178528024110429780301119451791431180458800008000080000801008004180164800418004180041
1602048004064300001323100176580025080252408248010081184800008021680000800004359014375884864220908001580040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000017008000100280001117051101161180037800938000080000801008004180041800418004180041
1602048004064300100300022980025883252443378010084222800008021680000800004359014375884864262408001580161801635992413599982401002008012080000200240000160000800408004011802011009910010080000800001008000001700800010008000100051101161180037800008000080000801008016480041800418004180164
16020480040643000002000175980025883252402328010086043800008021780000800004359014375884864241008001580040800405992435999824010020080000800002002400001600008004080040118020110099100100800008000010080000017008006100080001017051101161180140800008000080000801008004180041800418004180041
16020480165642000012300013580025881252416388010081482800008010080000800004359014375884864039708001580040800405992435999824010020080000801202002400001600008014680040118020110099100100800008000010080060017008000100380001117051101161180037800008000080000801008004180041800418004180041
160204800406430000091000181800258832524232980192834348000080100800008000043590143758848642885080015800408004059924155999824010020080000801202002400001600008004080040118020110099100100800008000010080000017008000100080001117051101161180037800908000080000801008004180041801618004180041
160204800406430000040008518002500325245277801008028980000801008000080000435901437588486565280801208004080040599883599982401002008000080120200240000160000800408004011802011009910010080000800001008000021700800011238000100051101161180037800008000080000801008004180041800418016380041
1602048004064301001200009980025881252427798010080137800008010080116800004359014375884865522608001580161800405992435999824010020080000800002002400001600008004080162118020110099100100800008000010080062017008000100280061117051101161180037800008000080000801008004180041801648004180041
160204800406430000000004295800258871252452658010081763800008010080000800004359014375884864025808001580040800405992435999824010020080000800002002400001602408004080040118020110099100100800008000010080000017008000100280001017051101161180037800938000080000801008004180041800418016380041
16020480040643000000010116080025082542416458010083403800008010080000800004361527375884865273808001580040800405992436008324010020080120800002002400001600008004080040118020110099100100800008000010080000017008000110680001117051271251080037800008000080000801008004180041800418004180041

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2223373a3f46494f51schedule 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)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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002680040620110000090037561800251102252409278001080005800008001080000800004358417375884864770908001580040800406000736002024001020800008000020240000160000800408004011800221091010800008000010800078250080008001480001825715020101612680037800008000080000800108004180041800418004180041
16002480040621120000129001154180025110625243802800108485680000800108000080000435840537588486512680800158016280040599463600202400102080000800002024000016000080040800401180021109101080000800001080007725018000801148000182571502011169980037800008000080000800108004180041800418004180041
1600248004062010000013814008401800251107625242579800108000680000800108000080000435841737588486434410800158004080040599463600202400102080000800002024000016024080040800401180021109101080000800001080007725008000811780001826705020101613880037800008000080000800108004180041800418004180041
16002480040620100000090056351800251111225241158800108413780000800108000080000435841337588486434440800158004080040599463600202400102080000800002024000016000080040800401180021109101080000800001080008725008000811880001825705020101610980037800008000080000800108004180041800418004180041
160024800406201000000120092018075301122524003280010813788000080010800008000043584173758848646211080015800408004059946360020240350208000080000202400001600008004080040118002110910108000080000108000770018000800148006182571502010169980037800008000080000800108004180041800418016380041
1600248004062010000009001724180025111122524214780010800098000080010800008000043584053758848642769080015800408004059946360020240010208000080000202400001600008004080040118002110910108000080000108000870008000801148000180705020101691080037800008000080000800108004180041800418004180041
160024800406201000000100005692180025101178252456418001081721800008001080000800004358405375884864767408011880040800405994636002024001020800008000020240000160000801628004011800211091010800008000010800079250180008001180001725715020101691080037800008000080000800108004180041800418004180041
160024800406201100000900922180025111122524003280010837558000080010800008000043584093758848644404080015800408004059946136002024001020800008000020240000160000800408004011800211091010800008000010800077252818000800118000182570502091610980037800008000080000800108004180041801648004180041
160024800406201000000900114718002511112252437668001081148800008001080000800004358405375884864416708001580040800405994636010424001020800008000020240000160000800408004011800211091010800008000010800077290080008011180001825705020101610980037800008000080000800108004180041800418004180041
160024800406211001100700176918002511112252414758001081392800008001080000800004358405375884864274808011880040800405994636002024001020800008000020240000160240800408004011800211091010800008000010800088250080008001180001825705020101612880037800008000080000800108004180041800418004183464