Patchwork [1/3] sparc-linux-user: Handle SIGILL.

login
register
mail settings
Submitter Richard Henderson
Date Oct. 25, 2011, 5:34 p.m.
Message ID <1319564048-17754-2-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/121775/
State New
Headers show

Comments

Richard Henderson - Oct. 25, 2011, 5:34 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/main.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index e7dad54..2bc10ed 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1191,6 +1191,15 @@  void cpu_loop (CPUSPARCState *env)
         case EXCP_INTERRUPT:
             /* just indicate that signals should be handled asap */
             break;
+        case TT_ILL_INSN:
+            {
+                info.si_signo = TARGET_SIGILL;
+                info.si_errno = 0;
+                info.si_code = TARGET_ILL_ILLOPC;
+                info._sifields._sigfault._addr = env->pc;
+                queue_signal(env, info.si_signo, &info);
+            }
+            break;
         case EXCP_DEBUG:
             {
                 int sig;