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

ST3 (multiple, post-index, 16B)

Test 1: uops

Code:

  st3 { v0.16b, v1.16b, v2.16b }, [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): 6.000

Issues: 7.000

Integer unit issues: 1.000

Load/store unit issues: 3.000

SIMD/FP unit issues: 3.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)18191e1f24373a3f464951schedule 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 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)c2cfd0d2l1i 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
660082887723220200010013230046882872233167857000100030003000100130003000500033060288061624082285712876931070003000300070009000287992875911610011000100030002003000000300037001329194556986313303519606323438111335372830710001561512247136673000300010002880128822287692875328680
66004287332300101111000400475328747331668870001000300030001000300030005000330112400016227152848328614310700030003000700090002876028657116100110001000300839030030233000311321304893446921318803719651324438071637382833410001583312101139743000300010002879128712287992885128882
6600428830231010210100040047342872533166937000100030003000100030003000500033026240001122773286272873931070003000300070079000286862876111610011000100030000603000000300006001326893596921315103819635326738101833362843010001594412315140483000300010002913429022290992900329028
6600429009233100001000020047612854202167437000100030003000100030003000500033040240001222701285622871731070003000300070009000287202875111610011000100030000603000001300000001310294147027316003819499318538201431322829110001522112230136593000300010002868028819285982868928590
660042881523100000000000004732286470316614700010003000300010003000300050003303324000172268028460287783107000300030007000900028837289061161001100010003000060300010030000600131769608697232050421958832073817738352818910001545312239136013000300010002884428798288382891928584
6600428879230001000000010047092853703170257000100130033003100030003000500033042240001422694284782869631070003000300070009000286912878011610011000100030000603000000300006001306093546972321403719315314438131339392818910001560812174135283000300010002884928929288102888028793
660042888323100000000001004716285733216655700010003000300010003000300050003303624000132272228613287733107000300030007000900028670288171161001100010003000060300100330011600131569426690331460371959532493811936392834310001564012539139693000300010002890928830287502871528937
6600428797231000000000122004697287270316615700010003000300310003000300050003300024000522619285102877131070003000300070009000288912872321610011000100030000603000001300000001308395166951315404219697331338142235362843610001571612577140173000300010002873128827289202873229057
66004286932320001000011210047312911432171527000100030003000100030003000500033042240001022678283972880891070003000300070009000285242852311610011000100030000603000000300000001333397276943320703919307317338101035432816910001503612192137653000300010002851828480286652847628585
6600428520221000010000010046012973823165767000100030003000100030003000500033025240001022793284422861732470003000300070009000285602864811610011000100030000003000003300007001337094796911326003519364323838171234342816010001536512055131783000300010002862328459285672878028581

Test 2: throughput

Count: 8

