mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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>
This commit is contained in:
parent
af1bbf30c4
commit
cc2212c2f8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue