mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 22:11:53 -06:00
linux-user/sparc: Handle division by zero traps
In addition to the hw trap vector, there is a software trap assigned for older sparc without hw division instructions. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230216054516.1267305-9-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
52d104a5a5
commit
0908007f76
1 changed files with 5 additions and 0 deletions
|
@ -211,6 +211,11 @@ void cpu_loop (CPUSPARCState *env)
|
|||
force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc);
|
||||
break;
|
||||
|
||||
case TT_TRAP + 0x02: /* div0 */
|
||||
case TT_DIV_ZERO:
|
||||
force_sig_fault(TARGET_SIGFPE, TARGET_FPE_INTDIV, env->pc);
|
||||
break;
|
||||
|
||||
case TT_TRAP + 0x03: /* flush windows */
|
||||
flush_windows(env);
|
||||
/* next instruction */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue