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

Test 1: uops

Code:

  csneg w0, w0, w1, 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)03091e3f4d51schedule 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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103580061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103580061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103580061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103580061917251000100010006225001035103580538821000100030001035104111001100010000373127119901000100010361036103610361036
1004103580082917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103580061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035800619172510001000100062250010351035805388210001000300010351041110011000100001273127119901000100010361036103610361036
1004103580061917251000100010006225001035103580538821000100030001035104111001100010003073127119901000100010361036103610361036
1004103580061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
1004103580082917251000100010006225011035103580538821000100030001035104111001100010002073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  csneg w0, w0, w1, 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)9fl1d cache writeback (a8)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100807638461992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357612961992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357519561992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
1020410035750122992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
1020410035760826992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357537861992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357537561992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357541761992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e1f3f4d51schedule 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
1002410035750001059918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
100241003575100619918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750390619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750002519918251001010010100106472461496955100351003586783875410010100203002010035104311002110910100101001003064022722999310000100101003610036100361003610036
100241003575000619918661001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
100241003575000619918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
100241003575000619918251001010010100106472460496955100351003586783875410010100203002010081104111002110910100101001000064022722999310000100101003610036100361003610036
10024100357501590619918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750002859918251001010010100106472461496955100351003586783875410010100203002010035104311002110910100101001000064022722999310000100101003610036100361003610036
100241003575000619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  csneg w0, w1, w0, 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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575126199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
10204100357536199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
102041003576066599202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
102041003575073799202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
102041003575126199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
1020410035751656199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036
102041003575186199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010100071012711999210000101001003610036100361003610036

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)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
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575661991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  csneg w0, w1, w2, 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)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4d51schedule 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)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000084199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
20204200351500000000681199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
202042003515000007020061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036

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 int alu (97)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000000127011274111999520010100102003620036200362003620036
2002420035150414611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000127011279111999520010100102003620036200362003620036
200242003515006119918252004220020200201297297149169552003520035174283175042002020020400202003510411200211092001010000001270112711111999520010100102003620036200362003620036
20024200351504296119918252002020020200201297297149169552003520035174283175042002020020400202003510411200211092001010000001270112710111999520010100102003620036200362003620036
20024200351500611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000127042710111999520010100102003620036200362003620036
200242003515093611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000000127011271181999520010100102003620036200362003620036
2002420035150053619918252002020020200201297297149169552003520035174283175042002020020400202003510411200211092001010000001270112711111999520010100102003620036200362003620036
200242003515006119918252002020020200201297297149169552003520035174283175042002020020400202003510411200211092001010000001270112711101999520010100102003620036200362003620036
2002420035150031319918252002020020200201297297049169552003520035174283175042002020020400202003510411200211092001010000001270112710111999520010100102003620036200362003620036
200242006615063061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012709279101999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  csneg w0, w8, w9, hi
  csneg w1, w8, w9, hi
  csneg w2, w8, w9, hi
  csneg w3, w8, w9, hi
  csneg w4, w8, w9, hi
  csneg w5, w8, w9, hi
  csneg w6, w8, w9, hi
  csneg w7, w8, w9, 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)0318191e1f3a3f51schedule 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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426797201002040036258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110219112673280000801002673726737267372673726737
80204267362000000036258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737
802042673620000150036258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737
8020426736200002190036258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737
8020426736200002400912258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737
802042673620000300701258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737
802042673620100000606258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737
802042673620000300701258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000003005110119112673280000801002673726737267372673726737
802042673620100120036258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005133119112673280000801002673726737267372673726737
802042673620000270078258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000000005110119112673280000801002673726737267372673726737

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e3f51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426723200002436258001080010800104720591492362626706267061666531668480010800202400202670666118002110910800108001000050201218562670280000800102670726707267072670726707
800242670620000123625800108001080010472059149236262670626706166653166848001080020240020267066611800211091080010800100005020518552670280000800102670726707267072670726707
80024267062000003625800108001080010472059049236262670626706166653166848001080020240020267066611800211091080010800100005020318662670280000800102670726707267072670726707
80024267062000003625800108001080010472059049236262670626706166653166848001080020240020267066611800211091080010800100005020318352670280000800102670726707267072670726707
800242670620000243625800108001080010472059049236262670626706166653166848001080020240020267066611800211091080010800100005020518532670280000800102670726707267072670726707
80024267062000003625800108001080010472059149236262670626706166653166848001080020240020267066611800211091080010800100005020618532670280000800102670726707267072670726707
800242670620000273625800108001080010472059149236262670626706166653166848001080020240020267066611800211091080010800100005020518642670280000800102670726707267072670726707
80024267062000003925800108001080010472059149236262670626706166653166848001080020240020267066611800211091080010800100005020518532670280000800102670726707267072670726707
80024267062000063625800108001080010472059149236262670626706166653166848001080020240020267066611800211091080010800100005020718352670280000800102670726707267072670726707
80024267061990003625800108001080010472059149236262670626706166653166848001080020240020267066611800211091080010800100005020618352670280000800102670726707267072670726707