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

Test 1: uops

Code:

  csinv 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)031e3f4d51schedule 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
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073427119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410357061917251000100010006225010351035805388210001000300010351041110011000100002173127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127219901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035706191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000673127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  csinv 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)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)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750156992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
1020410035756619920251010010100101006471524969551003510035865638732101001020030200100351021110201100991001010010100018071022722999210000101001003610036100361003610036
102041003575061992045101001012910100647152496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
102041003575061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010003071022722999210000101001003610036100361003610036
102041003575061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010003071022722999210000101001003610036100361003610036
1020410035750251992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010016071022722999210000101001003610036100361003610036
102041003575061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010006071022722999210000101001003610036100361003610036
102041003576061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
102041003575661992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
1020410035753661992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010010071022722999210000101001003610036100361003610036

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)l1d tlb miss (a1)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575103991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
1002410035751490991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100014364022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
10024100357561991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  csinv 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)03mmu table walk data (08)191e1f3f4d51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750000829920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750000849920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357500002749920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
102041003575000020369920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035760000619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357500002479920251010010100101006471521496955100351003586563873210100103923020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357500001039920251010010100101006471520496955100351003586783873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750000619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357500121763629920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357500001479920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010012371012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750156991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100000064032722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541009310020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000003964022722999310000100101003610036100361003610036
100241003576061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
100241003575064991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
100241003576061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036
1002410035750251991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100010364022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100000064022722999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  csinv 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
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001329128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000200001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000301310128111999220100101002003620036200362003620036
2020420035150000030061199262520200202002020012976501491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036
2020420035150000000061199262520200202002020012976500491695520035200351740631748120200202004020020035104112020110099201001000000000001310128111999220100101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03091e1f3f4d51schedule 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)acbranch mispred nonspec (cb)cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010100000001270006279111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010100000117012700010271141999520010100102003620036200362003620036
20024200351500006119918252002020020200201297297049169552003520035174283175042002020020400202003510411200211092001010000000127000112711111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000000012700010274111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517439317504200202002040020200351041120021109200101000000012700010271151999520010100102003620036200362003620036
20024200351500006119918252002020020200201297297149169552003520035174283175042002020020400202003510411200211092001010000000127000112712111999520010100102003620036200362003620036
2002420035150000821991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000012700010271141999520010100102003620036200362003620036
20024200811510006119918252002020020200201297297049169552003520035174283175302002020116400202003510411200211092001010000000127000112711111999520010100102003620036200362003620036
20024200351501017661199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270009271191999520010100102003620036200362003620036
200242003515000061199182520020200202002012997310491695520035200351742831750420020200204002020035104112002110920010100000901270009271151999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  csinv w0, w8, w9, hi
  csinv w1, w8, w9, hi
  csinv w2, w8, w9, hi
  csinv w3, w8, w9, hi
  csinv w4, w8, w9, hi
  csinv w5, w8, w9, hi
  csinv w6, w8, w9, hi
  csinv 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)03mmu 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)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 branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267882010000000036258010080100801004797991492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110219112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797991492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797990492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797990492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797990492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797990492365632673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797991492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362010000000036258010080100801004797991492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797991492365602673626736166723166918010080200240200267366611802011009910080100801000000000105110119112673280000801002673726737267372673726737
80204267362000000000036258010080100801004797990492365602673626736166723166918010080200240200267366611802011009910080100801000000000005110119112673280000801002673726737267372673726737

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 instruction (0a)l2 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 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
8002426712200000000000078258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020618742670280000800102670726707267072670726707
80024267061990000000000609258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020618772670280000800102670726707267072670726707
80024267062000000000000247258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020518552670280000800102670726707267072670726707
80024267062000010000000101258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020518452670280000800102670726707267072670726707
8002426706200000000000057258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020618772670280000800102670726707267072670726707
80024267062000000000000103258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020518572670280000800102670726707267072670726707
8002426706200000000000082258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020518542670280000800102670726707267072670726707
8002426706200000000000036258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020518552670280000800102670726707267072670726707
8002426706200000000000036258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020618542670280000800102670726707267072670726707
8002426706200000000000080258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001000000005020618552670280000800102670726707267072670726707