[PATCH-for-8.1] target/m68k/fpu_helper: Use FloatRelation enum to hold comparison result

Philippe Mathieu-Daudé posted 1 patch 1 year, 1 month ago
target/m68k/fpu_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH-for-8.1] target/m68k/fpu_helper: Use FloatRelation enum to hold comparison result
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
Use the FloatRelation enum to hold the comparison result (missed
in commit 71bfd65c5f "softfloat: Name compare relation enum").

Inspired-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/m68k/fpu_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c
index 3a37d8f584..ab120b5f59 100644
--- a/target/m68k/fpu_helper.c
+++ b/target/m68k/fpu_helper.c
@@ -349,7 +349,7 @@ void HELPER(fsgldiv)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
     PREC_END();
 }
 
-static int float_comp_to_cc(int float_compare)
+static int float_comp_to_cc(FloatRelation float_compare)
 {
     switch (float_compare) {
     case float_relation_equal:
@@ -367,7 +367,7 @@ static int float_comp_to_cc(int float_compare)
 
 void HELPER(fcmp)(CPUM68KState *env, FPReg *val0, FPReg *val1)
 {
-    int float_compare;
+    FloatRelation float_compare;
 
     float_compare = floatx80_compare(val1->d, val0->d, &env->fp_status);
     env->fpsr = (env->fpsr & ~FPSR_CC_MASK) | float_comp_to_cc(float_compare);
-- 
2.38.1


Re: [PATCH-for-8.1] target/m68k/fpu_helper: Use FloatRelation enum to hold comparison result
Posted by Richard Henderson 1 year, 1 month ago
On 3/21/23 02:49, Philippe Mathieu-Daudé wrote:
> Use the FloatRelation enum to hold the comparison result (missed
> in commit 71bfd65c5f "softfloat: Name compare relation enum").
> 
> Inspired-by: Cédric Le Goater<clg@kaod.org>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   target/m68k/fpu_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~