diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2011-08-22 18:42:54 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2011-08-22 18:47:38 +0200 |
commit | 22a78d64cca77916e0b56f63b493ff5e445c41b9 (patch) | |
tree | 079573f6f60eb5ca440d0504b49ba339ed15f3c3 | |
parent | a5e1cbc80e88ed7d73b3fcb46053a3ba167293fc (diff) |
microblaze-user: Deliver SIGFPE on div by zero
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
-rw-r--r-- | linux-user/main.c | 7 |
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; |