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

Test 1: uops

Code:

  negs x0, x0
  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)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)st unit uop (a7)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10041035806191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035806191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035706191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035706191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035706191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035806191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035706191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035706191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
100410358012691725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036
10041035806191725100010001000622500103510358053882100010001000103540111001100000073127119931000100010361036103610361036

Test 2: Latency 1->2

Code:

  negs x0, x0
  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)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)9fcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750619920251010010100101006471520049695510035100358656387321010010200102001003540111020110099100101001007100012711999510000101001003610036100361003610036
1020410035756619922251010010100101006471521049695510035100358656387321010010200102001003540111020110099100101001007102012711999510000101001003610036100361003610036
1020410035756619920251010010100101006471521049695510035100358656387321010010200102001003540111020110099100101001007100012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521049695510035100358656387321010010200102001003540111020110099100101001007100012711999510000101001003610036100361003610036
102041003575183619920251010010100101006471520249695510035100358656387321010010200102001003540111020110099100101001007102012711999510000101001003610036100361003610036
10204100357521619920251010010100101006471521049695510035100358656387321010010200102001003540111020110099100101001007102012711999510000101001003610036100361003610036
10204100357539619920251010010100101006471521049695510035100358656387321010010200102001003540111020110099100101001007102012711999510000101001003610036100361003610036
1020410035760619920251010010100101006471521049695510035100358656387321010010200102001003540111020110099100101001007100012711999510000101001003610036100361003610036
10204100357535369920251010010100101006471520249695510035100358656387321010010200102001003540111020110099100101001007100012711999510000101001003610036100361003610036
102041003575354619920251010010100101006471520049695510035100358656387321010010200102001003540111020110099100101001007100012711999510000101001003610036100361003610036

1000 unrolls and 10 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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035762461991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
10024100357621467991825100101001010010647246149695501003510035868938754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
100241003575961991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
1002410035751261991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
1002410035751282991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100069322722999710000100101003610036100361003610036
1002410035751282991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
1002410035751561991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695501003510035867838754100101002010020100354011100211091010010100064022722999710000100101003610036100361003610036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  negs x0, x1
  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)l2 tlb miss data (0b)1e3a3f4d51schedule 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035150001206119930252010020100201121297233049169552003520035174257174862011220224202242003564112020110099100201001010000000111132016002001220000201002003620036200362003620036
2020420035150000063119930252010020100201121297233049169552003520035174257174862011220224202242003564112020110099100201001010000000111131916002001220000201002003620036200362003620036
20204200351500000611993025201002010020112129723304916955200352003517425717486201122022420224200356411202011009910020100101000010884111131916002001220000201002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174258174862011220224202242003564112020110099100201001010000000111132016002001220000201002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174257174852011220224202242003564112020110099100201001010000000111131916002001220000201002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174257174862011220224202242003564112020110099100201001010000100111131916002001220000201002003620036200362003620036
2020420035150000053619930252010020100201121297233049169552003520035174258174852011220224202242003564112020110099100201001010000000111131916002001220000201002003620036200362003620036
202042003515010006119930252010020100201121297233049169552003520035174257174862011220224202242003564112020110099100201001010000000111131916002001220000201002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174258174862011220224202242003564112020110099100201001010000000111132016002001220000201002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174257174862011220224202242003564112020110099100201001010000000111132016002001220000201002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f4d51schedule 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 miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000189199182520010200102001012972471491695520035200351742831750420010200202002020035641120021109102001010010200127012271361999520000200102003620036200362003620036
20024200351500159611991825200102001020176129724714916955200352003517428317504200102002020020200356451200211091020010100100001270112713121999520000200102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003564112002110910200101001002012706276131999520000200102003620036200362003620036
20024200351490061199182520010200102001012972471491695520081201271742831750420010200202002020035641120021109102001010010000127013271351999520000200102003620036200362003620036
20024200351490061199182520010200102001012972471491695520035200351742831750420010200202002020035641120021109102001010010000127013275131999520000200102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002020020200356411200211091020010100100001270132713131999520000200102003620036200362003620036
20024200351500061199182520010200102001012972471491695520125200351742831750420010200202002020035641120021109102001010010000127062713111999520000200102003620128200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002020207200356411200211091020010100100031270132711131999520000200102003620036200362003620036
2002420035150012611991825200102001020010129724714916955200352003517428317504203382002020020200356411200211091020010100100024381270132713131999520000200102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002020020200356411200211091020010100100001270112712141999520000200102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  negs x0, x8
  negs x1, x8
  negs x2, x8
  negs x3, x8
  negs x4, x8
  negs x5, x8
  negs x6, x8
  negs x7, x8
  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)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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042674120000352580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100000005110319332673180000801002673626736267362673626736
802042673520100352580100801008010040050014923655267352673516672316690801008020080200267353911802011009910080100100000005110319232673180000801002673626736267362673626736
802042673520000352580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100000005110319332673180000801002673626736267362673626736
802042673520000352580100801008010040050014923655267352673516672316690801008020080304267353911802011009910080100100000005110319332673180000801002673626736267362673626736
802042673520000352580100801008010040050014923655267352673516672316690801008020080200267353911802011009910080100100000005110319342673180000801002673626736267362673626736
802042673520000352580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100000005110319332673180000801002673626736267362673626736
802042673520000352580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100103005110319322673180000801002673626736267362673626736
802042673520000352580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100000005110319232673180000801002673626736267362673626736
802042673520000352580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100000005110219332673180000801002673626736267362673626736
802042673520000612580100801008010040050004923655267352673516672316690801008020080200267353911802011009910080100100000005110319332673180000801002673626736267362673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)030918191e1f3f51schedule 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)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242672220000000352580010800108001040005014923625267522670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670519900000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005004923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706
800242670520000000352580010800108001040005014923625267052670516665316683800108002080020267053911800211091080010100000005020118112670280000800102670626706267062670626706