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

MUL (64-bit)

Test 1: uops

Code:

  mul 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)033f4d51schedule 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
100430332361280925100010001000161686140303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676329071000100020003033296111001100000732162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676328911000100020003033296111001100013732162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
1004303323310280925100010001000161686040303330332676328911000100020003033296111001100000733162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
100430332361280925100010001000161686140303330332676328911000100020003033296111001100000732162228631000100030343034303430343034
100430332361280925100010001000161686040303330332676328911000100020003033296111001100000732162228631000100030343034303430343034

Test 2: Latency 1->2

Code:

  mul 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)03mmu table walk data (08)l2 tlb miss data (0b)181e3f4d51schedule 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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102043003322500006129809251010010100101001665186049269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322500006129809251010810100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322500009129809251010010100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
10204300332250001821529809251010010100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322400206129809251010010100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322500006129809251010010100101001665186049269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322500006129809251010010100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322500006129809251010010100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034
102043003322500006129809251010010100101001665186149269530300333003328526328741101001020020200300332901110201100991001010010003710116112986310000101003003430034300343003430034
102043003322500006129809251010010100101001665186049269530300333003328526328741101001020020200300332901110201100991001010010000710116112986310000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03mmu table walk instruction (07)1e3f4d51schedule 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 cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002430033225096129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
10024300332250366129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
100243003322503216129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
10024300332250336129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
100243003322502646129809251001010012100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640316342986510002100103003430034300343003430034
1002430033225006129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
10024300332250336129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
1002430033225006129809251001010010100101664736149269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034
10024300332250246129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100001640216222986410000100103003430034300343003430034
10024300332250156129809251001010010100101664736049269533003330033285483287631001010020200203003329611100211091010010100000640216222986410000100103003430034300343003430034

Test 3: Latency 1->3

Code:

  mul 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)03181e1f3f4d51schedule 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)acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102043003322400061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
1020430033225000726298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322400061298094710100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
1020430033225000251298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
10204300332250001127298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102053003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)031e1f3f4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100243003322572061298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010000640416442986410000100103003430034300343003430034
100243003322436061298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010000640516552986410000100103003430034300343003430034
1002430033225240251298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010000640516552986410000100103003430034300343003430034
1002430033225150726298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010000640516552986410000100103003430034300343003430034
10024300332253061298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010000640516652986410000100103003430034300343003430034
1002430033224270284298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010000640516552989710000100103003430034300343003430034
100243003322524061298092510010100101001016647364926953300333007628548728763100101009420020301202961110021109101001010010640516562986410000100103003430034300343003430034
100243003322418061298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010013640516552986410000100103003430034300343003430034
100243003322500536298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010403659616662986410000100103003430034300343003430034
1002430033225360500298092510010100101001016647364926953300333003328548328763100101002020020300332961110021109101001010010640616562986410000100103003430034300343003430034

Test 4: throughput

Count: 8

Code:

  mul x0, x8, x9
  mul x1, x8, x9
  mul x2, x8, x9
  mul x3, x8, x9
  mul x4, x8, x9
  mul x5, x8, x9
  mul x6, x8, x9
  mul 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)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)0e18191e1f3f51schedule 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
8020440048300000050000432580100801008010040050014936955400354012529970329993801008020016020040035901180201100991008010010000000305110225134003280000801004003640036400814003640082
802044003530001000000023092580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
8020440035300000000000402580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
80204400352990000000004202580100801008010040050014936955400824003529970329993801688024816020040035902180201100991008010010000020095110116114003280000801004003640036400364003640036
8020440035300000000000432580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
80204400353000000000120402580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
802044003530000000009012722580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
802044003530000000000021312580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
8020440035300000000000402580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004003640036400364003640036
8020440035300000000000432580100801008010040050014936955400354003529970329993801008020016020040035901180201100991008010010000000005110116114003280000801004008040036400364003640036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)18191e1f3f5051schedule 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)9fl1d tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
800244004130000010000404001925800108001080010400050404936955400354003529992330015800108002016002040035901180021109108001010000050201616121040032800000800104003640036400364003640036
80024400353000002000051502580010800108001040005040493695540035400352999233001580010800201600204003590118002110910800101000005020101691340032800000800104003640036400364003640036
8002440035300000100004002580010800108001040005041493695540035400352999233001580010800201600204003590118002110910800101000005020111671240032800000800104003640036400364003640036
8002440035299000100004002580010800108001040005031493695540035400352999233001580010800201600204003590118002110910800101000005020716131040032800000800104003640036400364003640036
80024400353000000000040025800108001080010400050314936955400354003529992330015800108002016002040035901180021109108001010001050201316131240032800000800104003640036400364003640036
8002440035300000100004002580010800108001040005030493695540035400352999233001580010800201600204003590118002110910800101000005020121681140032800000800104003640036400364003640036
80024400352990001000040025800108001080010400050314936955400354003529992330015800108002016002040035901180021109108001010000050201216111240032800000800104003640036400364003640036
8002440035300000000004002580010800108001040005031493695540035400352999233001580010800201600204003590118002110910800101000005020916111040032800000800104003640036400364003640036
8002440035300000000004002580010800108001040005031493695540035400352999233001580010800201600204003590118002110910800101000005020111681040032800000800104003640036400364003640036
8002440035300000000004002580010800508001040005031493695540035400352999233001580010800201600204003590118002110910800101000005020111671140032800000800104003640036400364003640036