Skip to content

Commit afbb5b4

Browse files
committed
Fix F register count to 32 for RV32E with F extension
According to RV32E Base Integer Instruction Set, Version 1.9 [1]: RV32E can be combined with all current standard extensions. Defining the F, D, and Q extensions as having a 16-entry floating point register file when combined with RV32E was considered but decided against. When RV32E is used with floating-point extensions, the floating-point register file should have 32 entries instead of N_RV_REGS (16). Adjust array size accordingly. [1] https://five-embeddev.com/riscv-user-isa-manual/Priv-v1.12/rv32e.html#rv32e
1 parent 1286b3c commit afbb5b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/riscv_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct riscv_internal {
131131

132132
#if RV32_HAS(EXT_F)
133133
/* float registers */
134-
riscv_float_t F[N_RV_REGS];
134+
riscv_float_t F[32];
135135
uint32_t csr_fcsr;
136136
#endif
137137

0 commit comments

Comments
 (0)