]> git.proxmox.com Git - mirror_qemu.git/commit
target-sparc: fix 32bit integer division overflow
authorOlivier Danet <odanet@caramail.com>
Fri, 21 Mar 2014 01:25:19 +0000 (02:25 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 26 Mar 2014 23:40:40 +0000 (23:40 +0000)
commit6a5b69a959483c7404576a7dc54221ced41e6515
tree0fcc76ec56735b99521a6c53762bb59787920120
parentdb237e33c08a279f0179f8f5128a6d10d9adc38a
target-sparc: fix 32bit integer division overflow

The signed integer division -0x8000_0000_0000_0000 / -1 must be handled
separately to avoid an overflow on the QEMU host.

Negative overflow must be a negative number for correct sign
extension in Sparc64 mode. Use <stdint.h> constants.

Signed-off-by: Olivier Danet <odanet@caramail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
target-sparc/helper.c