> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 22:16:48 up 4 days, 17:22,  1 user,  load average: 0.55, 0.58, 0.58
This commit is contained in:
tracer-ics2023
2024-09-21 22:16:48 +08:00
committed by zzy
parent 3c6d5fb973
commit daa8aa6db2

View File

@ -26,14 +26,14 @@ static inline int check_reg_idx(int idx) {
#define gpr(idx) (cpu.gpr[check_reg_idx(idx)])
enum {
// MSTATUS = 0x300, // Machine status register.
MSTATUS = 0x300, // Machine status register.
MTVEC = 0x305, // Machine trap-handler base address.
MEPC = 0x341, // Machine exception program counter.
MCAUSE = 0x342, // Machine trap cause.
};
static inline int check_cpr_idx(int idx) {
IFDEF(CONFIG_RT_CHECK, assert(idx == MCAUSE || idx == MEPC || idx == MTVEC));
IFDEF(CONFIG_RT_CHECK, assert(idx == MSTATUS || idx == MCAUSE || idx == MEPC || idx == MTVEC));
return idx;
}