> 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
 23:18:36 up 4 days, 18:24,  1 user,  load average: 0.29, 0.31, 0.38
This commit is contained in:
tracer-ics2023
2024-09-21 23:18:37 +08:00
committed by zzy
parent d8bbc6df6d
commit a4ff3c1e6e
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@
#endif
struct Context {
// TODO: fix the order of these members to match trap.S
uintptr_t mepc, mcause, gpr[NR_REGS], mstatus;
uintptr_t gpr[NR_REGS], mcause, mstatus, mepc;
// TODO: fix pdir in trap.S
void *pdir;
};

View File

@ -8,7 +8,7 @@ Context* __am_irq_handle(Context *c) {
if (user_handler) {
Event ev = {0};
switch (c->mcause) {
case -1: ev.event = EVENT_YIELD; break;
case 0xb: ev.event = EVENT_YIELD; break;
default: ev.event = EVENT_ERROR; break;
}