Code:

  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [x6], x8
  st3 { v0.16b, v1.16b, v2.16b }, [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.5005

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f222324373a3f46494f51schedule 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)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
480208120043930000000000006422012065016009256733380100252127240000801002400002400004804995519567194713401200211200421200433998434002556010020024000024000020056000072000012004212004311802011009910010080000800001002400000420024000200524000224200000511000117121200408000024000024000080100120044120044122797121262120043
48020412005393100000003000428701200390160255634358010024780024000080100240000240000480499551956719330400120021120043120043400773400255601002002400002400002005600007203601200431200431180201100991001008000080000100240000044002400020022400022000000511000217121200498000024000024000080100120053120055120208120062120055
480204120052931100100020000360811200401616025561434801002469392400008010024000024000048049655198601944125012002712005212020739991340034560100200240000240000200560000720000120052120061118020110099100100800008000010024007715440024001600192400021644140100511000217211200598000024000024000080100120055120208120053120055120055
4802041200629311011100180004536112003716161255710168010024454624000080100240000240000480496551983119451970120028120052120054399993400335601002002401202400002005600007200001200541200621180201100991001008000080000100240014144421240016002124006224200000511000217121200408000024000024000080100120043120044120044120044120044
4802041200429320000000300055340120040161602556584080100245433240000801392400002400004804995519567195656001200211200431200433998434002456010020024000024000020056000072000012004212004311802011009910010080000800001002400000420024000200224000224200000511000217121200408000024000024000080100120044120044120045120044120044
4802041200449310000001291000999701206571616048566537801004007352400008010024000024000048073155195671944853012002112004212004339984340025560100200240000240000200560000720000120043120200118020110099100100800008000010024001604250024000200024000224200000511000225211200428000024000024000080100120044120044120044120199120045
4802041200439310010000300099980120045161602556629080100245000240000801002400002400004804995519567193581701200211201961200433998434002556010020024192024480020856252072000012004312004311802011009910010080000800001002400000420024000200224000204200000511000217211200408000024000024000080100120044120201120044120044120044
48020412004393000000000000996501200460160255643888010024571524000080100240000240000480499551956719478250120021120043120043399843400255601002002401202400002005600007200001200431200431180201100991001008000080000100240000000024000200224000224200000512200217211201848000024000024000080100120043120044120045120044120044
480204120043930000000123000885201200380002556297480100243843240000801002400002400004804995519567195939501200211200431200433998434002556010020024000024000020056000072000012004312004321802011009910010080000800001002400000420224000200324000224200000511000225121200398000024000024000080100120044120043120199120044120044
480204120042931000001123000713201200380160255651038010024525524000080100240000240000480499551956719542780120021120133120042399843400255601002002400002401202005600007200001200421200431180201100991001008000080000100240000042002400021052400622000000511000117111201838000024000024000080100120043120043120044120044120043

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)09l2 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)a4st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0ld nt uop (e6)? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
48002812005393100000012400068561200291616191872556672780010243352240000800102400002400004800495519567195153701200271200441200433998434004556001020240120240000205600007200001200431200431180021109101080000800001024000004202400020002400621642050204174612004008000024000024000080010120044120044120044120044120043
480024120043931000000123000713712002816160255664378001024728124000080010240000240000480049551956719605880120021120043120042399843400355600102024000024000020560000720000120043120043118002110910108000080000102400000420240002402240002200050206173312004008000024000024000080010120044120044120044120043120044
48002412004393000000000000557712002801602556716080010249275240000800102400002400004800495519567194683001200261201351200423998434002456001020240000240000205600007200001200431200431180021109101080000800001024000004602400020022400021642050205174412004008000024000024000080010120045120044120044120044120044
48002412004393000000012910006430120028161604756477180010247144240000800102400002400004800495519567195429601200211200421200433998434002556001020240000240000205600007200001200431201991180021109101080000800001024000004252240002006240002200050205176412004008000024000024000080010120044120044120044120201120044
48002412004293100100003000927112002701602556905480010244005240000800102400002400004800495519567193430301200211201981200433998434002556001020240120240000205600007200001200431200441180021109101080000800001024000004202400020011240002200050204176412018408000024000024000080010120044120044120044120044120044
480024120043932000000340005956120028161602556644180010245721240000800492400002400004800495519567195718001200211200431200433998434002556001020240000240000205600007200001200431200431180021109101080000800001024000004202400020422400021642050205175612004008000024000024000080010120044120044120044120044120044
4800241200439310000000300097111200281616932556453480010245727240000800102400002400004800495519567195515101200211200431200424007634002556001020240000240000205602807200001200431200431180021109101080000800001024000004202400020022400022042050205173512004008000024000024000080010120044120044120044120199120044
4800241200429310000002401008721120028161602556572380010247881240000800102400002400004800495519567195932601200211201981200433998434002556001020240000240120205600007200001200431200431180021109101080000800001024000004202400021022400621642050205174612004008000024000024000080010120044120044120044120044120044
4800241200439310000002130009282120028161602556972180010246429240000800492400002400004800495519567194622001200211200431200433998434002656001020240000240000205600007200001200431200431180021109101080000800001024000000024000200142400021642050206175512004008000024000024000080010120044120044120044120044120044
4800241200439310000001230007138120028161602556715780010248572240000800102400002400004800495519567194509501200211200431200433998434002556001020240000240000205600007200001200431200431180021109101080000800001024006004202400000052400021642050205174512004008000024000024000080010120045120043120044120044120044