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 (32-bit)

Test 1: uops

Code:

  adc w0, w0, w1
  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)0318191e3f4d51schedule 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
10041035811061917251000100010006225001035103580538821000100030001035104111001100006373227119901000100010361036103610361036
1004103570006191725100010001000622500103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580006191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103570006191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580006191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103570006191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580006191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580006191725100010001000622501103510358053882100010003000103510411100110000373127119901000100010361036103610361036
1004103570066191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580006191725100010001000622501103510358053882100010003000103510411100110000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  adc w0, w0, w1
  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)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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750008299202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010000071012711999210000101001003610036100361003610036
1020410035750006199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010000071012711999210000101001003610036100361003610036
1020410035750906199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010020971012711999210000101001003610036100361003610036
102041003575051010599202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010000071012711999210000101001003610036100361003610036
10204100357506606199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010000071012712999210000101001003610036100361003610036
102041003575029106199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010000071012711999210000101001003610036100671003610036
102041003575045606199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010000071012711999210000101001003610036100361003610036
10204100357605106199204510100101001010064715214969991012610081867868758102011020030200100351021110201100991001010010000071012711999210000101001003610036100361003610036
10204100357503006199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010000071012711999210000101001003610036100361003610036
10204100357503906199202510173101001010064715214969551003510035865638732101001020030200100351021110201100991001010010000071012711999210035101001003610036100361003610036

1000 unrolls and 10 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)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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032722999310046100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357502519918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357501249918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
1002410035750829918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  adc w0, w1, w0
  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)18191e1f3f4d51schedule 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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500000061992025101001010010100647152496955100351003586563873210100102003046610035102111020110099100101001000000073012711999210000101001003610036100361003610036
10204100357510000061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610081
1020410035750001128861992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
102041003577000012061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
102041003575000018061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
102041003575000027061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012712999210000101001003610036100361003610036
10204100357500009061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071013511999210000101001003610036100361003610036
102041003575000018061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
102041003575000018061992025101001010010100647152496955100351003586563873210271102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357500006061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001000000071012711999210000101001003610036100361003610036

1000 unrolls and 10 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)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
1002410035750619918251001010010100106472464969551003510035867838754101031002030020100351041110021109101001010064062733999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036
1002410035750619918251001010010100106472464970011007910035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036
10024100357504739918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610081
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100801041110021109101001010064032733999310000100101003610036100361003610036
1002410035760619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010064032733999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  adc w0, w1, w2
  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)031e1f3f4d51schedule 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 cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201002701531310228221999220100101002003620036200362003620036
20204200351500352611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010027201310228221999220100101002003620036200362003620036
2020420035150006119926252020020200202001297650149169552003520035174063174812020020200402002003510411202011009920100001021310228221999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010000301310228221999220100101002003620036200362003620036
20204200351500061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201000001310228221999220100101002003620036200362003620036
20204200351500061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201000031310228221999220100101002003620036200362003620036
20204200351500061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201004031310217221999220100101002003620036200362003620036
20204200351500061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201000001310228221999220100101002003620036200362003620036
20204200351500061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201002201741336228221999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010030121310228221999220100101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e3f4d51schedule 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 int alu (97)l1d cache writeback (a8)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000317219918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227231999520010100102003620036200362003620036
20024200351501006119918452006420086200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
2002420035150004656119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
2002420035150003546119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
20024200351500006119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
200242003515000186119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
2002420035150001356119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270327221999520010100102003620036200362003620036
2002420035150001146119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
20024200351500006119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227221999520010100102003620036200362003620036
200242003514900216119918252002020020200201297297491695520035200351742831750420020200204002020035104112002110920010001270227231999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  adc w0, w8, w9
  adc w1, w8, w9
  adc w2, w8, w9
  adc w3, w8, w9
  adc w4, w8, w9
  adc w5, w8, w9
  adc w6, w8, w9
  adc w7, w8, w9
  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)03mmu table walk data (08)091e1f3f51schedule 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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426797201002403625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100000005110319322673280000801002673726737267372673726737
802042673620100003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100000005125219322673280000801002673726737267372673726737
802042673620100003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100000005110319322673280000801002673726737267372673726737
802042673620000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100000005110319332673280000801002673726737267372673726737
8020426736200000070125801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100000005110219322673280000801002673726737267372673726737
802042673620000003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100100000005110319322673280000801002673726737267372673726737
802042673620000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100000005110328332673280000801002673726737267372673726737
802042673620000003625801008010080100479799049236562679526736166723166918010080200240200267366611802011009910080100100000005110219322673280000801002673726737267372673726737
802042673620000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100000005110319332673280000801002673726737267372673726737
802042673620000003625801008010080100479799149236562673626736166723166918010080200240200267366611802011009910080100100000005110219322673280000801002673726737267372673726737

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule 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)9fa9acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242673520003625800108001080010472059492362626706267061666531668480010800202400202670666118002110910800101000050209185122670280000800102670726707267072670726707
800242670620003625800108001080010472059492362626706267061666531668480010800202400202674366118002110910800101000050206181162670280000800102670726707267072670726707
80024267062000362580010800108001047205949236262670626706166653166848001080020240020267066611800211091080010100005020618542670280000800102670726707267072670726707
80024267062000362580010800108001047205949236262670626706166653166848001080020240020267066611800211091080010100005020627642670280000800102670726707267072670726707
80024267062000362580010800108001047205949236262670626706166653166848001080020240020267066611800211091080010100005020618452670280000800102670726707267072670726707
800242670620003625800108001080010472059492362626706267061666531668480010800202400202670666118002110910800101000050205184112670280000800102670726707267072670726707
800242670620003625800108001080010472059492362626706267061666531668480010800202400202670666118002110910800101000050205185112670280000800102670726707267072670726707
80024267062000362580010800108001047205949236262670626706166653166848001080020240020267066611800211091080010100005020518652670280000800102670726707267072670726707
80024267062000362580010800108001047205949236262670626706166653166848001080020240020267066611800211091080010100005020618642670280000800102670726707267072670726707
80024267062000362580010800108001047205949236262670626706166653166848001080020240020267066611800211091080010100005020418952670280000800102670726707267072670726707