Skip to content

Commit 8547069

Browse files
committed
Enable testing for Zba, Zbb, Zbc, and Zbs extensions
Update the RISC-V architectural test to include support for testing the Zba, Zbb, Zbc, and Zbs extensions. With this change, users can run tests for these extensions using the following command: make arch-test RISCV_DEVICE=IMZbaZbbZbcZbs
1 parent 29dabe4 commit 8547069

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/arch-test-target/setup.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@ def setup_testlist(riscv_device):
2424
if 'C' in riscv_device:
2525
misa |= constants.misa_C
2626
ISA += 'C'
27+
if 'Zba' in riscv_device:
28+
ISA += '_Zba' if 'Z' in ISA else 'Zba'
29+
if 'Zbb' in riscv_device:
30+
ISA += '_Zbb' if 'Z' in ISA else 'Zbb'
31+
if 'Zbc' in riscv_device:
32+
ISA += '_Zbc' if 'Z' in ISA else 'Zbc'
33+
if 'Zbs' in riscv_device:
34+
ISA += '_Zbs' if 'Z' in ISA else 'Zbs'
2735
if 'Zicsr' in riscv_device:
28-
ISA += 'Zicsr'
36+
ISA += '_Zicsr' if 'Z' in ISA else 'Zicsr'
2937
if 'Zifencei' in riscv_device:
30-
ISA += '_Zifencei' if 'Zicsr' in ISA else 'Zifencei'
38+
ISA += '_Zifencei' if 'Z' in ISA else 'Zifencei'
3139

3240
with open(ispec, 'r') as file:
3341
try:

0 commit comments

Comments
 (0)