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

NEG (register, asr, 64-bit)

Test 1: uops

Code:

  neg x0, x0, asr #17
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 2.000

Integer unit issues: 2.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f4c4d51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10042035150611000173525200020001000325701203520351575318421000100010002035421110011000100732671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100010002035421110011000000731671117812000100020362036203620362036
100420351527611000173525200020001000325701203520351575318421000100010002035421110011000000731671117812000100020362036203620362036
10042035160611000173525200020001000325701203520351575318421000100010002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100010002035421110011000700731671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100010002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100010002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100010002035421110011000010731671117812000100020362036203620362036
10042035160611000173525200020001000325701203520351575318421000100010002035421110011000000731671117812000100020362036203620362036
100420351606110001735252000200010003257012035203515753184210001000100020354211100110000012731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  neg x0, x0, asr #17
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)031e1f3a3f4c4d51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515000061100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000000710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342049170022008120127184293187001010010200102002003542111020110099100101001000000000710159111979120000101002003620036200362003620036
1020420035150610801643100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000000710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000002030710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000000710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000000710159111979120000101002003620036200362003620036
1020420035150120061100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000001030710159111979120000101002003620036200362003620036
1020420035150120092100091980325201752014210100185342049169992008020080184298187001010010200102002003542211020110099100101001000001430733159111982520000101002003620036200362003620036
102042003515000061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000001000710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3f4c4d51schedule 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
1002420035150000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640363221979220000100102003620036200362003620036
10024200351500000000020610000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
10024200351500000000020710000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
1002420035150000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
1002520035150000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
1002420035150000000006110000197432520036200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
1002420035150000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
1002420035150000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
1002420035150000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640263221979220000100102003620036200362003620036
100242003514900000000109410000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100001000640263221979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  neg x0, x8, asr #17
  neg x1, x8, asr #17
  neg x2, x8, asr #17
  neg x3, x8, asr #17
  neg x4, x8, asr #17
  neg x5, x8, asr #17
  neg x6, x8, asr #17
  neg x7, x8, asr #17
  mov x8, 9

(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)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap 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)cdcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267682010000000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322000010000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322010000000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180202100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322000000000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322000000000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
8020426732200000000010078003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322000000000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322000000000288003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
8020426732200000000014078003126146281601821601828026216190610492365226732267321665181666180262803768037626732391180201100991008010010000000001115129000160026729160082801002673326733267332673326733
80204267322000000000288003126146281601821601828026216190610492365226731267321665181666180262803768037626731391180201100991008010010000000001115129000160026729160082801002673326733267332673326733

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4c4d51schedule 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)a9acc2cfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267342000000000618000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100000000502009228826704160000800102671226712267122671226712
80024267112000000000618000021280251600101600108001016314214923631267112671116662316685800108002080020267113911800211091080010100000000502009228726704160000800102671226712267122671226771
80024267112000000000618000021280251600101600108001016314214923631267112676716623316685800108002080020267113911800211091080010100000000502006227426704160000800102671226712267122671226712
80024267112000000000618000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100001000502008226626832160000800102671226712267122671226712
80024267112000000000828000022618251600101601968022017021704923631267112671116623316685800108002080020267113911800211091080010100000000502009228526704160000800102671226770267122671226712
800242671120000000006318000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100000000502007227726704160000800102671226712267122671226712
80024267112000000000618000021280251600101600108001016314204923631267112671116623316685800108002080666267113911800211091080010100000000502007225526704160000800102671226712267122671226712
800242671120000000001038008121280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010100000000502005225526704160000800102671226712267122671226712
80024267112000000000618008221280251607461600108001016314214923631267692671116624316685804308023780020267113921800211091080010100001000502009226526704160000800102671226712267122671226712
80024267112000000000618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010100001000502007226526704160000800102671226712267122671226712