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

ADC (64-bit)

Test 1: uops

Code:

  adc 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
10041035806191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
10041035706191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110000673127119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110000373127119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
100410357156191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
10041035806191725100010001000622501103510358053882100010003000103510411100110001073127119901000100010361036103610361036
10041035808291725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  adc 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)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)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
102041003575000103992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610082
10204100357600061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
102041003575000619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001002049071012711999210000101001003610036100361003610036
10204100357501061992025101001010010186647152049695510035100358656787321010010200302001003510221102011009910010100100000071012711999210044101001003610036100361003610082
102041003575001261992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357510061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000371012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu 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)9fl1d cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064042755999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064062765999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064062766999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064052754999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064052755999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064052765999310000100101003610036100361003610036
100241003575009619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064062765999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064062756999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064062765999310000100101003610036100361003610036
100241003576000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101000064042765999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  adc 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)03l1i tlb fill (04)3f4d51schedule 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)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
1020410035751619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000060071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357504809920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357605909920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000003071012711999210000101001003610036100361003610036
1020410035780619920251010010100101006471521496955100351003586563873210100102003020010080102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357504419920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064062756999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064062766999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064062746999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064052766999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064052755999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064042756999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064052755999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064062765999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064052746999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064062765999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  adc x0, x1, x2
  tst x0, 1
  mov x0, 1
  mov x1, 2
  mov x2, 3

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)3f4d51schedule 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 int alu (97)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500611992625202002020020200129765014916955020035200351740631748120200202004020020035104112020110099201000001310228221999220100101002003620067200362003620036
20204200351500611992625202002020020200129765014916955020035200351740631748120200202004020020035104112020110099201003001310228221999220100101002003620036200812003620082
20204200351610611992625202002020020200129827814916955020035200351740631748120200202004020020035104112020110099201000011310228221999220100101002003620036200362003620036
20204200351500611992625202002022220200129765014916955320035200351740631748120200202004020020035104112020110099201001301310228221999220100101002003620036200362003620036
20204200351500611992625202002020020200129765014916955020035200351740631748120200202004020020035104112020110099201000001310228221999220100101002003620036200362003620036
20204200351560611992625202002020020200129765014916955020035200351740631748120200202004020020035104112020110099201000001310228221999220100101002003620036200362003620036
20204200351500611992625202002020020200129765014916955020035200351740631748120200202004020020035104112020110099201000901310228221999220100101002003620036200362003620036
202042003515006119926252020020200202001297650149169550200352003517406317481202002020040200200351041120201100992010018001310228221999220100101002003620036200362003620218
202042003515006119926252020020200202001297650149169550200352003517406317481202002020040200200351041120201100992010053001310228221999220100101002003620036200362003620036
20204200351500611992625202002020020200129765014916955020035200351740631748120200202004020020035104112020110099201000001310228221999220100101002003620036200362003620036

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)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 int alu (97)l1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200100000312700427111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200100000012700127111999520010100102003620036200362003620036
2002420035150010611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200100000312700127211999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200100000312700127111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200100000912700127211999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200100000012700127111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200100000012700127111999520010100102003620036200362003620036
2002420035150100611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200100000312700127112009320010100102003620036200362003620036
200242003515000072619918252002020020200201297297149169552003520035174283175042002020020400202003510411200211092001000001512700127111999520010100102003620036200362003620036
20024200351870004411991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200100000612700127111999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  adc x0, x8, x9
  adc x1, x8, x9
  adc x2, x8, x9
  adc x3, x8, x9
  adc x4, x8, x9
  adc x5, x8, x9
  adc x6, x8, x9
  adc 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.3342

retire uop (01)cycle (02)03191e1f3f51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267942000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100095110419432673280000801002673726737267372673726737
80204267362010003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100005110419442673280000801002673726737267372673726737
80204267362000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100005110419352673280000801002673726737267372673726737
80204267362000003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100005110519542673280000801002673726737267372673726737
80204267362010003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100005110419442673280000801002673726737267372673726737
80204267362000003625801008010080100479799149237452673626736166723166918010080200240200267366611802011009910080100100005110419442673280000801002673726737267372673726737
80204267362000003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100005110419442673280000801002673726737267372673726737
80204267362000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100005110519242673280000801002673726737267372673726737
80204267362000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100005110419442673280000801002673726737267372673726737
80204267362000003625801008010080220479799149236562673626736166723166918010080200240200267366611802011009910080100100005110319442673280000801002673726737267372673726737

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3a3f51schedule 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 miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426724200000000000321258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800101000010050207181662670280000800102670726707267072670726707
80024267062070000000004162580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001010000103502016181662670280000800102670726707267072670726707
8002426706200000000000362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001010000100502016186162670280000800102670726707267072670726707
8002426706200000000000362580010800108001047205904923626267062670616665316684800108002024002026706661180022109108001010000008750206186162670280000800102670726707267072670726707
800242670620000000000036258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800101000000050206181662670280000800102670726707267072670726707
800242670620000002300036258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800101000010050206181662670280000800102670726707267072670726707
8002426706200000000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001010000400502016181662670280000800102670726707267072670726707
8002426706200000000000362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001010000400502016181662670280000800102670726707267072670726707
8002426706200000000000362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001010000003502016186162670280000800102670726707267072670726707
8002426706200000000000362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001010100100502016181362670280000800102670726707267072670726707