summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Maydell2017-02-03 19:59:31 +0100
committerMichael Tokarev2017-02-28 07:03:38 +0100
commitd000b477f2693dbca97cd8ea751c2e0b71890662 (patch)
tree96732b4782d25e6da5ee274edbc6b436512d9267
parenttarget/s390x: Fix typo (diff)
downloadqemu-d000b477f2693dbca97cd8ea751c2e0b71890662.tar.gz
qemu-d000b477f2693dbca97cd8ea751c2e0b71890662.tar.xz
qemu-d000b477f2693dbca97cd8ea751c2e0b71890662.zip
softfloat: Use correct type in float64_to_uint64_round_to_zero()
In float64_to_uint64_round_to_zero() a typo meant that we were taking the uint64_t return value from float64_to_uint64() and putting it into an int64_t variable before returning it as uint64_t again. Use uint64_t instead of pointlessly casting it back and forth to int64_t. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--fpu/softfloat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 485a006aa7..7af14e29aa 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -7492,7 +7492,7 @@ uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status)
{
signed char current_rounding_mode = status->float_rounding_mode;
set_float_rounding_mode(float_round_to_zero, status);
- int64_t v = float64_to_uint64(a, status);
+ uint64_t v = float64_to_uint64(a, status);
set_float_rounding_mode(current_rounding_mode, status);
return v;
}