[PATCH] softfloat: Fix tp init in float32_exp2

Richard Henderson posted 1 patch 2 years, 11 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210607223812.110596-1-richard.henderson@linaro.org
Maintainers: Aurelien Jarno <aurelien@aurel32.net>, "Alex Bennée" <alex.bennee@linaro.org>, Peter Maydell <peter.maydell@linaro.org>
fpu/softfloat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] softfloat: Fix tp init in float32_exp2
Posted by Richard Henderson 2 years, 11 months ago
Typo in the conversion to FloatParts64.

Fixes: 572c4d862ff2
Fixes: Coverity CID 1457457
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 fpu/softfloat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 1cb162882b..4d0160fe9c 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -4818,7 +4818,7 @@ float32 float32_exp2(float32 a, float_status *status)
 
     float_raise(float_flag_inexact, status);
 
-    float64_unpack_canonical(&xnp, float64_ln2, status);
+    float64_unpack_canonical(&tp, float64_ln2, status);
     xp = *parts_mul(&xp, &tp, status);
     xnp = xp;
 
-- 
2.25.1


Re: [PATCH] softfloat: Fix tp init in float32_exp2
Posted by Alex Bennée 2 years, 10 months ago
Richard Henderson <richard.henderson@linaro.org> writes:

> Typo in the conversion to FloatParts64.
>
> Fixes: 572c4d862ff2
> Fixes: Coverity CID 1457457
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée