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

TST (register, asr, 32-bit)

Test 1: uops

Code:

  tst w0, w1, asr #17
  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)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 int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100470950611000304252000200010004087717097094982535611000100020007097811100110000073222116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116862000710710710710710
1004709506110003042520002000100040877170970949825356110001000200070978111001100013073122116842000710710710710710
100470960611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  tst w0, w1, asr #17
  cset x0, cc
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

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)ld unit uop (a6)l1d cache writeback (a8)a9acc2cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000090013101231322995430000101003003630036300363003630036
202043003522500000025110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001170013101231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619804926955300353003527369122747820100202003020030035145112020110099100201001010000001200013101231222995430000101003003630036300363003630036
20204300352250000006110000298932530130301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001020013101231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195896804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036
2020430035225000000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000960013101231222995430000101003003630036300363003630036
2020430035224000000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000750013101231222995430000101003003630036300363003630036
20204300352250000006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001320013101231222995430000101003003630036300363003630036
20204300352250000006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001170013101231222995430000101003003630036300363003630036
2020430035225000000611000029893253010030100201001957577049269553003530035273693274782010020200302003003514511202011009910020100101000053030013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4c4d51schedule 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 miss (a1)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)d9daddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
2002430035225008210000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000012701330011299583000000100103003630036300363003630036
20024300352250021210000298912530010300102001019562890149269553003530035273913275762001020020300203003514511200211091020010100100000012702330011299583000000100103003630036300363003630036
200243003522500841000029891253001030010200101956289004926955300353003527391327498200102002030020300351451120021109102001010010040901270133112129958300001614100103003630036300363003630036
20024300352251084100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001002000127013300112995830000160100103003630036300363003630036
20024300352250010310000298912530010300102001019562890149269553003530035273913274982001020020300203003514511200211091020010100100000012701330011299583000000100103003630036300363003630036
2002430035225008210000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000012701330011299583000000100103003630036300363003630036
2002430035225008410000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000012701330011299583000000100103003630036300363003630036
2002430035225009010000298912530010300102001019562890149269553003530035273913274982001020020300203003514511200211091020010100100000012701330012299583000000100103003630036300363003630036
2002430035225008410000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000012703330011299583000000100103003630036300363003630036
2002430035225008210000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100100012701330011299583000000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  tst w0, w1, asr #17
  cset x1, cc
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

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)a9accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000016213101231332995430000101003003630067300363003630036
20204300352250061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100001213101231222995430000101003003630036300363003630036
20204300352250061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100360013101231232995430000101003003630036300363003630036
20204300352250061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100001513101331322995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010030013213101331222995430000101003003630036300363003630036
202043003522400726100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100420013101231332995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010070913101331332995430000101003003630036300363003630036
20204300352250061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100340013101331332995430000101003003630036300363003630036
20204300352250061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100420313101231232995430000101003003630036300363003630036
20204300352250061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100400013101231232995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

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 tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250014511000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100031270233112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
200243003522500991000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
200253003522500611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
200243003522500841000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100001270133122995830000100103003630036300363003630036
2002430035225001261000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100401295133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  tst w0, w1, asr #17
  tst w0, w1, asr #17
  tst w0, w1, asr #17
  tst w0, w1, asr #17
  tst w0, w1, asr #17
  tst w0, w1, asr #17
  tst w0, w1, asr #17
  tst w0, w1, asr #17
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap 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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802045345640100000001248000048741251601001601008010034400050495033005341053410432982063343360801008020016020053410781180201100991008010010000000000511032413533921600001005341153411534115341153411
802045341040000000007268000048741251601001601008010034400050495033005341053410432982063343360801008020016020053410781180201100991008010010000001000511012411533921600001005341153411534115341153411
80204534104000000000618000048741251601001601008010034400050495033005341053410432982063343360801008020016020053470781180201100991008010010000002000511012411533921600001005341153411534115341153411
802045341040000000120618000048741251601001602868010034400050495033005357853410432982063343360801008020016020053410781180201100991008010010020000000511012411533921600001005341153411534115341153411
80204534104000000000618000048741251601001601008010034400050495033005341053410432982063343360801008020016020053410781180201100991008010010000001000511012411533921600001005341153411534115341153411
80204536264000000000618000048741251601001601008010034400050495033005341053410432982063343360801008020016020053410781180201100991008010010000002000511012411533921600001005341153411534115341153411
802045341040000000001898000048741251601001601008010034400050495033005341053410432982063343360801008020016020053630781180201100991008010010000002000511012411533921600001005341153411534115341153411
80204534104000000000618000048741251601001601008010034400050495033005341053410432982063343360801008020016020053410781180201100991008010010000000000511012411533921600001005341153411534115341153411
802045341040000000001248000048741251601001601008010034400050495033005341053410432982063343360801008020016020053410781180201100991008010010000000000511012411533921600001005341153411534115341153411
8020453626399000004802318000048741251601001601008052134400050495033005341053410432982063343360801008020016020053410781180201100991008010010000000000511015511533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

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)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)branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)dadbddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
800245340240006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020152400115533591600000105338153381533815338153381
800245338039906180000479462516001016001080010343813004950300533805338043290256274338680010800201600205338078118002110910800101000005020152400515533591600000105338153381533815338153381
800245338040006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000005020152400415533591600000105338153381533815338153381
800245338040006680000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000005020524001515533591600000105338153381533815338153381
800245338040006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000005020152400133533591600000105338153381533815338153381
8002453380400025180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000005020152400115533591600000105338153381533815338153381
800245338040006180000479462516001016001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000005020152400415533591600000105338153381533815338153381
800245338040006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000005020152400515533591600000105338153381533815338153381
80024533803990618000047946251600101600108001034381300495030053380533804329025623433528001080020160020533807811800211091080010100000502052400135533591600000105338153381533815338153381
80024533804000662280000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020152400512533591600000105338153381533815338153381