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, 64-bit)

Test 1: uops

Code:

  tst x0, x1, 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)033f4c4d51schedule 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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100470956110003042520002000100040877170970949825356110001000200070978111001100001073322336842000710710710710710
100470966110003042520002000100040877170970949825356110001000200070978111001100000073322336842000710710710710710
100470956110003042520002000100040877170970949821356110001000200070978111001100001073322336842000710710710710710
100470968210003042520002000100040877170970949821356110001000200070978111001100000073322336842000710710710710710
100470956110003042520002000100040877070970949825356110001000200070978111001100000073322336842000710710710710710
100470956110003042520002000100040877170970949821356110001000200070978111001100000073322336842000710710710710710
100470956110003042520002000100040877170970949825356110001000200070978111001100000073322336842000710710710710710
1004709561100030425200020001000408771709709498253561100010002000709781110011000013073322336842000710710710710710
100470956110003042520002000100040877170970949825356110001000200070978111001100005073322336842000710710710710710
100470956110003042520002000100040877170970949821356110001000200070978111001100000073322336842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  tst x0, x1, 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)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)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225061100002989325301003010020100195619849269553003530035273693274782010020312302003003514511202011009910020100101000013101331222995430000101003003630036300363003630036
20204300352250726100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035224061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101001013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619849269553003530035274063274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035224061100002989325301003010020100195619849269553003530081273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
202043006622506414100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619849270003003530035273693274782010020200302003003514511202011009910020100101000013101231322995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03091e3f4c4d51schedule 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)acc2branch cond mispred nonspec (c5)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200243003522400611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
200243003522400611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225006311000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133222995830000100103003630036300363003630036
200243003522503611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133212995830000100103003630036300363003630036
200243003522400611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270117112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133122995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010200001270133122995830000100103003630036300363003630036
200243003522400611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289149269550300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  tst x0, x1, 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)1e3a3f4c4d51schedule 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 cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500023010000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010020013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530070300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231242995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500012810000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
20204300352240006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231232995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)033f4c4d51schedule 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
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270233112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270233112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352251044100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628904926955300353003527391327532200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010101270133112995830000100103003630036300363003630036
2002430035225409100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430067225156100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  tst x0, x1, asr #17
  tst x0, x1, asr #17
  tst x0, x1, asr #17
  tst x0, x1, asr #17
  tst x0, x1, asr #17
  tst x0, x1, asr #17
  tst x0, x1, asr #17
  tst x0, x1, 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)03l2 tlb miss instruction (0a)1e3f4c4d51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020453435400012618000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000511032422533921600001005341153411534115341153411
8020453410400002518000048741251601001601008010034400051495033053523534104329820603433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400051495033053410534104329820633433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802055341039900618000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534545341153411
802045341040000618000048741251601001601008010034400051495033053410534104329820603433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400051495039053410534104329820603433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000511022422533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0309191e1f3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f696a6d6emap 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 miss (a1)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024533834000000061800004794625160010160010800103438130049503005338053380432902562124334580010800201600205338078118002110910800101000000502092402453359160000105338153381533815338153381
8002453380400000006180000479462516001016001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000000502042404253371160000105338153381533815338153381
8002453380399000008280000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000001502022404253359160000105338153381533815338153381
8002453380400000006180000479462516001016001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000000502042404353359160000105338153381533815338153381
8002453380399000006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502042405353359160000105338153381533815338153381
8002453380399000006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502022402453359160000105338153381533815338153381
8002453380400009006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502042404353359160000105338153381533815338153381
8002453380400009006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502042404353359160000105338153381533815338153381
8002453380399000006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502022404253359160000105338153381533815338153381
8002453380400000006180000479462516001016001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000000502022402453359160000105338153381533815338153381