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

ADCS (64-bit)

Test 1: uops

Code:

  adcs x0, x0, x1
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.001

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000
100410301001100110002504310001000300010011000

Test 2: Latency 1->2

Code:

  adcs x0, x0, x1
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
10204100301010110101101082515201010610206302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
10024100301002110021100292531611002010020300201001110010
10024100301002110021100202532841002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010

Test 3: Latency 1->3

Code:

  adcs x0, x1, x0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
10204100301010110101101092515201010610206302241000110100
10204100301010110101101082516581010610206302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100
10204100301010110101101082517741010810208302241000110100

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
10024100301002110021100292532561002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202532391002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010
10024100301002110021100202531611002010020300201001110010

Test 4: Latency 1->4

Chain cycles: 1

Code:

  adcs x0, x1, x2
  tst x0, 1
  mov x0, 1
  mov x1, 2
  mov x2, 3

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
20204200302020120201202095086812020820208402162010110100
20204200302020120201202115090182020820208402242010110100
20204200302020120201202085090182020820208402162010110100
20204200302020120201202085090182020820208402162010110100
20204200302020120201202085090182020820208402162010110100
20204200302020120201202085090182020820208402162010110100
20204200302020120201202085090182020820208402162010110100
20204200302020120201202085090182020820208402162010110100
20205200602021520215202465090182020820208402162010110100
20204200302020120201202085090182020820208402162010110100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
20024200302002120021200315097562003020032400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010
20024200302002120021200205099042002020020400202001110010

Test 5: Latency 4->2

Chain cycles: 1

Code:

  adcs x0, x1, x2
  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.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
20204200302010120101201085194132010720214402322000120100
20204200302010120101201075195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216405142006920100
20204202292018520185202845204702019520308402322000120100
20204200302010120101201085195482010820216402322000120100
20204200802012220122201525200062015420262402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085200192015220262402322000120100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
20024200302001120011200185195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020401402001520010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010

Test 6: Latency 4->3

Chain cycles: 1

Code:

  adcs x0, x1, x2
  cset x2, 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.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
20204200302010120101201085194342010720212402282000120100
20204200302010120101201085194342010720214402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20205200602011520115201485195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100
20204200302010120101201085195482010820216402322000120100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
20024200302001120011200185194112001820036400442000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105199562005820080400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010
20024200302001120011200105195982001020020400202000120010

Test 7: Latency 4->4

Code:

  adcs x0, x1, x2
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
10204100301020110201102082528581020810208302301010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100
10204100301020110201102082534321020810208302241010110100

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0030

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
10024100301002110021100292532351002910032300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010
10024100301002110021100202533831002010020300201001110010

Test 8: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  adcs x0, x8, x9
  ands xzr, xzr, xzr
  adcs x1, x8, x9
  ands xzr, xzr, xzr
  adcs x2, x8, x9
  ands xzr, xzr, xzr
  adcs x3, x8, x9
  ands xzr, xzr, xzr
  adcs x4, x8, x9
  ands xzr, xzr, xzr
  adcs x5, x8, x9
  ands xzr, xzr, xzr
  adcs x6, x8, x9
  ands xzr, xzr, xzr
  adcs x7, x8, x9
  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.7992

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
1602046404916011416011416012068209816011516021624028716005080100
1602046395216011316011316011968224416011516021624022416001180100
1602046394116011116011116011868207916011616021624023016001180100
1602046393316011516011516011968217016011916022024023016001580100
1602046393716011316011316011968208916011816022024023016001180100
1602046393716011116011116011568199716011616021624023016001580100
1602046393716011116011116011568207916011616021624023016001580100
1602046393716011116011116011568225316011816022024023016001580100
1602046393816011316011316011768214716011516021624023016001580100
1602056395716014916014916015668222716011516021624023016001580100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
1600246561616002316002316002806818000160010160020024002016000180010
1600246398116001116001116001006823820160010160020024002016000180010
1600246395216001116001116001006827480160010160020024002016000180010
1600246388616001116001116001006860370160010160020024002016000180010
1600246389116001116001116001006788610160010160020024002016000180010
1600246386816001116001116001006825000160010160020024002016000180010
1600246388416001116001116001006824020160010160020024002016000180010
1600246387816001116001116001006825950160010160020024007716003680010
1600246388816001116001116001006827980160010160020024002016000180010
1600246378916001116001116001006859660160010160020024002016000180010

Test 9: throughput

Count: 4

Code:

  fcmp s0, s0
  adcs x0, x4, x5
  adcs x1, x4, x5
  adcs x2, x4, x5
  adcs x3, x4, x5
  mov x4, 5
  mov x5, 6
  mov x6, 7

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? int retires (ef)
5020424911501094010610003401141000403149040400175011640212010004120236200084000140100
5020424831501044010110003401121000403092220400175011640212010004120236200084000240100
5020424831501044010110003401121000403092220400175011640212010004120236200084000140100
5020424831501044010110003401121000403092240400175011640212010004120236200084000140100
5020424831501044010110003401121000403092220400175011640212010004120236200084000140100
5020424831501044010110003401121000403092220400175011640212010004120236200084000140100
5020424831501044010110003401121000403092220400175011640212010004120236200084000140100
5020424831501044010110003401121000403100520401065023340307010026120236200084000140100
5020424831501044010110003401121000403092220400175011640212010004120236200084000140100
5020424831501044010110003401121000403092220400175011640212010004120236200084000140100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? int retires (ef)
5002424850500164001410002400241000431204940017500264003210004120020200004000140010
5002424790500114001110000400101000031197640000500104002010000120020200004000140010
5002424789500114001110000400101000031197640000500104002010000120020200004000140010
5002424789500114001110000400101000031197640000500104002010000120020200004000140010
5002424789500114001110000400101000031197640000500104002010000120020200004000140010
5002424789500114001110000400101000031197840000500104002010000120020200004000140010
5002424789500114001110000400101000031197840000500104002010000120020200004000140010
5002424789500114001110000400101000031197640000500104002010000120020200004000140010
5002424789500114001110000400101000031197840000500104002010000120020200004000140010
5002424789500114001110000400101000031197840000500104002010000120020200004000140010

Test 10: throughput

Count: 7

Code:

  ands xzr, xzr, xzr
  adcs x0, x7, x8
  adcs x1, x7, x8
  adcs x2, x7, x8
  adcs x3, x7, x8
  adcs x4, x7, x8
  adcs x5, x7, x8
  adcs x6, x7, x8
  mov x7, 8
  mov x8, 9
  mov x9, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
802044092280110801108011654088680116802162102428001070100
802044090580107801078011254033680156802562102308000770100
802044090580107801078011254102880112802122102308000770100
802044090580107801078011254102880112802122102308000770100
802044090580107801078011254102880112802122102308000770100
802044090580107801078011254102880112802122102308000770100
802044090580107801078011254102880112802122102308000770100
802044090580107801078011254102880112802122102308000770100
802044090580107801078011254102880112802122102308000770100
802044088680110801108011654197280148802482102308000770100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)dispatch uop (78)map int uop (7c)map int uop inputs (7f)? int output thing (e9)? int retires (ef)
800254084580058800588007354174880036800362100208001170010
800244087680021800218002054262480020800202100208001170010
800244087680021800218002054262480020800202100208001170010
800244087680021800218002054262480020800202100208001170010
800244087680021800218002054262480020800202100208001170010
800244079780021800218002054262480020800202100208001170010
800244087680021800218002054262480020800202100208001170010
800244087680021800218002054262480020800202100208001170010
800244084580021800218002054262480020800202100208001170010
800244087680021800218002054262480020800202100208001170010