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

CSINV (64-bit)

Test 1: uops

Code:

  csinv 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)03191e3f4d51schedule 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 tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073227119901000100010361036103610361036
1004103580082917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
10041035800156917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103570061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036
1004103580061917251000100010006225010351035805388210001000300010351041110011000100000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  csinv 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)03mmu table walk data (08)l2 tlb miss data (0b)18191e3a3f4d51schedule 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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575000000103992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575001200536992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500000061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500000061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500000061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101002071012711999210000101001003610036100361003610036
10204100357500000061992025101651010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575000021061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500000061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500000061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575000000124992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036

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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
1002410035757359918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
1002410035754429918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036
1002410035751039918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001030064032733999310000100101003610036100361003610036
100241003575619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064032733999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  csinv 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)03191e3f4d51schedule 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)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101003071012711999210000101001003610036100361003610036
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575006199192510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575036199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575006199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575036199202510100101001010064715249695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036

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 tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357580799182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035756199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035752559918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001020079564022722999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030308100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035756199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
10024100357516899182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100037364022722999310000100101003610036100361003610036
1002410035766199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  csinv 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)03l2 tlb miss data (0b)181e3a3f4d51schedule 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)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500000233199302520200202002021212977331491695520035200351742571748620212202244024820035104112020110099201001000000001111319016002001120100101002003620036200362003620036
20204200351500000166199302520200202002021212977331491695520035200351742581748520212202244024820035104112020110099201001000000001111320016002001120100101002003620036200362003620036
2020420035150000061199302520200202002021212977331491695520035200351742581748520212202244024820035104112020110099201001000000001111320016002001120100101002003620036200362008120036
20204200351500000272199302520200202002021212977331491695520035200351742571748520212202244024820035104112020110099201001000010001111319016002001120100101002003620036200362003620036
2020420035150000061199302520200202002021212977331491695520035200351742581748520212202244024820035104112020110099201001000000000001310128111999220100101002003620036200362003620036
20204200351500000126199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
20204200351500000208199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000030000001310128111999220100101002003620036200362003620036
2020420035150000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
20204200351500000149199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
20204200351500000145199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036

1000 unrolls and 10 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 int alu (97)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
200242003515061199182520020200202002012972971491695520035200351743931750420020200204002020035104112002110920010100000012704272219995200100100102003620036200362003620036
200242003515061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012702272319995200100100102003620036200362003620036
200242003515061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012702272319995200100100102003620036200362003620036
200242003515086199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000312702274319995200100100102003620036200362003620036
2002420035150103199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012702272319995200100100102003620036200362003620036
2002420035150232199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012702272319995200100100102003620036200362003620036
200242003515061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012703273219995200100100102003620036200362003620036
200242003515061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012702272319995200100100102003620036200362003620036
200242003515061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012703273219995200100100102003620036200362003620036
200242003515061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000012702272319995200100100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  csinv x0, x8, x9, hi
  csinv x1, x8, x9, hi
  csinv x2, x8, x9, hi
  csinv x3, x8, x9, hi
  csinv x4, x8, x9, hi
  csinv x5, x8, x9, hi
  csinv x6, x8, x9, hi
  csinv 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)031e3f51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042678520028878258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000005110219112673280000801002673726737267372673726737
80204267362000290258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
802042673620046536258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119212673280000801002673726776267372673726737
802042673620049836258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
802042673620022536258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
802042673620022536348010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200216362580100801008010047979914923656267362673616672316691801008020024020026736132118020110099100801008010000005110119112673280000801002673726737267372673726737
802042673620020436258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797990492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
802042673620033336258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e1f3f51schedule 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
80024267222000000362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001080010005020518432670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001080010005020418342670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024046126706661180021109108001080010005020318342670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001080010005020318342670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001080010005020318342670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001080010005020318442670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001080010005020318342670280000800102670726707267072670726707
80024267062000000362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001080010005020418542670280000800102670726707267072670726707
80024267062000000362580010800108001047205914923626267062670616665316684800108002024002026706661180021109108001080010005020318452670280000800102670726707267072670726707
800242670620000180362580010800108001047205904923626267062670616665316684800108002024002026706661180021109108001080010005020318442670280000800102670726707267072670726707