On 03/19/2014 03:29 PM, Olivier Danet wrote:
> +if ((int32_t) x0 != x0) {
> +x0 = x0 < 0 ? 0x8000 : 0x7fff;
> +overflow = 1;
> +}
Actually, there's an existing bug here that we might as well fix.
## ... the 32-bit result is sign-extended to 64 bit
On 03/19/2014 03:29 PM, Olivier Danet wrote:
> The signed integer division -0x8000___ / -1 must be handled
> separately to avoid an overflow on the QEMU host.
>
> Signed-off-by: Olivier Danet
> ---
> target-sparc/helper.c | 13 -
> 1 file changed, 8 insertions(+), 5 delet
The signed integer division -0x8000___ / -1 must be handled
separately to avoid an overflow on the QEMU host.
Signed-off-by: Olivier Danet
---
target-sparc/helper.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/target-sparc/helper.c b/target-sparc/