mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
microblaze-user: Deliver SIGFPE on div by zero
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
parent
a5e1cbc80e
commit
22a78d64cc
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue