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

Test 1: uops

Code:

  neg w0, w0, 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)60616d6emap 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)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100420351607110001735252000200010003257010203520351575318421000100010002035421110011000237302671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000137301671117812000100020362036203620362036
10042035150611000173525200020001000325701020352035157531842100010001000203542111001100002207301671117812000100020362036203620362036
1004203515126110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036
100420351506110001735252000200010003257010203520351575318421000100010002035421110011000007301671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  neg w0, w0, 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)03l2 tlb miss data (0b)191e3f4c4d51schedule 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)9fst unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010002000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010001000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955200352003518429318700101001020010200200354211102011009910010100100015000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010001030710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010001000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)031e3f4c4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515001051000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010020640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010013640363331979220000100102003620036200362003620036
10024200351500821000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010006640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010010640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010040640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010010640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010010640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010010640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010010640363331979220000100102003620036200362003620036
10024200351500611000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010010640363331979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  neg w0, w8, asr #17
  neg w1, w8, asr #17
  neg w2, w8, asr #17
  neg w3, w8, asr #17
  neg w4, w8, asr #17
  neg w5, w8, asr #17
  neg w6, w8, asr #17
  neg w7, w8, 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 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)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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d 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
8020426785200000000003248003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000203011151291160026729160082801002673326733267332673226733
8020426732200000000120498003126146271601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000011151292160226729160082801002673326733267332673326733
802042673220000000000288003126146281601821601828026216190649236512673226732166518166618026281245803762673239118020110099100801001000000000411151290162026729160082801002673326732267332673326733
802042673220000000000288003126146281601821601828026216190649236522690426732166518166618026280376803762673239118020110099100801001000000000011151292162126729160082801002673326733267332673326733
8020426732200000000006938003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000003011151292162226729160082801002673326733267332673326733
802042673220000000000288003126146771601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000003011151291161226729160082801002673326733267332673326733
802042673220000000000288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000011151291161226729160082801002673326733267332673326733
802042673220000000000288003126146281601821601828026216190649236522673126732166518166618026280376803762673239118020110099100801001000000000011151292162126729160082801002673326732267332673326733
802042673220000000000288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000011151292161026729160082801002673326733267332673326733
802042673120100000000288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000011151292162326729160082801002673326733267332673326733

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss data (0b)191e3f4c4d51schedule 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 tlb miss (a1)l1d cache writeback (a8)c2cdcfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426717200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502042214326704160000800102671226712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100100506652204326704160000800102677026712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502042205326704160000800102671226712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502042203326704160000800102671226712267122671226712
80024267112000003567800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502032203326704160000800102671226712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685803658002080020267113911800211091080010100000502052203326704160000800102671226712267122671226712
80024267112000000156800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100100502042204326704160000800102671226712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502032205526704160000800102671226712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502042203426704160000800102671226712267122671226712
8002426711200000061800002128025160010160010800101631424923631267112671116623316685800108002080020267113911800211091080010100000502032202326704160000800102671226712267122671226712