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

ADDS (register, 64-bit)

Test 1: uops

Code:

  adds 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)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap 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
1004103580619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103580619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103570619172510001000100062250110351035805388210001000200010354011100110001073127119931000100010361036103610361036
10041035701069172510001000100062250010351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103580619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103580619172510001000100062250110351035805388210001000200010354011100110008073127119931000100010361036103610361036
1004103580619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103570619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103580619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036
1004103570619172510001000100062250110351035805388210001000200010354011100110000073127119931000100010361036103610361036

Test 2: Latency 1->2

Code:

  adds x0, x0, x1
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)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)9fl1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750000619920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010060371022711999510000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020020200100354011102011009910010100100200371012711999510000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732102861020020200100354011102011009910010100100130071012711999510000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020020200100354011102011009910010100100120371012711999510000101001003610036100361003610036
10204100357510015619920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010080071012711999510000101001003610036100361003610036
10204100357500006199202510100101001010064715204969551003510035865638732101001020020200100354011102011009910010100100120671012711999510000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020020200100354011102011009910010100100150671012711999510000101001003610036100361003610036
1020410035760001263199202510100101001010064715214969551003510035865638732101001020020200100354011102011009910010100100130371012711999510000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020020200100354011102011009910010100100220371012711999510000101001003610036100361003610036
10204100357600006199202510100101001010064715204969551003510035865638732101001020020200100814011102011009910010100100110672812711999510000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss data (0b)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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010016364022722999710000100101003610036100361003610070
100241003575000061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036
100241003575000061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036
100241003575000661991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036
100241003575000061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036
10024100357500027361991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101005364022722999710000100101003610036100361003610036
100241003575000061991825100101001010010647246049695510035100358678387541001010020200201003540111002110910100101000964022722999710000100101003610036100361003610036
100241003575000061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036
100241003575000061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036
100241003575000061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101000064022722999710000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  adds x0, x1, x0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap stall dispatch (70)flags prf full (73)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 miss (a1)st unit uop (a7)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100001071012711999510000101001003610036100361003610036
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100004071012711999510000101001003610036100361003610036
10204100357536199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100000071012711999510000101001003610036100361003610036
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100000671012711999510000101001003610036100361003610036
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100005071012711999510000101001003610036100361003610036
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100000071012711999510000101001003610036100361003610134
1020410035750619920251010010100101006471524969551003510035865603873210100102002020010035401110201100991001010010000289371012711999510000101001003610036100361003610036
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100000071012711999510000101001003610036100361003610036
10204100357506199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100001071012711999510000101001003610036100361003610036
10204100357606199202510100101001010064715249695510035100358656038732101001020020200100354011102011009910010100100000071012711999510000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)091e3f4d51schedule 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 cache writeback (a8)a9acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010100064042743999710000100101003610036100361003610036
100241003576000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010000064042744999710000100101003610036100361003610036
1002410035750006199182510010100101001064724614969551003510035867838754100101002020020100354011100211091010010100000640427441003110000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010000064042743999710000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010200064042744999710000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010000164042744999710000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010000064042734999710000100101003610036100361003610036
100241003575006619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010300064042744999710000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010000064032743999710000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010000064042734999710000100101003610036100361003610036

Test 4: Latency 4->2

Chain cycles: 1

Code:

  adds x0, x1, x2
  cset x1, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)033f4d51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515061199302520100201002011212972331491695520035200351742571748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742581748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742571748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742581748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742571748620112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520074200351742571748620112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742571748620112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742571748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
2020420035150611993025201002010020112129723314916955200352003517425817486201922022430236200356411202011009910020100101000541111319162001220000201002003620036200362003620036
202042003515061199302520100201002011212972331491695520035200351742571748620112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500611991825200102001020010129724704916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242003515006311991825200102001020010129724704916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
20024200351500611991825200102001020010129724714916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242003515002331991825200102001020010129724714916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242003515002101991825200102001020010129724714916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242008015006421991825200102001020010129724714916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242003515001241991825200102001020010129724704916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242003515001031991825200102001020010129724704916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
200242003515001241991825200102001020010129724704916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036
20024200351500821991825200102001020010129724704916955200352003517428317504200102002030020200356411200211091020010100100001270227221999520000200102003620036200362003620036

Test 5: Latency 4->3

Chain cycles: 1

Code:

  adds x0, x1, x2
  cset x2, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500611993025201002010020112129723314916955200352003517425717485201122022430236200356411202011009910020100101000011113191162001220000201002003620036200362003620036
20204200351509611993025201002010020112129723314917001200352003517425717486201122032030236200356411202011009910020100101000011113190162001220000201002003620036200362003620036
20204200351500116819930252010020100201121297233149169552003520035174258174852011220224302362003564112020110099100201001010063311113200162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425717485201122022430236200356411202011009910020100101000011113190162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425817485201122022430236200356411202011009910020100101000011113190162001220000201002003620036200362003620036
2020420035150010519930252010020100201121297233149169552003520035174257174862011220224302362003564112020110099100201001010050311113190162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425717486201122022430236200356411202011009910020100101000011113200172001220000201002003620036200362003620036
2020420035150010701993025201002010020112129794214916955200352003517425717485201122022430236200356411202011009910020100101000011113190162001220000201002003620036200362003620036
202042003515006119930252010020100201121297233149169552003520035174258174852011220224302362003564112020110099100201001010033311113200162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425717486201122022430236200356411202011009910020100101000011113190162001220000201002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)090e1e3f4d51schedule 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)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
20024200351500000611991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
200242003515000002211991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
200242003515000140611991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
200242003515000001261991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
200242003515000006119918252001020010200101297247491695520035200351742831750420010200203002020035641120021109102001010010058001270227221999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036
200242003515000001511991825200102001020010129724749169552003520035174283175042001020020300202003564112002110910200101001000001270227221999520000200102003620036200362003620036

Test 6: throughput

Count: 8

Code:

  adds x0, x8, x9
  adds x1, x8, x9
  adds x2, x8, x9
  adds x3, x8, x9
  adds x4, x8, x9
  adds x5, x8, x9
  adds x6, x8, x9
  adds x7, x8, x9
  mov x8, 9
  mov x9, 10
  mov x10, 11

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap stall dispatch (70)flags prf full (73)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)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042676420001192580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110319222673180000801002673626736267362673626736
802042673520101192580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
80204267352000352580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
802042673520004692580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
80204267352000352580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
80204267352000352580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
802042673520101822580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
802042673520001732580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
80204267352000352580165801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736
8020426735200028482580100801008010040050014923655026735267351667203166908010080200160200267353911802011009910080100100000005110219222673180000801002673626736267362673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)091e3f51schedule 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)9fbranch cond mispred nonspec (c5)cfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426720200000146258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200918562670280000800102670626706267482670626706
8002426705200000119258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200518562670280000800102670626706267062670626706
800242670520000035258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200818772670280000800102670626706267062670626706
800242670520000035258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010150200518562670280000800102670626706267062670626706
800242670519900079258001080010800104003814923625267052670516665316683800108002016002026705391180021109108001010050200518562670280000800102670626706267062670626706
800242670520000035258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200618652670280000800102670626706267062670626706
800242670520000035258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200618562670280000800102670626706267062670626706
800242670520000035258001080010800104000504923625267462670516665316683800108002016002026705391180021109108001010050200618662670280000800102670626706267062670626706
8002426705200000182258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200518562670280000800102670626706267062670626706
8002426705200000448258001080010800104000504923625267052670516665316683800108002016002026705391180021109108001010050200618752670280000800102670626706267062670626706