提交 22a78d64 编写于 作者: E Edgar E. Iglesias

microblaze-user: Deliver SIGFPE on div by zero

Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
上级 a5e1cbc8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册