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

NEGS (register, lsr, 64-bit)

Test 1: uops

Code:

  negs x0, x0, lsr #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)03l2 tlb miss data (0b)18191e1f3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100420351600000611000186225200020001000126235020352035172931866100010001000203541111001100093732431119202000100020362036203620362036
100420351500000611000186225200020001000126235020352035172931866100010001000203541111001100000731431119202000100020362036203620362036
100420351500000611000186225200020001000126235120352035172931866100010001000203541111001100000731431119202000100020362036203620362036
1004203515000006110001862252000200010001262351203520351729318661000100010002035411110011000160731431119202000100020362036203620362036
100420351500000611000186225200020001000126235120352035172931866100010001000203541111001100000731431119202000100020362036203620362036
1004203515000750611000186225200020001000126235020352035172931866100010001000203541111001100000731431119202000100020362036203620362036
100420351500000611000186225200020001000126235020352035172931866100010001000203541111001100000731431119202000100020362036203620362036
100420351510000611000186225200020001000126235020352035172931866100010001000203541111001100000731431119202000100020362036203620362036
100420351500000611000186225200020001000126235120352035172931866100010001000203541111001100000731431119202000100020362036203620362036
100420351500000611000186225200020001000126235020352035172931866100010001000203541111001100000731431119202000100020362036203620362036

Test 2: Latency 1->2

Code:

  negs x0, x0, lsr #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)03mmu table walk data (08)1e3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515000611000019862252010020100101001305121491695520035200351858131872010100102001020020035411110201100991001010010013710139111992220000101002003620036200362003620036
1020420035150001031000019862252010020100101001305121491695520035200351858131872010100102001055420035411110201100991001010010010710139111992220000101002003620036200362017120036
102042003515001261100001986225201002010010100130512149169552003520035185811818720101001020010290200354111102011009910010100100821710139111992220000101002003620036200362003620036
102042003515010124100001986225201002010010100130512149169552003520081185813187201010010200102002003541111020110099100101001001114710139111992220000101002003620036200362003620036
102042003515000611000019862252010020100101001305121491695520035200351858131872010100102001020020035411110201100991001010010010710139111992220000101002003620036200362003620036
102042003515000611000019862252010020100101001305121491695520035200351858131872010100102001020020035411110201100991001010010050710139111992220000101002003620036200362003620036
102042003515000611000019862252010020100101001305121491695520035200351858131872010100102001020020035411110201100991001010010033710139111992220000101002003620036200362003620036
102042003515000611000019862252010020100101001305121491695520035200351858131872010100102001020020035411110201100991001010010000710139111992220000101002003620036200362003620036
1020420035150006110000198622520100201001010013051214916955200352003518581318720101001020010200200354111102011009910010100100303710139111992220000101002003620036200362003620036
102042003515000611000019862252010020100101001305121491695520035200351858131872010100102001020020035411110201100991001010010000710139111992220000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03191e3f4c4d51schedule 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
10024200351500061100001986225200102001010010130522904916955200352003518603318740100101002010020200354111100211091010010104700640241221993020000100102003620036200362003620036
10024200351500061100001986225200102001010010130522904916955200352003518603318740100101002010020200354111100211091010010103600640241221993020000100102003620036200362003620036
1002420035150006110000198622520010200101001013052291491695520035200351860331874010010100201002020035411110021109101001010000640241221993020000100102003620036200362003620036
100242003515000611000019862252001020010100101305229049169552003520035186033187401001010020100202003541111002110910100101044870640241221993020000100102003620036200362003620036
1002420035150006110000198622520010200101001013052290491695520035200351860331874010010100201002020035411110021109101001010060640241221993020000100102003620036200362003620036
10024200351500061100001986225200102001010010130522914916955200352003518603318740100101002010020200354111100211091010010105100640241221993020000100102003620036200362003620036
1002420035150006110000198622520010200101001013052291491695520035200351860331874010010100201002020035411110021109101001010060640241221993020000100102003620036200362003620036
10024200351500053610000198622520010200101001013052291491695520035200351860331874010010100201002020035411110021109101001010000640241221993020000100102003620036200362003620036
100242003515000611000019862252001020010100101305229049169552003520035186033187401001010020100202003541111002110910100101001170640241221993020000100102003620036200362003620036
1002420035150006110000198622520010200101001013052291491695520035200351860331874010010100201002020035411110021109101001010030640241221993020000100102003620036200362003620036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  negs x0, x1, lsr #17
  cset x1, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03191e1f3f4c4d51schedule 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)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522400061100002989925301003010020107195624004926955300353003527391727485201072022420224300358511202011009910020100101000001111320116002998230000201003003630036300363003630036
202043003522500061100002989925301003010020107195624004926955300353003527391827486201072022420224300358511202011009910020100101001001111320016002998230000201003003630036300363003630036
202043003522500061100002989925301003010020107195624004926955300353003527391727485201072022420224300358511202011009910020100101001001111319016002998230000201003003630036300363003630036
202043003522400061100002989925301003010020107195624004926955300353003527391727486201072022420224300358511202011009910020100101001001111320016002998330000201003003630036300363003630036
202043003522500061100002989925301003010020107195624004926955300353003527391727485201072022420224300358511202011009910020100101001301111320016002998230000201003003630036300363003630036
202043003522500061100002989925301003010020107195624004927001300353003527391827485201072022420224300358511202011009910020100101001001111319016012998330000201003003630036300363003630036
202043003522500061100002989925301003010020107195624004926955300353003527391727485201072022420224300358511202011009910020100101001001111319016002998330000201003003630036300363003630036
2020430035225000611000029899253010030100201071956240049269553003530035273911227485201072022420224300358511202011009910020100101001001111320016002998330000201003003630036300363003630036
202043003522510061100002989925301003010020107195624004926955300353003527391727486201072022420224300358511202011009910020100101001301111320016012998230000201003003630036300363003630036
20204300352250120423100002989969301483010020107195624004926955300353003527403827486201072022420312300358511202011009910020100101001301111319016002998330000201003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)181e1f3f4c4d51schedule 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 cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270233232995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100104901270233222995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100100001270233222995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270233222995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100100001270233222995930000200103003630036300363003630036
20024300352250000082100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270233222995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270233222995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270233222995930000200103003630036300363003630036
20024300352240000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270233222995930000200103003630036300363003630036
20024300352250000061100002989125300103001020010195628914926955300353003527391327498200102002020020300358511200211091020010100101001270333222995930000200103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  negs x0, x8, lsr #17
  negs x1, x8, lsr #17
  negs x2, x8, lsr #17
  negs x3, x8, lsr #17
  negs x4, x8, lsr #17
  negs x5, x8, lsr #17
  negs x6, x8, lsr #17
  negs x7, x8, lsr #17
  mov x8, 9
  mov x9, 10
  mov x10, 11

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)0309l2 tlb miss data (0b)181e1f3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6b6d6emap stall dispatch (70)flags prf full (73)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)acbranch cond mispred nonspec (c5)cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534484010000006180000487412516010016010080100344000510495033005341053410432983024343360801008020080200534103911802011009910080100100000005110004242253390160000801005341153411534115341153411
80204534104000000006180000487412516010016010080100344000500495033005341053410432982909343360801008020080200534103911802011009910080100100000005110002242253390160000801005341153640534665341153411
80204534104000009006180000487412516010016010080100344000510495033005341053410432982909343360801008020080200534103911802011009910080100100000005110002242253390160000801005341153411534115341153411
802045341040000000015680000487412516010016010080100344000500495033005341053410432982909343360801008020080200534103911802011009910080100100000005110002242253390160000801005341153411534115341153411
80204534104000000006180000487412516010016010080100344000500495033005341053410432982909343360801008020080200534103911802011009910080100100000005110003242253390160000801005341153411534115341153411
80204534104000000006180000487412516010016010080100344000510495033005341053410432983024343360801008020080200534103911802011009910080100100000005110002242253390160000801005341153411534115341153411
80204534104000000006180000487412516010016010080100344000510495033005341053410432983024343360801008020080200534103911802011009910080100100000005110003243253390160000801005341153525534115341153411
802055342640000075008280000487412516010016010080100344000510495033005341053410432982909343360801008020080200534103911802011009910080100100000005110002242353390160000801005341153411534115341153411
80204534104000000006180000487412516010016010080100344000500495033005341053410432983024343360801008020080200534103911802011009910080100100000005110002242353390160000801005341153411534115341153411
80204534104000000006180000487412516010016010080100344000500495033005341053410432983024343360801008020080200534103911802011009910080100100000005110002242253390160000801005341153411534115341153411

1000 unrolls and 10 iterations

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

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)696a6d6emap stall dispatch (70)flags prf full (73)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)a9accfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800245340140000000001878000047946251600101600108001034381304950300533805338043290325134335280010800208002053380391180021109108001010000000502007248853360160000800105338153381533815338153381
80024533803990000000828000047946251600101600108001034381304950300533805338043290274934335280010800208002053380391180021109108001010000000502007247753360160000800105338153381533815338153381
80024533804000000000848000047946251600101600108001034381304950300533805338043290325134335280010800208002053380391180021109108001010000000502007248653360160000800105338153381533815338153381
800245338040000000001038000047946251600101600108001034381304950300534465338043290325134335280010800208002053380391180021109108001010000000502009246753360160000800105338153381533815338153381
80024533804000000000618000047946251600101600108001034381304950300533805338043290293634335280010800208002053380391180021109108001010000000502008247753360160000800105338153381533815338153381
80024533803990000000618000047946251600101600108001034381304950300533805338043290293634335280010800208002053380391180021109108001010000000502008248953360160000800105338153381533815338153381
80024533803990000000618000047946251600101600108001034381304950300533805338043290325134335280010800208002053380391180021109108001010000000502006247953360160000800105338153381533815338153381
80024533803990000000618000047946251600101600108001034381304950300533805338043290293634335280010800208002053380391180021109108001010000000502006249753360160000800105338153381533815338153381
800245338040000000007268000047946251600101600108001034381304950300533805338043290325134335280010800208002053380391180021109108001010000000502006247753360160000800105338153381533815338153381
80024533803990000000618000047946251600101600108001034381304950300533805338043290293634335280010800208002053380391180021109108001010000600502006248853360160000800105338153381533815338153381