[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 40/48] linux-user/nios2: Handle various SIGILL exceptions
From: |
Richard Henderson |
Subject: |
[PATCH v5 40/48] linux-user/nios2: Handle various SIGILL exceptions |
Date: |
Thu, 10 Mar 2022 03:27:17 -0800 |
We missed out on a couple of exception types that may
legitimately be raised by a userland program.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/nios2/cpu_loop.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c
index 67220128aa..f223238275 100644
--- a/linux-user/nios2/cpu_loop.c
+++ b/linux-user/nios2/cpu_loop.c
@@ -49,6 +49,14 @@ void cpu_loop(CPUNios2State *env)
env->ctrl[CR_BADADDR]);
break;
+ case EXCP_ILLEGAL:
+ case EXCP_UNIMPL:
+ force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc);
+ break;
+ case EXCP_SUPERI:
+ force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVOPC, env->pc);
+ break;
+
case EXCP_TRAP:
switch (env->error_code) {
case 0:
--
2.25.1
- [PATCH v5 31/48] target/nios2: Use tcg_constant_tl, (continued)
- [PATCH v5 31/48] target/nios2: Use tcg_constant_tl, Richard Henderson, 2022/03/10
- [PATCH v5 35/48] target/nios2: Create gen_jumpr, Richard Henderson, 2022/03/10
- [PATCH v5 37/48] target/nios2: Use gen_goto_tb for DISAS_TOO_MANY, Richard Henderson, 2022/03/10
- [PATCH v5 36/48] target/nios2: Hoist set of is_jmp into gen_goto_tb, Richard Henderson, 2022/03/10
- [PATCH v5 39/48] target/nios2: Implement Misaligned destination exception, Richard Henderson, 2022/03/10
- [PATCH v5 41/48] target/nios2: Introduce shadow register sets, Richard Henderson, 2022/03/10
- [PATCH v5 46/48] hw/nios2: Introduce Nios2MachineState, Richard Henderson, 2022/03/10
- [PATCH v5 40/48] linux-user/nios2: Handle various SIGILL exceptions,
Richard Henderson <=
- [PATCH v5 42/48] target/nios2: Implement rdprs, wrprs, Richard Henderson, 2022/03/10
- [PATCH v5 43/48] target/nios2: Update helper_eret for shadow registers, Richard Henderson, 2022/03/10
- [PATCH v5 44/48] target/nios2: Implement EIC interrupt processing, Richard Henderson, 2022/03/10
- [PATCH v5 45/48] hw/intc: Vectored Interrupt Controller (VIC), Richard Henderson, 2022/03/10
- [PATCH v5 47/48] hw/nios2: Move memory regions into Nios2Machine, Richard Henderson, 2022/03/10
- [PATCH v5 48/48] hw/nios2: Machine with a Vectored Interrupt Controller, Richard Henderson, 2022/03/10