mirror of https://github.com/xemu-project/xemu.git
linux-user/nios2: Handle various SIGILL exceptions
We missed out on a couple of exception types that may legitimately be raised by a userland program. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220421151735.31996-59-richard.henderson@linaro.org>
This commit is contained in:
parent
e84f176844
commit
3747727aad
|
@ -50,6 +50,18 @@ void cpu_loop(CPUNios2State *env)
|
|||
env->ctrl[CR_BADADDR]);
|
||||
break;
|
||||
|
||||
case EXCP_ILLEGAL:
|
||||
case EXCP_UNIMPL:
|
||||
/* Match kernel's handle_illegal_c(). */
|
||||
env->pc -= 4;
|
||||
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc);
|
||||
break;
|
||||
case EXCP_SUPERI:
|
||||
/* Match kernel's handle_supervisor_instr(). */
|
||||
env->pc -= 4;
|
||||
force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVOPC, env->pc);
|
||||
break;
|
||||
|
||||
case EXCP_TRAP:
|
||||
switch (env->error_code) {
|
||||
case 0:
|
||||
|
|
Loading…
Reference in New Issue