> 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:14:38 up 4 days, 17:20, 1 user, load average: 0.72, 0.70, 0.61
This commit is contained in:
@ -137,7 +137,7 @@ static int decode_exec(Decode *s) {
|
||||
// INSTPAT("??????? ????? ????? 111 ????? 11100 11", csrrci , I, );
|
||||
|
||||
// INSTPAT("0001000 00010 00000 000 00000 11100 11", sret , R, );
|
||||
INSTPAT("0011000 00010 00000 000 00000 11100 11", mret , R, s->dnpc = C(MEPC) + 4);
|
||||
INSTPAT("0011000 00010 00000 000 00000 11100 11", mret , R, s->dnpc = C(MEPC));
|
||||
|
||||
INSTPAT("??????? ????? ????? ??? ????? ????? ??", inv , N, INV(s->pc));
|
||||
INSTPAT_END();
|
||||
|
@ -26,7 +26,7 @@ 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.
|
||||
|
Reference in New Issue
Block a user