[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-7.1 v6 40/51] linux-user/nios2: Handle various SIGILL excepti
From: |
Richard Henderson |
Subject: |
[PATCH for-7.1 v6 40/51] linux-user/nios2: Handle various SIGILL exceptions |
Date: |
Wed, 16 Mar 2022 22:05:27 -0700 |
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
- Re: [PATCH for-7.1 v6 34/51] target/nios2: Enable unaligned traps for system mode, (continued)
- [PATCH for-7.1 v6 35/51] target/nios2: Create gen_jumpr, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 36/51] target/nios2: Hoist set of is_jmp into gen_goto_tb, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 39/51] target/nios2: Implement Misaligned destination exception, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 38/51] target/nios2: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 40/51] linux-user/nios2: Handle various SIGILL exceptions,
Richard Henderson <=
- [PATCH for-7.1 v6 41/51] target/nios2: Introduce shadow register sets, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 42/51] target/nios2: Implement rdprs, wrprs, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 43/51] target/nios2: Update helper_eret for shadow registers, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 44/51] target/nios2: Implement EIC interrupt processing, Richard Henderson, 2022/03/17