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

MNEG (64-bit)

Test 1: uops

Code:

  mneg x0, x0, x1
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004303323061280925100010001000161686140303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323084280925100010001000161686140303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323061280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323061280925100010001000161686040303330332676328911000100020003033296111001100001250732162228631000100030343034303430343034
1004303323061280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323061280925100010001000161686140303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323084280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303322061280925100010001000161686040303330332676328911000100020003033296111001100010732162228631000100030343034303430343034
1004303323061280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323061280925100010001000161686140303330332676328911000100020003033296111001100000732162228631000100030343034303430343034

Test 2: Latency 1->2

Code:

  mneg x0, x0, x1
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03191e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020430033224000612980925101001010010100166518614926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033225000612980925101001010010100166518604926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033225000612980925101001010010100166518604926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033225000612980925101001010010100166518614926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033225000612980925101001010010100166518614926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033224090612980925101001010010100166518614926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033225000612980925101001010010100166518604926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033224000612980925101001010010100166518614926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033225000612980925101001010010100166518614926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
1020430033224000612980925101001010010100166518604926953030033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002430033225000001506129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000006129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322400000006129809251001810010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000906129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322400000006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034
100243003322500000006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000000640216222986410000100103003430034300343003430034

Test 3: Latency 1->3

Code:

  mneg x0, x1, x0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)191e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fld unit uop (a6)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204300332250000061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000710116212989510000101003003430034300343003430034
10204300332240000061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034
10204300332250000061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000710116112986310000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002430033224336129809251001010010100101664736149269533003330033285487287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
100243003322506129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
100253003322506129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
1002430033225025329809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
100243003322506129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
100243003322406129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
100243003322506129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
100243003322506129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034
1002430033225061298092510010100101001016647361492695330033300332854832876310010100202002030033296111002110910100101000120640316332986410000100103003430034300343003430034
100243003322506129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640316332986410000100103003430034300343003430034

Test 4: throughput

Count: 8

Code:

  mneg x0, x8, x9
  mneg x1, x8, x9
  mneg x2, x8, x9
  mneg x3, x8, x9
  mneg x4, x8, x9
  mneg x5, x8, x9
  mneg x6, x8, x9
  mneg x7, x8, x9
  mov x8, 9
  mov x9, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03191e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020440052300030402580100801008010040050049369554003540035299703299938010080200160200400359011802011009910080100100000005110216114003280000801004003640036400364003640036
802044003530000402580100801008010040050049369554003540035299703299938010080200160200400359011802011009910080100100001005110116114003280000801004003640036400364003640036
8020440035300027402580100801008010040050049369554003540035299843299938010080200160296400359011802011009910080100100000205110116114003280000801004003640036400364003640036
802044003530000402580100801008010040050049369554003540035299703299938010080200160200400359011802011009910080100100000005110116114003280000801004003640036400364003640036
8020440082300012402580100801008010040050049369554003540035299703299938010080200160200400359011802011009910080100100000005110116114003280000801004003640036400364003640036
802044003530000402580100801008010040050049369554003540035299703299938010080200160200400359011802011009910080100100000035110116114003280000801004003640036400364003640036
8020440035300003452580100801008010040050049370014003540035299703299938010080200160200400359011802011009910080100100000005110116114003280000801004003640036400814003640036
802044003530000402580100801008010040050049369554003540035299703299938010080394160200400359011802011009910080100100000035110116114003280000801004003640083400364003640036
8020440035300015402580150801008010040050049369554003540035299703299938010080200160300400359011802011009910080100100002005110116114003280000801004003640036400364003640036
802044003530000402580100801008010040073049369554003540035299703299938010080200160200400359011802011009910080100100000005110116114003280000801004003640036400364003640036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fst unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
800244004129900988061258001080010800104000507049370014003540127299923300158001080020160020400359011800211091080010100000502013160121240032800000800104003640036400364003640036
800244003530000120040258001080010800104000507049369554003540035299923300158001080020160020400359011800211091080010100000502017160131440032800000800104003640036400364003640036
800244003530000000612580010800108001040005090493695540035402152999215300478001080020160020400359011800211091080010100106502010160141440032800000800104003640036400364003640036
80024400352990000040258001080010800104000506049369554003540035299923300158001080020160020400359011800211091080010100000502015160121740032800000800104003640036400364003640036
80024400353000000040258001080010800104000508049369554003540035299923300158001080020160020400359011800211091080010100000502015160151540032800000800104003640036400364003640036
80024400353000000040258001080010800104000508049369554003540035299923300158001080020160020400359011800211091080010100000502012160151640032800000800104003640036400364003640036
80024400353000000040258001080010800104000507049369554003540035299923300158001080020160020400359011800211091080010100023502011160141540032800000800104003640036400364003640036
80024400353000000040258001080010800104000507049369554003540035299923300158001080020160020400359011800211091080010100000502014160171540032800000800104003640036400364003640036
80024400353000000040258001080010800104000507049369554003540035299923300158001080020160020400359011800211091080010100000502013160121240032800000800104003640036400364003640036
80024400353000000040258001080010800104000507049369554003540035299923300158001080020160020400359011800211091080010100000502014164131040032800000800104003640036400364003640036