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

Test 1: uops

Code:

  tst x0, x1
  mov x0, 1
  mov x1, 2

(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)031e1f3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6d6emap 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
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043692003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043692003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043692003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370
10043693003625100010001000500036936920632251000100020003696611100110000073118113661000370370370370370

Test 2: Latency 3->1

Chain cycles: 1

Code:

  tst x0, x1
  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): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4d51schedule 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000611993025201002010020112129723304916955200352003517425617487201122022430236200351041120201100991002010010100000011113220216452001120000101002003620036200362003620036
2020420035150007261993025201002010020112129721804916955200352003517425617487201122022430236200351041120201100991002010010100000011113180116112001120000101002003620036200362003620036
202042003515000611993025201002010020112129723304916955200352003517425617487201122022430236200351041120201100991002010010100000011113180116322001320000101002003620036200362003620036
202042003515000611993025201002010020112129721804916955200352003517425617487201122022430236200351041120201100991002010010100000011113180116122001120000101002003620036200362003620036
202042003515000611993025201252012520138129721814916955200352003517425717487201122022430236200351041120201100991002010010100000011113180116112001120000101002003620036200362003620036
20204200351500061199302520100201002013812972181491695520035200351742561748720112202243023620035104112020110099100201001010000621211113180116112001120000101002003620036200362003620036
2020420035150048821993025201462010020112129721814916955200352003517425617487201122022430236200351041120201100991002010010100000011113180116112001120000101002003620036200362003620036
202042003515000611993025201002010020112129721814916955200352003517425617487201122022430236200351041120201100991002010010100003311113180416442001120045101002003620036200362003620036
2020420035150007261993025201002010020112129723314916955200352003517425617487201122022430236200351041120201100991002010010100000011113200216112001120000101002003620036200362003620036
202042003515000611993025201002010020138129723314916955200352003517425617487201122022430236200351041120201100991002010010100000011113210116112001120000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)1e3a3f4d51schedule 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 miss (a1)l1d cache writeback (a8)acc2cfd2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9ddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
20024200351500000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700032702219995200000100102003620036200362003620036
200242003515000180611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700022703219995200000100102003620036200362003620036
2002420035150002790611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700022702219995200000100102003620036200362003620036
20024200351500000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700032702319995200000100102003620036200362003620036
200242003515000003461991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012870032702219995200000100102003620036200362003620036
200242003515000270611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700022702219995200000100102003620036200362003620036
20024200351500000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700022702319995200000100102003620036200362003620036
200242003515000780611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700022702219995200000100102003620036200362003620036
2002420035150005820611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700022703219995200000100102003620036200362003620036
20024200351500000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010000012700025802219995200000100102003620036200362003620036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  tst x0, x1
  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): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule 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 cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515006119930252010020100201121297233049169552003520035174256174872011220224302362003510411202011009910020100101000311113180116112001120000101002003620036200362003620036
2020420035150061199302520100201002011212972331491695520035200351742561748720112202243023620035104112020110099100201001010054911113180116112001120000101002003620036200362003620036
202042003515006119926252010020100201001297150049169552008120035174173174812010020200302002003510411202011009910020100101003000013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101001300013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101002300013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101001300013101228221999220000101002003620036200362003620036
202042021615006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
2020420035150053619926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101000600013101228221999220000101002003620036200362003620036
2020420035150061199262520100201002010012971501491695520035200351740631748120100202003020020035104112020110099100201001010013000013101335221999220000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e1f3f4d51schedule 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
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010031270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
2002420035150088611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200812003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
2002420035150002511991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127121999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127211999520000100102003620036200362003620036
20024200351504590611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
20024200351503900611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  tst x0, x1
  tst x0, x1
  tst x0, x1
  tst x0, x1
  tst x0, x1
  tst x0, x1
  tst x0, x1
  tst x0, x1
  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.3342

retire uop (01)cycle (02)031e3f51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042675420003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051102191126731800001002673626736267362673626736
802042673520103525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626789267362673626736
802042673520003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520005625801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520003525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267362673626736
802042673520103525801008010080100400500049236552673526735166723166908010080200160200267356611802011009910080100100051101191126731800001002673626736267782673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule 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)d9ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267212001235258001080010800104000501492362526705267051666531668380010800201600202670566118002110910800101000050202518013232670180000102670626706267062670626706
8002426705200035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050202318013232670180000102670626706267062670626706
8002426705199077258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050202318023232670180000102670626706267062670626706
8002426705200935258001080010800104000501492362626705267051666531668380010800201600202670566118002110910800101000050202318023232670180000102670626706267062670626706
800242670520037835258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101010050202318018232670180000102670626706267062670626706
800242670520045035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050201718024202670180000102670626706267062670626706
8002426705200635258001080010800104000500492362626705267051666531668380010800201600202670566118002110910800101000050201818023182670180000102670626706267062670626706
80024267052001535258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050202318023232670180000102670626706267062670626706
800242670520041735258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050202318017232670180000102670626706267062670626706
800242670520027635258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050201918012232670180000102670626706267062670626706