aboutsummaryrefslogtreecommitdiff
path: root/target-arm/neon_helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-02-09 15:42:33 +0000
committerAurelien Jarno <aurelien@aurel32.net>2011-02-09 19:37:48 +0100
commitcc2212c2f851291929becc3f4fd153d05ca4c54a (patch)
tree798c73085adcc946dc29203fb2adf751efdcf442 /target-arm/neon_helper.c
parentaf1bbf30c407cb194599a4e1724c38c7bf1d94b3 (diff)
downloadqemu-cc2212c2f851291929becc3f4fd153d05ca4c54a.zip
qemu-cc2212c2f851291929becc3f4fd153d05ca4c54a.tar.gz
qemu-cc2212c2f851291929becc3f4fd153d05ca4c54a.tar.bz2
target-arm: Fix 32 bit signed saturating narrow
The returned value when doing saturating signed 64->32 bit conversion of a negative number was incorrect due to a missing cast. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-arm/neon_helper.c')
-rw-r--r--target-arm/neon_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index a7cf383..61890dd 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -1209,7 +1209,7 @@ uint32_t HELPER(neon_narrow_sat_s32)(CPUState *env, uint64_t x)
{
if ((int64_t)x != (int32_t)x) {
SET_QC();
- return (x >> 63) ^ 0x7fffffff;
+ return ((int64_t)x >> 63) ^ 0x7fffffff;
}
return x;
}