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

ADD (uxtw, 64-bit)

Test 1: uops

Code:

  add x0, x0, w1, uxtw
  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)031e3f4c4d51schedule 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
1004203515061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035160891000173525200020001000325701203520351575318421000100020002035421110011000018731671117812000100020362036203620362036
1004203515061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515082100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515082100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203516061100017352520002000100032570120352035157531842100010002000203542111001100003731671117812000100020362036203620362036
1004203515061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  add x0, x0, w1, uxtw
  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)03l2 tlb miss data (0b)1e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)int prf full (71)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
10204200351500006110000198032520100201001010018534214916955200352003518429031870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534204916955200352003518429031870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150031206110000198032520100201001010018534204916955200352003518429031870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200801500006110000198032520100201001010018534204916955200352003518484031870010100102002020020035421110201100991001010010000710268111983120000101002003620036200362008220036
10204201251500006110000198032520100201001010018534204916955200352003518429031870010100102002020020035421110201100991001010010013710159111979120069101002003620036200362003620036
10204200351511010461310000198032520100201001010018534204916955200352003518429031870010100102002020020035421110201100991001010010003710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534204916955200352003518429031870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534204916955200352003518429031870010100102002020020035421110201100991001010010000733159121982420035101002003620036200362008120081
10204200351501008210000197772520100201431010018901804916955200352003518429031870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515000010310000198032520100201001010018534214916955200352003518429031870010100102002020020035421110201100991001010010000710159111979120033101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)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)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)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420035150000000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000006000640563551979220000100102003620036200362003620036
1002420035150000000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000205400640663661979220000100102003620036200362003620036
10024200351500000000150061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000001500640663441979220000100102003620036200362003620036
100242003515000000000006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000000000640663651979220000100102003620036200362003620036
100242003515000000009006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000000000640663661979220000100102003620036200362003620036
100242003515000000000006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000000000640663561979220000100102003620036200362003620036
100242003514900000000006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000000000640663441979220000100102003620036200362003620036
100242003515000000000006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000000900640563541979220000100102003620036200362003620036
1002420035150000000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000008700640663561979220000100102003620036200362003620036
1002420035150000000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000007500640563551979220000100102003620036200362003620036

Test 3: Latency 1->3

Code:

  add x0, x1, w0, uxtw
  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)031e3f4c4d51schedule 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
1020420035150061100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000102710159111979120000101002003620036200362003620036
102042003514906110000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100090710159111979120000101002003620082200852017520036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710117111979120000101002003620036200362003620036
102042003515015611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515006110000197572520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100012710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036

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)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)9fl1d tlb access (a0)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420035150006110000197432520010200101001018531000491695520035200351845131871810010100202002020035421110021109101001010006064000263221979220000100102003620036200362003620036
1002420035150006110000197432520010200101001018531000491695520035200351845131871810010100202002020035421110021109101001010000064000263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310104916955200352003518451318718100101002020020200354211100211091010010100066064000263221979220000100102003620036200362003620036
10024200791500061100001974325200102001010010185310104916955200352003518451318718100101002020020200354211100211091010010100084064000263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310004916955200352003518451318718100101002020020200354211100211091010010100066064000263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310004916955200352003518451318718100101002020020200354211100211091010010100087064000263221979220000100102003620036200362003620036
10024200351500044110000197432520010200101001018531000491695520035200351845131871810010100202002020035421110021109101001010000064000263221979220000100102003620036200362003620036
1002420035150006110000197432520010200101001018531000491695520035200351845931871810010100202002020035421110021109101001010000064000263121979220000100102003620036200362003620036
1002420035150006110000197912520010200101001018531000491695520035200351845131871810010100202002020035421110021109101001010000064000263221979220000100102003620036200362003620036
1002420035150006110000197432520010200101001018531000491695520035200351845131871810010100202002020035421110021109101001010000064000263221979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  add x0, x8, w9, uxtw
  add x1, x8, w9, uxtw
  add x2, x8, w9, uxtw
  add x3, x8, w9, uxtw
  add x4, x8, w9, uxtw
  add x5, x8, w9, uxtw
  add x6, x8, w9, uxtw
  add x7, x8, w9, uxtw
  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.3341

retire uop (01)cycle (02)031e1f3f4c4d51schedule 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)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042674820000618000026094251601001601008010016431814923645267252672516615316677801008020016020026725391180201100991008010010017870051103222226717160000801002672626726267262672626726
8020426725200006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000051102222226717160000801002672626726267262672626726
802042672520000618000026094251601001601008010016431814923645267252672516615316677801008020016020026725391180201100991008010010024630051102222226717160000801002672626726267262672626726
8020426725200006180000260942516010016010080100168037149236452672526725166153166778010080200160200267253911802011009910080100100000051102222226717160000801002672626726267262672626726
80204267252000061800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001001830051102222226717160000801002672626726267262672626726
80204267252000061800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001001930051102222226717160000801002672626726267262672626726
8020426725200006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100930051102222226717160000801002672626726267262672626726
80204267252009061800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001003230051102222226717160000801002672626726267262672626726
8020426725200006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000051102222226717160000801002672626726267262672626726
80204267252000061800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001001730051102222226717160000801002672626726267262672626726

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4c4d51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ec? int retires (ef)f5f6f7f8fd
80024267172001061800002128025160010160010800101631421492363126711267111662331668580010800201600202671139118002110910800101015005020242288267041600000800102671226712267122671226712
80024267112000426180000212802516001016001080010163142049236312671126711166233166858001080020160020267113911800211091080010104660502062258267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002016002026711391180021109108001010459050201022128267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236312671126711166233166858001080020160020267113911800211091080010107305020522610267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002016002026711391180021109108001010000502052258267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002016002026711391180021109108001010193050201022512267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142149236312671126711166233166858001080020160020267113911800211091080010100840502092295267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142149236312671126711166233166858001080020160020267113911800211091080010101730502072274267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314214923631267112671116623316685800108002016002026711791180021109108001010333050207221092670416000017800102671226712267122671226712
800242671120000618000021280251600101600108001017934714923631267112671116623316685800108002016002026711391180021109108001010002502092288267041600000800102671226712267122671226712