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

ADDS (immediate, 32-bit)

Test 1: uops

Code:

  adds w0, w0, #3
  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)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
10041035806191725100010001000622501035103580538821000100010001035401110011000373127119931000100010361036103610361036
10041035806191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035706191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
100410357010391725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035806191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035808491725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035806191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035806191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035806191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036
10041035706191725100010001000622501035103580538821000100010001035401110011000073127119931000100010361036103610361036

Test 2: Latency 1->2

Code:

  adds w0, w0, #3
  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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750061992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071022711999510000101001003610036100361003610036
1020410035750061992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
1020410035750061992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
1020410035750061992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
10204100357500166992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
10204100357500124992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
1020410035750061992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
1020410035750061992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036
10204100357500619920251010010100101006471521496955100351003586563873210100102001020010035401110201100991001010010000710127111006410000101001003610036100361003610036
102041003575012124992025101001010010100647152149695510035100358656387321010010200102001003540111020110099100101001000071012711999510000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)0918191e1f3a3f4d51schedule 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
10024100357500000006199182510058100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022723999710000100101003610036100361003610036
10024100357500000006199182510010100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
10024100357600000006199182510010100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
10024100357600000006199182510032100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
10024100357500000006199182510010100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246149695510035100358678168754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
100241003575000000118999182510010100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
10024100357500000006199182510010100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
10024100357600000006199182510010100101001064724604969551003510035867838754100101002010020100354011100211091010010100000064022722999710000100101003610036100361003610036
100241003575000000061991825100101001010010647246049695510035100358678387541001010020100201003540111002110910100101001000640227221009910000100101003610036100361003610036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  adds w0, w1, #3
  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)09181e1f3f4d51schedule 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 cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000000611993025201002010020112129723349169552003520035174257174852011220224202242003564112020110099100201001010000001111320316012001220000201002003620036200362003620036
2020420035150000005361993025201002010020112129723349169552008020035174258174852011220224202242003564112020110099100201001010000031111322316232001220000201002003620036200362003620036
202042003515000000611993025201002010020112129723349169552003520035174258174852011220224202242003564112020110099100201001010000001111321016332001220000201002003620036200362003620036
202042003515000000611993025201002010020112129723349169552003520035174258174862011220224202242003564112020110099100201001010020001111322316132001220000201002003620036200362003620036
2020420035150000120611993025201002010020112129723349169552003520035174257174862011220224202242003564112020110099100201001010000001111320316302001220000201002003620036200362003620036
2020420035150000002311993025201002010020112129723349169552003520035174258174862011220224202242003564112020110099100201001010000001111321116332001220000201002003620036200362003620036
202042003515011000611993025201002010020112129723349169552003520035174257174862011220224202242003564112020110099100201001010000001111321116332001220000201002003620036200362003620036
202042003515000000611993025201002010020112129723349169552003520035174258174862011220224202242003564112020110099100201001010000001111321016312001220000201002003620036200362003620036
202042003515000000611993025201002010020112129723349169552003520035174258174862011220224202242003564112020110099100201001010000001111322316132001220000201002003620036200362003620036
202042003515000000611993025201002010020112129723349169552003520035174257174862011220224202242003564112020110099100201001010000001111322316332001220000201002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0309l2 tlb miss data (0b)18191e1f3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap 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)eaeb? int retires (ef)f5f6f7f8fd
2002420035150000000061199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012712199952000000200102003620036200362003620036
2002420035150000030061199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012731199952000000200102003620036200362003620036
2002420035150000000061199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012711199952000000200102003620036200362003620036
2002420035150000000061199182520010200102001012972470149169552007820035174283175042001020020200202003564112002110910200101001000000001270012711199952000000200102003620036200362003620036
200242003515000000006119918252001020010200101297247014916955200352003517428317504200102002020020200356411200211091020010100100000000127001271119995200002017200102003620036200362003620036
200242003515000000001169199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012711199952000000200102003620036200362003620036
2002420035150000000061199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012712199952000000200102003620036200362003620036
2002420035150000000061199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012711199952000000200102003620036200362003620036
2002420035150000000061199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270012723199952000000200102003620036200362003620036
20024200351500000000189199182520010200102001012972470149169552003520035174283175042001020020200202003564112002110910200101001000000001270022721199952000000200102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  adds w0, w8, #3
  adds w1, w8, #3
  adds w2, w8, #3
  adds w3, w8, #3
  adds w4, w8, #3
  adds w5, w8, #3
  adds w6, w8, #3
  adds w7, w8, #3
  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)03l2 tlb miss data (0b)191e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap 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)acbranch cond mispred nonspec (c5)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426762200000352580100801008010040050013492365526735267351667203166908010080200802002673539118020110099100801001000000511001019222673180000801002673626736267362673626736
802042673520000035258010080100801004005001049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000035258010080100801004005001049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000056258010080100801004005000349236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520100035258010080100801004005000049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000035258010080100801004005001049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000035258010080100801004005000049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000035258010080100801004005000049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000035258010080100801004005000049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736
802042673520000035258010080100801004005000049236552673526735166720316690801008020080200267353911802011009910080100100000051100219222673180000801002673626736267362673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)18191e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap 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)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd2l1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267112000000000352580010800108001040005000492362526705267051666503166838001080020800202670539118002110910800101000001090502000118112670280000800102670626706267062670626706
80024267052000000000352580010800108001040005000492362526705267051666503166838001080020800202670539118002110910800101000001030502000118112670280000800102670626706267062670626706
800242670520000000003525800108001080010400050014923625267052670516665031668380010800208002026705391180021109108001010000030030502000118112670280000800102670626706267062670626706
80024267051990000000352580010800108001040005000492362526705267051666503166838001080020800202670539118002110910800101000003004630502000118112670280000800102670626706267062670626706
8002426705200000011413203525800108001080010400050014923625267052670516665031668380010800208002026705391180021109108001010000029000502000118112670280000800102670626706267062670626706
800242670520000000003525800108001080010400050014923625267052670516665031668380010800208002026705391180021109108001010000013000502000118112670280000800102670626706267062670626706
800242670520000000003525800108001080010400050014923625267052670516665031668380010800208002026705391180021109108001010000026000502000118112670280000800102670626706267062670626706
8002426705200000000035258001080010800104000500149236252670526705166650316683800108002080020267053911800211091080010100000001170502000118112670280000800102670626706267062670626706
800242670520000000003525800108001080088400050014923625267052670516665031668380010800208002026705391180021109108001010000029018430503700118112670280000800102670626706267062670626706
800242670520000000003525800108001080010400050014923625267052670516665031668380010800208002026705391180021109108001010000032030502000118112670280000800102670626706267062670626706