aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 8d24a1fc17..32fa43d476 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -620,7 +620,20 @@ void cpu_loop (CPUSPARCState *env)
case TT_FILL: /* window underflow */
restore_window(env);
break;
- // XXX
+ case TT_TFAULT:
+ case TT_DFAULT:
+ {
+ info.si_signo = SIGSEGV;
+ info.si_errno = 0;
+ /* XXX: check env->error_code */
+ info.si_code = TARGET_SEGV_MAPERR;
+ if (trapnr == TT_DFAULT)
+ info._sifields._sigfault._addr = env->dmmuregs[4];
+ else
+ info._sifields._sigfault._addr = env->tpc[env->tl];
+ queue_signal(info.si_signo, &info);
+ }
+ break;
#endif
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */