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

Test 1: uops

Code:

  tst x0, #3
  mov x0, 1

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f51schedule 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)f5f6f7f8fd
10043693036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043692036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043693036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043693041251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043693036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043692036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043693036251000100010005000036936920632251000100010003696611100110000073118113661000370370370370370
10043693036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043693057251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370
10043692036251000100010005000136936920632251000100010003696611100110000073118113661000370370370370370

Test 2: Latency 2->1

Chain cycles: 1

Code:

  tst x0, #3
  cset x0, cc
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e3a3f4d51schedule 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)branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515057061199302520100201002011212972334916955200352003517425617456201002022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
20204200351500061199282520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002006720036200362003620036
20204200351500061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
20204200351490061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
2020420035149495061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
202042003515021061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
202042003515021061199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036
202042003515000536199302520100201002011212972334916955200352003517425617487201122022420224200351041120201100991002010010100011113180116112001120000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f4d51schedule 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500014919918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270327111999520000100102003620036200362003620036
2002420035150008219918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
20024200351500019919918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
20024200351500017419918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
20024200351500019119918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
2002420035150008219918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000101270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036
20024200351500014519918252001020010200101297247491695520035200351742831750420010200202002020035104112002110910200101001000001270127111999520000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  tst x0, #3
  tst x0, #3
  tst x0, #3
  tst x0, #3
  tst x0, #3
  tst x0, #3
  tst x0, #3
  tst x0, #3
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426750200101000120091278011580115801214005901492365926739267391667961668980121802328029626739661180201100991008010010000000039011151183161126736800151002674026740267402674026740
8020426739201101000300355278011580115801214005901492365926739267391667961668980121804398023226739661180201100991008010010000001400011151181161126736800151002674026740267402674026740
8020426878200101000117004927801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000000000011151181161126736800151002674026740267402687626740
80204267392011010003007027801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000000003011151181161126736800151002674026740267402674026740
80204267392011010001110023927801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000000000011151181161126736800151002674026740267402674026740
8020426739207101000147004927801158011580121400590149236592673926739166796166898012180494802322673966118020110099100801001000000000011151182161226736800151002674026740267402674026740
802042673920010100000054527801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000000100011151181161126736800151002674026740267402674026740
8020426739201101000300278278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000001057011151181161126736800151002674026740267402674026740
802042673920110100039007352780115801158012140059014923659267392673916679616689801218023280232267396611802011009910080100100000010918011151181161126736800151002674026740267402674026740
80204267392001010000007027801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000000100011151181161126736800151002674026740267402674026740

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3a3f51schedule 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)9faccfd2l1i cache miss demand (d3)d5map dispatch bubble (d6)dadbddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
8002426722200003525800108001080010400050014923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800640102670626706267062670626706
8002426705200003525802658013880010400050004923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
800242670520048303525800108001080010400050014923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
800242670520046203525800108001080010400050004923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
800242670520044103525800108001080010400050004923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
800242670520025503525800108001080010400050004923625267052670516665316683800108002080020267056611800211091080010100503600218002226701800000102670626706267062670626706
8002426705200003525800108001080010400050014923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
8002426705199189051025800108001080010400050014923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
800242670520032403525800108001080010400050014923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706
800242670520016503525800108001080010400050014923625267052670516665316683800108002080020267056611800211091080010100502000218002226701800000102670626706267062670626706