提交 59823453 编写于 作者: Z Zihao Yu

mips32,intr: add EXL bit for cpu.status

上级 5151684a
......@@ -16,6 +16,7 @@ make_EHelper(syscall) {
make_EHelper(eret) {
rtl_li(&s0, cpu.epc);
rtl_jr(&s0);
cpu.status &= ~0x2;
print_asm("eret");
}
......
......@@ -14,12 +14,13 @@ void raise_intr(uint8_t NO, vaddr_t epc) {
NO &= ~TLB_REFILL;
cpu.cause = NO << 2;
cpu.epc = epc;
cpu.status |= 0x2;
rtl_j(target);
}
bool isa_query_intr(void) {
if (cpu.INTR && (cpu.status & 0x1)) {
if (cpu.INTR && (cpu.status & 0x1) && !(cpu.status & 0x2)) {
cpu.INTR = false;
raise_intr(0, cpu.pc);
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册