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

Test 1: uops

Code:

  negs w0, w0
  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)031e3a3f4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
10041035802629172510001000100062250103510358053882100010001000103540111001100022077427449931000100010361036103610361036
100410357026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036
100410358026291725100010001000622501035103580538821000100010001035401110011000077427449931000100010361036103610361036

Test 2: Latency 1->2

Code:

  negs w0, w0
  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)03193f4d51schedule 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
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035760619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000371012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000071012711999510000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3f4d51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
100241003576000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000040064022722999710000100101003610036100361003610036
1002410035751000000145991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
1002410035760000000251991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101002010064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678387541001010020100201003540111002110910100101000000064022722999710000100101003610036100361003610036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  negs w0, w1
  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): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4d51schedule 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)9fbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035150002511993025201002010020112129723314916955200352003517425717485201122022420224200356411202011009910020100101001111319162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723314916955200352003517425817486201122022420224200356411202011009910020100101001111319162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723314916955200352003517425817486201122022420224200356411202011009910020100101001111320162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723304916955200352003517425817486201122022420224200806411202011009910020100101001111319162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723314916955200352003517425717486201122022420224200356411202011009910020100101001111319162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723304916955200352003517425717486201122022420224200356411202011009910020100101001111320162001220000201002003620036200362003620036
2020420035150015611993025201002010020112129723314916955200352003517425717485201122022420224200356411202011009910020100101001111319162004520000201002003620036200362003620036
202042003515000611993025201002010020112129723314916955200352003517425717486201122022420224200356411202011009910020100101001111320162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723314916955200352003517425717486201122022420224200356411202011009910020100101001111320162001220000201002003620036200362003620036
202042003515000611993025201002010020112129723314916955200352003517425817486201122022420224200356411202011009910020100101001111320162001220000201002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)181e3f4d51schedule 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 miss (a1)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)d9ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500000355199182520010200102001012972471491695502003520035174283175042001020020200202003564112002110910200101001000001270132701351999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724704916955020035200351742831750420010200202002020035641120021109102001010010000012701227013111999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724714916955020035200351742831750420010200202002020035641120021109102001010010000012701327012111999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724704916955020035200351742831750420010200202002020035641120021109102001010010000012701327013111999520000200102003620036200362003620036
20024200351500000231199182520010200102001012972470491695502003520035174283175042001020020200202003564112002110910200101001000001270132701361999520000200102003620036200362003620036
2002420035150000061199182520010200102001012972470491695502003520035174283175042001020020200202003564112002110910200101001000001270122705131999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724704916955020035200351742831750420010200202002020035641120021109102001010010000012701027011131999520000200102003620036200362003620036
200242003515000001891991825200102001020010129724704916955020035200351742831750420010200202002020035641120021109102001010010000012701327013111999520000200102003620036200362003620036
20024200351500000611991825200102001020010129724704916955020035200351742831750420010200202002020035641120021109102001010010000012701327011131999520000200102003620036200362003620036
20024200351500000103199182520010200102001012972470491695502003520035174283175042001020020200202003564112002110910200101001000001270527010132000320000200102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  negs w0, w8
  negs w1, w8
  negs w2, w8
  negs w3, w8
  negs w4, w8
  negs w5, w8
  negs w6, w8
  negs w7, w8
  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.3342

retire uop (01)cycle (02)031e1f3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6b6d6emap 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
8020426761200600352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110119222673180000801002673626736267362673626736
8020426735200390352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005132219222673180000801002673626736267362673626736
802042673520000352580100801008010040050049236550267352673516719316719801008020080200267353911802011009910080100100005110219222673180000801002673626736267362673626736
802042673520000352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110219112673180000801002673626736267362673626736
8020426735200150352580100801638010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110119112673180000801002673626736267362673626736
802042673520000352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110119122673180000801002673626736267362673626736
802042673520000352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110219112673180000801002673626736267362673626736
802042673520060352580100801008010040050049236550267352673516710316690801008020080200267353911802011009910080100100005110219212673180000801002673626736267362673626736
802042673520000352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110219222673180000801002673626736267362673626736
802042673520000352580100801008010040050049236550267352673516672316690801008020080200267353911802011009910080100100005110119222673180000801002673626736267362673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap 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 cache writeback (a8)accfd0l1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242672220003352580010800108001040005004923625267052670516665031668380010800208002026705391180021109108001010005020001318682670280000800102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666503166838001080020800202670539118002110910800101000502000418572670280000800102670626706267062670626706
800242670520000352580010800108001040005004923625267052670516665031668380010800208002026705391180021109108001010005020005181262670280000800102670626706267062670626706
80024267052000153525800108001080010400050049236252670526705166650316683800108002080020267053911800211091080010100920502000618662670280000800102670626706267062670626706
8002426705200024352580010800108001040005004923625267052670516665031668380010800208002026705391180021109108001010005020003185112670280000800102670626706267062670626706
80024267052000056258001080010800104000500492362526705267051666503166838001080020800202670539118002110910800101000502000618442670280000800102670626706267062670626706
800242670520000352580010800108001040005004923625267052670516665031668380010800208002026705391180021109108001010005020005181162670280000800102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666503166838001080020800202670539118002110910800101000502000418662670280000800102670626706267062670626706
80024267052000035258001080010800104000500492362526705267991666503166838001080020800202670539118002110910800101003502000518452670280000800102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665031668380010800208002026705391180021109108001010005020005185112670280000800102670626706267062670626706