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

CSNEG (64-bit)

Test 1: uops

Code:

  csneg x0, x0, x1, hi
  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)6d6emap 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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103586191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103586191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103586191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103576191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103576191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103586191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035861917251000100010006225010351035805388210001000300010351041110011000100009073127119901000100010361036103610361036
1004103576191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103586191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103586191725100010001000622501035103580538821000100030001035104111001100010000073127229901000100010361036103610361036

Test 2: Latency 1->2

Code:

  csneg x0, x0, x1, hi
  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)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)9fcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357591569920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035759619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035759619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035769619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
102041003575291619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357521619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
102041003575327619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035752102519920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357501249920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)0318191e3a3f4d51schedule 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)9fbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575006006199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
10024100357500006199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
100241003575000112499182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
10024100357600608999182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
100241003575001806199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
10024100357500006199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
100241003575002406199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
100241003575000010399182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
100241003575002706199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036
100241003575001206199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  csneg x0, x1, x0, hi
  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)03181e3f4d51schedule 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)9fcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575036619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357506619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035750285619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035750183619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
1020410035750249619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
102041003575001249920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357500619920251010010100101006471520496955100351003586563873210196102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357500619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357503619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036
10204100357500619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)181e3f4d51schedule 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)a9cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357500156499182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750006199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750036199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750006199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750006199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750006199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750006199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
10024100357500186199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
10024100357600126199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750006199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  csneg x0, x1, x2, hi
  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)03181e3f4d51schedule 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)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515006361199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000009201310128111999220100101002003620036200362003620036
2020420035150021611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200672003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
2020420035150012611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515004145361992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351042120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515003611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)1e3a3f4d51schedule 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)9fl1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515010101641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272122711121999520010100102003620036200362003620036
2002420035150101451641991825200202002020020129729749169552003520035174553175042002020020400202003510411200211092001010000000001272132714131999520010100102003620036200362003620036
20024200351501016032641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272142714141999520010100102003620067200362003620036
2002420035150101752641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272142713151999520010100102003620036200362003620036
2002420035149101811641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272142712141999520010100102003620036200362003620036
200242003515010101641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000201272142714151999520010100102003620036200362003620036
200242003515010101641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272122713131999520010100102003620036200362003620036
200242003515010101641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272142713141999520010100102003620036200362003620036
200242003515010101641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272122712141999520010100102007120036200362003620036
200242003515010102641991825200202002020020129729749169552003520035174283175042002020020400202003510411200211092001010000000001272132714131999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  csneg x0, x8, x9, hi
  csneg x1, x8, x9, hi
  csneg x2, x8, x9, hi
  csneg x3, x8, x9, hi
  csneg x4, x8, x9, hi
  csneg x5, x8, x9, hi
  csneg x6, x8, x9, hi
  csneg x7, x8, x9, hi
  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)033f51schedule 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
8020426787200362580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010080100335110319222673280000801002673726737267372673726737
80204267362003625801008010080100479799049236562673626736166723166918010080200240200267366611802011009910080100801000575110219222673280000801002673726737267372673726737
802042673620010312580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010080100005110219222673280000801002673726737267372673726737
8020426858200362580100801008010047979904923656267362680416690316691801008020024020026736661180201100991008010080100135110219222673280000801002673726737267372673726737
8020426736200362580100801008010047979904923656267362673616672316691801008020024020026736661180201100991008010080100035110219222673280000801002673726737267372673726737
8020426736200362580100801008010047979904923656267362673616672316691801008020024020026736661180201100991008010080100135110219222673280000801002673726737267372673726737
8020426736201362580100801008010047979904923656267362673616672316691801008020024020026736661180201100991008010080100105110219222673280000801002673726737267372673726737
8020426736200362580100801008010047979904921418267362673616672316691801008020024020026736661180201100991008010080100205110219222673280000801002673726737267372673726737
8020426736201362580100801008010047979904923656267362673616672316691801008020024020026736661180201100991008010080100105110219222673280000801002673726737267372673726737
8020426736200362580100801008010047979904923656267362673616672316691801008020024020026736661180201100991008010080100105110219222673280000801002673726737267372673726737

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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
8002426711200303625800108001080010472059414923626267062670616665316684800108002024002026706661180021109108001080010005020161881826702800000800102670726707267072670726707
80024267062000362580010800108001047205971492362626706267061666531668480010800202400202670666118002110910800108001000502091818926702800000800102670726707267072670726707
80024267062000362580010800108001047205971492362626706267061666531668480010800202400202670666118002110910800108001000502081881526702800000800102670726707267072670726707
80024267062000362580010800108001047205961492362626706267061666531668480010800202400202670666118002110910800108001000502071818926702800000800102670726707267072670726707
80024267062000572580010800108001047205971492362626706267061666531668480010800202400202670666118002110910800108001000502091818926702800690800102670726707267072670726756
80024267062000362580010800108001047205981492362626706267061666531668480081800202400202670666118002110910800108001000503671818926702800000800102670726707267552670726707
800242670620003625800108001080010472059614923626267062670616665316684800108002024002026706661180021109108001080010005020181891826702800000800102670726707267072670726707
800242670619903625800108001080010472059614923626267062670616665316684800108002024002026706661180021109108001080010005020181818926702800000800102670726707267072670726707
800242670620003625800108001080010472059614923626267062670616665316684800108002024002026706661180021109108001080010005020818181826702800000800102670726707267072670726707
8002426706200036258001080010800104720598149236262670626706166653166848001080020240020267066611800211091080010800100050201818181826702800000800102670726707267072670726707