aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2011-08-22 18:42:54 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2011-08-22 18:47:38 +0200
commit22a78d64cca77916e0b56f63b493ff5e445c41b9 (patch)
tree079573f6f60eb5ca440d0504b49ba339ed15f3c3 /linux-user/main.c
parenta5e1cbc80e88ed7d73b3fcb46053a3ba167293fc (diff)
microblaze-user: Deliver SIGFPE on div by zero
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 95e3fe66ca..89a51d76cd 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2339,6 +2339,13 @@ void cpu_loop (CPUState *env)
env->iflags &= ~(IMM_FLAG | D_FLAG);
switch (env->sregs[SR_ESR] & 31) {
+ case ESR_EC_DIVZERO:
+ info.si_signo = SIGFPE;
+ info.si_errno = 0;
+ info.si_code = TARGET_FPE_FLTDIV;
+ info._sifields._sigfault._addr = 0;
+ queue_signal(env, info.si_signo, &info);
+ break;
case ESR_EC_FPU:
info.si_signo = SIGFPE;
info.si_errno = 0;