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

ST1 (multiple, post-index, 4 regs, 2D)

Test 1: uops

Code:

  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [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): 4.000

Issues: 5.000

Integer unit issues: 1.000

Load/store unit issues: 4.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2223243a3f464951schedule 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)5e5f60696d6emap 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 simd store (99)inst ldst (9b)l1d 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)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)? int retires (ef)f5f6f7f8fd
6400529255235215242002791810004711287810023077501010014004100140005005217750130171142843529218830500540049000290262906631610011000100040147803400411854400448460130759367693430971632007232283820235763285401000159271262014258400010002925029194291012931529334
64004292172350112102213526900046532912800230905005100140041001400850002176804017085285172917915495005400090092903128992216100110001000400718120340040039640004043246132329137681431681602028832293815156359283791000155911279614063400010002896128946290622892528891
64004289242330101000005000473628751002280050001000400010004000500021623060170292829228776310500340009000287592889911610011000100040044801400400103400048410132809441688031880581988633033817166064283221000157721292014162400010002903028937290572903228830
6400429064233010001003400046352878300228175000100040001000400050002162704017056283722890832850004000900028977289181161001100010004005680140040297400048410131469369696031571601997532083810105652284061000156071258414153400010002896328813290212893629003
6400428914233010001003500046722880700229395000100040001000400050002161301101706128303287883105000400090002879728992216100110001000400558014004010124400040410131319216699731340531992932783807176270283911000157341262813961400010002897528908289222902128988
6400429064233010100003500047802873100228305000100040001000400050002161902017039283142899131050004000900028857288351161001100010004005480140040019400040410130539327699731450551995832013815186561283601000157351257713633400010002905929075289612902328991
6400428940233010211003500046872880800228405000100040001000400050002161002017044283342896431050004000900028827288041161001100010004004500340061297400040420130799352694232182561997831773814116065282101000157451251213911400010002897028904290092895028891
64004290612320101000034000472628777202295650001000400010004000500021629000170542841628958310500040009000288682886711610011000100040054801400411114400061240013145931969733152145198343238381976861283821000156661258414206400010002894728967290182905028929
6400428987233011111003930004671288130222827500010004000100040045000216320401701528261288723105000400090002886828841116100110001000400561201400401100400268420131859189700931000621996831903818176162284131000159021274713857400010002904428940290902890828943
64004290392310121110095000468428801002282850001000400410014000500021624040170572814828934310500040049000288322888411610011000100040055120040040228400048410131299144686331780581995432093811166464282081000157401251113993400010002889328952288732904628991

Test 2: throughput

Count: 8

Code:

  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  st1 { v0.2d, v1.2d, v2.2d, v3.2d }, [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.0005

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2223243a3f46494f51schedule 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)60696b6d6emap 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 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)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? int retires (ef)f5f6f7f8fd
32020516004312400000000300001600281600254001008010032000080100320000400526735935211600170160042160040799783800244001002003200002007200001600421600421180201100991001008000080000100320000042003200000003200022051100117111600398000032000080100160043160043160055160043160043
320204160042124000000003100116002801602540010080100320000801003200004005267359352016001501600401600427998138002240010020032000020072000016004016004011802011009910010080000800001003200000420032000010532000024251100217111600398000032000080100160043160043160044160043160043
320204160042124100000003100116002701602540010080100320000801003200004701767383532016001701600541600427998138002440010020032000020072000016004016004211802011009910010080000800001003200000420032000000232000224251100217121600398000032000080100160041160041160043160044160041
320204160180128500000003001016002816160254001898010032000080100320000480499735935201600170160042160042799803800254001002003200002007200001600421600421180201100991001008000080000100320000048003200020023200020051100217221600398000032000080100160044160041160044160175160043
3202041600541240000000123000116002716160254001008010032000080100320000400526735935201600170160175160042799803800244001002003200002007200001600431600431180201100991001008000080000100320060042003200001053200620051100217221600408000032000080100160043160044160043160041160173
3202041600431240000000030001160166161612540010080100320000801003201084005267359448016001701600421600427998138002440010020032000020072000016004316004211802011009910010080000800001003200000420032000010232000204251120217221600408000032000080100160043160043160044160041160041
3202041600401241000000030010160025161612540010080129320000801003200004005267359448016001701601741600427998038002440010020032000020072000016004316004211802011009910010080000800001003200000420032000200532000224251100117121600398002932000080100160041160191160043160043160043
32020416004012850000009300001600271616125400100801003200008010032000040052673594480160017016017116004279980380022400100200320000200720000160043160040118020110099100100800008000010032006200003200020023200602051120217211600398000032000080100160041160043160041160043160044
32020416004212410000000001001600251616125400100801003200008010032000048049973593520160017016017016043279981380214400237200320120200720270160042160043118020110099100100800008000010032018020979032018009312732018224251430226211644778008732000080100160315160314160460160572160442
3202041604441244111033528267010116002701612540010080100320000801003200004005267359352016001701600421600437997838002540010020032000020072000016004216004211802011009910010080000800001003200000420032000010332000004251120217211600378000032000080100160043160044160043160041160041

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)18191e1f233a3f46494f51schedule 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)60696d6emap 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 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)ea? ldst retires (ed)? int retires (ef)f5f6f7f8fd
32002516045812411101001020116412216162961074002778009732012080126320216444876736960401602741605341604488014514802924004212032048020720000160052160054118002110910108000080000103200141544013200160217320002164414050204176616005180000032000080010160053160054160054160053160053
320024160054124110000017011600371616625400010800103200008001032000040006973599560160039160053160063800013800344000102032000020720000160054160052118002110910108000080000103200151444013200160019320000164414050207177716006080000032000080010160055160055160055160055160065
320024160054124111000018011600391616225400010800103200008001032000040006973600280160029160052160054799923800454000102032000020720000160053160052118002110910108000080000103200151442003200160016320002164414150207177716005180000032000080010160064160065160064160053160055
320024160053124111100020011600421616025400010800103200008001032000040006973600040160027160052160063800313800354000102032000020720000160054160054118002110910108000080000103200141444003200160018320002164414150207177716004480000032000080010160055160055160065160064160056
32002416059712421100102411011600391616125400010800103200008001032000040006873600280160029160047160054799853800304000102032072020722700160054161607121800211091010800008000010320015164400320016011832000216014050205177516006080000032000080010160325160055160191160055160063
32002416005412411000015017011600461616249400010800103200008001032000047440173599080160030160054160047799853800364000102032000020720000160197160184218002110910108000080000103200141444003200160014320002164414150207167516004980000032000080010160055160055160055160055160055
32002416005212411000001901160039160125400010800103200608001032000040006973600040160029160052160047799853800344000102032000020720000160054160052118002110910108000080000103200141444003200161117320002164414050207177516005280000032000080010160450160463160320160451160324
320024160591124312212501631870116056316162211024003668006832018080097320324453857737439201603831603121604548014833804284005582032000020720000160047160052118002110910108000080000103200151544113200160224320002164414150207177716004480000032000080010160316160313160187160054160053
3200241600471241100001219011600391616125400010800103200008001032000047996473600280160264160315160323799903800364000102032000020720000160131160054118002110910108000080000103200151444013200160121320002164414050207177516004980029032000080010160055160055160048160055160056
32002416005412411000013210750116003901622540001080010320000800103200004000697360004116002916004716004779993380037400010203200002072000016004716005411800211091010800008000010320015144400320014001932000216441405020717571600518000010732000080010160125160055160048160055160055