summaryrefslogtreecommitdiff
path: root/target-arm/cpu.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-09-10 19:09:32 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-09-10 19:09:32 +0100
commit78dbbbe4dff95369c63bf77ee0df23371e1d6602 (patch)
treee313eb5118e9f02d616b0a6a286c0722d48a23da /target-arm/cpu.c
parent534df156090539854c2ac819dcdb096d01dab5c1 (diff)
downloadqemu-78dbbbe4dff95369c63bf77ee0df23371e1d6602.tar.gz
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
Diffstat (limited to 'target-arm/cpu.c')
0 files changed, 0 insertions, 0 deletions