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

SUB (sxtb, 64-bit)

Test 1: uops

Code:

  sub x0, x0, w1, sxtb
  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)03l2 tlb miss data (0b)1e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606b6d6emap 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
100420351500661000173525200020001000325700020352035157531842100010002000203542111001100000733673317812000100020362036203620362036
100420351600611000173525200020001000325700020352035157531842100010002000203542111001100000732672317812000100020362036203620362036
100420351700611000173525200020001000325700020352035157531842100010002000203542111001100000733673317812000100020362036203620362036
100420351500811000173525200020001000325700020352035157531842100010002000203542111001100000733673217812000100020362036203620362036
1004203516006110001735252000200010003257000203520351575318421000100020002035421110011000520733673317812000100020362036203620362036
100420351600611000173525200020001000325700020352035157531842100010002000203542111001100000733673317812000100020362036203620362036
100420351500751000173525200020001000325700020352035157531842100010002000203542111001100000733672317812000100020362036203620362036
100420351600611000173525200020001000325700020352035157531842100010002000203542111001100000733673317812000100020362036203620362036
100420351500611000173525200020001000325700020352035157531842100010002000203542111001100000733673317812000100020362036203620362036
100420351500611000173525200020001000325700020352035157531842100010002000203542111001100000733672217812000100020362036203620362036

Test 2: Latency 1->2

Code:

  sub x0, x0, w1, sxtb
  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)0318191e3f4c4d51schedule 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
1020420035150000611000019803862010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010010710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010010710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500021611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010010710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159121982220000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010362102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)0318191e1f3f4c4d51schedule 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)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100300640263221979220000100102003620036200362003620036
100242003515000006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101002870640263321979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100100640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100230640263231979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100300640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853104916955200352003518451318718100101002020020200354211100211091010010100100640263221979220000100102003620036200362003620036

Test 3: Latency 1->3

Code:

  sub x0, x1, w0, sxtb
  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)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 cache writeback (a8)accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204200351500661000019803252010020100101001853420549169552003520035184293187001010010200202002003542111020110099100101001000071052159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853420549169552003520035184293187001010010200202002003542111020110099100101001001071000159111979120000101002003620036200362003620129
10204200351500611000019803252010020100101001870681049169552003520035184293187001010010200202002003542111020110099100101001000071000159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853420549169552003520035184293187001010010200202002003542111020110099100101001000071000159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853420049169552003520035184293187001010010200202002003542111020110099100101001000071000159111979120000101002003620036200362003620036
10204200351490611000019803252010020100101001853420549169552003520035184293187001010010200202002003542111020110099100101001000071054159111979120000101002003620036200362003620036
10204200351500991000019803252010020100101001853421049169552003520035184293187001010010200202002003542111020110099100101001000071000159111979120000101002017720036200362003620036
102042003515006110000198032520100201001010018534210491695520035200351842931870010100102002020020035421110201100991001010010053371000159111979120000101002003620036200362003620036
102042003515001601000019803252010020100101001853421049169552003520035184293187001010010200202002003542111020110099100101001000071051159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853420549169552003520035184293187001010010200202002003542111020110099100101001000071000159111979120000101002003620036200362003620036

1000 unrolls and 10 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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000640463221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101030640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200792003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101020640263221979220000100102003620036200362003620036
100242003514906110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101013640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101013640263221979220000100102003620036200362003620036
1002420035150044110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531049169552003520035184513187181001010020200202003542111002110910100101010640263221979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  sub x0, x8, w9, sxtb
  sub x1, x8, w9, sxtb
  sub x2, x8, w9, sxtb
  sub x3, x8, w9, sxtb
  sub x4, x8, w9, sxtb
  sub x5, x8, w9, sxtb
  sub x6, x8, w9, sxtb
  sub x7, x8, w9, sxtb
  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)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4c4d51schedule 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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042676720000000014580000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000000051102221126717160000801002672626726267262672626726
80204267252000000006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
802042672520000000061800002609425160100160100801001643181492364526725267251661525166778010080200160200267253911802011009910080100100000100051101221126717160000801002672626726267262672626726
8020426725200000026444019380000260942516010016010080100164318149236452672526845166183166778074980848162374270163961802011009910080100100402103401452291641127020160000801002701927020270752708127080
802042701620210556694406180000260942516010016010080100164318149236452672526788166153166778010080200160200267253911802011009910080100100000000251821641126966161120801002672626788267262672626726
8020426725200000066952815678049923751148161233161047811741811171492399827021270211662745168198117281272162788270193961802011009910080100100000000051101221126717160000801002672626726267262679226726
8020426725200100000193800782606274160100160497805281773741492388326784267911662135167718031481072161068269023931802011009910080100100000000051102542126717160000801002672626726267872678526902
8020427020202111366944016748048824587194161429161237811721875131492399527078270761662561168198137181505162786270773971802011009910080100100000000051101221126717160000801002672626726267262672626726
80204267252000000006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100444002175052071551126717160000801002672626726267262672626726
80204267252000000906180000260942516010016010080100164318149236452672526788166153166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e1f3f4c4d51schedule 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd0d2d5map dispatch bubble (d6)d9ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267352000010380000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200042202226704160000800102671226712267122671226712
80024267112000025180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200422202226704160000800102671226712267122671226712
80024267112000063180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022202226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022202226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022202226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236870267712671116623316685800108002016002026711391180021109108001010300050200022202226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022222226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022202226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022203226704160000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010000050200022202226704160000800102671226712267122671226712