Commit d470cd5
committed
Raise exception when RV32E instructions use x16-x31
Modify rv_decode() to enforce RV32E register constraints by validating
rd, rs1, rs2, 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 d470cd5
1 file changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1983 | 1983 | | |
1984 | 1984 | | |
1985 | 1985 | | |
| 1986 | + | |
1986 | 1987 | | |
| 1988 | + | |
1987 | 1989 | | |
1988 | 1990 | | |
1989 | 1991 | | |
| |||
2024 | 2026 | | |
2025 | 2027 | | |
2026 | 2028 | | |
2027 | | - | |
| 2029 | + | |
2028 | 2030 | | |
2029 | | - | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
2030 | 2034 | | |
2031 | 2035 | | |
2032 | 2036 | | |
2033 | 2037 | | |
2034 | 2038 | | |
2035 | 2039 | | |
2036 | 2040 | | |
2037 | | - | |
| 2041 | + | |
2038 | 2042 | | |
2039 | | - | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
2040 | 2056 | | |
2041 | 2057 | | |
2042 | 2058 | | |
| |||
0 commit comments