[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Avoid qemu SIGFPE for MIPS DIV
From: |
Richard Sandiford |
Subject: |
[Qemu-devel] [PATCH] Avoid qemu SIGFPE for MIPS DIV |
Date: |
Sun, 25 May 2008 11:08:00 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
Performing (-1 << 31) / -1 with a MIPS DIV instruction currently
causes the emulator to exit with a SIGFPE. This wasn't a problem
before TCGification because we used 64-bit division instead of
32-bit division. So I suppose there are two obvious fixes:
use 64-bit division once more, or add overflow checks in the
same way as we do for DDIV. I've attached patches for both
approaches below.
BTW, sorry for the flurry of patches. I tried to break things
up as much as possible, but it makes the situation look far
worse than it actually is...
Richard
div-overflow-fix.patch
Description: Text Data
div-overflow-fix-2.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Avoid qemu SIGFPE for MIPS DIV,
Richard Sandiford <=