Skip to content

Commit 6ea577d

Browse files
committed
target/riscv: vector CSRs are optional
This is a fix to a mistake made in ea7e174. The newly introduced `gdb_regno_exist()` function was missing a part regarding vector CSRs. Link: riscv-collab@ea7e174#diff-b4aa16f9e42cb8f0934baa7c8e0ec9c70a369bef98b99b26ae2e896c8aa95d6aL6163-L6171 Change-Id: I0361ea4dce8df5be748e2c6e7e6838029d3a7120 Signed-off-by: Evgeniy Naydanov <[email protected]>
1 parent 4b5668b commit 6ea577d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/target/riscv/riscv_reg.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,14 @@ static bool gdb_regno_exist(const struct target *target, uint32_t regno)
397397
case CSR_FRM:
398398
case CSR_FCSR:
399399
return riscv_supports_extension(target, 'F');
400+
case CSR_VSTART:
401+
case CSR_VXSAT:
402+
case CSR_VXRM:
403+
case CSR_VL:
404+
case CSR_VCSR:
405+
case CSR_VTYPE:
406+
case CSR_VLENB:
407+
return vlenb_exists(target);
400408
case CSR_SCOUNTEREN:
401409
case CSR_SSTATUS:
402410
case CSR_STVEC:

0 commit comments

Comments
 (0)