]> git.proxmox.com Git - qemu.git/commit
target-arm: Avoid "1 << 31" undefined behaviour
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Sep 2013 18:09:32 +0000 (19:09 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Sep 2013 18:09:32 +0000 (19:09 +0100)
commit78dbbbe4dff95369c63bf77ee0df23371e1d6602
treee313eb5118e9f02d616b0a6a286c0722d48a23da
parent534df156090539854c2ac819dcdb096d01dab5c1
target-arm: Avoid "1 << 31" undefined behaviour

Avoid the undefined behaviour of "1 << 31" by using 1U to make
the shift be of an unsigned value rather than shifting into the
sign bit of a signed integer. For consistency, we make all the
CPSR_* constants unsigned, though the only one which triggers
undefined behaviour is CPSR_N.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-id: 1378391908-22137-3-git-send-email-peter.maydell@linaro.org
target-arm/cpu.h
target-arm/helper.c