MRET jump support
This commit is contained in:
parent
c421595a95
commit
31941c0813
@ -522,7 +522,9 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction)
|
||||
fprintf(stderr, "SRET: We don't support that.\n");
|
||||
break;
|
||||
case IMM_MRET:
|
||||
fprintf(stderr, "MRET: We don't support that.\n");
|
||||
// Act like a normal ret/jalr, with destination address being CSR_MEPC content
|
||||
fprintf(stderr, "Warning: MRET: We don't support privilege mode change\n");
|
||||
cpu->pc = cpu->csr[CSR_MEPC] - 4;
|
||||
break;
|
||||
default:
|
||||
switch(instruction->func7)
|
||||
|
Loading…
Reference in New Issue
Block a user