Commit f6af403
committed
Raise exception when RV32E instructions use x16-x31
Modify rv_decode() to enforce RV32E register constraints by validating
rd, rs1, rs2, and rs3, ensuring they remain within x0-x15. If an
instruction attempts to use x16-x31, trigger an illegal instruction
exception, aligning with RISC-V privileged architecture behavior.
According to The RISC-V Instruction Set Manual Volume I: Unprivileged
Architecture, Version 20240411:
"RV32E and RV64E ... only registers x0-x15 are provided. All encodings
specifying the other registers x16-x31 are reserved."1 parent c78b27e commit f6af403
1 file changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1983 | 1983 | | |
1984 | 1984 | | |
1985 | 1985 | | |
| 1986 | + | |
1986 | 1987 | | |
1987 | 1988 | | |
1988 | 1989 | | |
| |||
2026 | 2027 | | |
2027 | 2028 | | |
2028 | 2029 | | |
2029 | | - | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
2030 | 2033 | | |
2031 | 2034 | | |
2032 | 2035 | | |
| |||
2036 | 2039 | | |
2037 | 2040 | | |
2038 | 2041 | | |
2039 | | - | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
2040 | 2054 | | |
2041 | 2055 | | |
2042 | 2056 | | |
| |||
0 commit comments