diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-05-05 10:22:05 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-05-19 08:41:45 -0700 |
commit | 71bfd65c5fcd72f8af2735905415c7ce4220f6dc (patch) | |
tree | 7d8723d20c9725f97a1f3c0f03520ea46a9ea8d0 /target/ppc | |
parent | 3dede407cc61b64997f0c30f6dbf4df09949abc9 (diff) |
softfloat: Name compare relation enum
Give the previously unnamed enum a typedef name. Use it in the
prototypes of compare functions. Use it to hold the results
of the compare functions.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/ppc')
-rw-r--r-- | target/ppc/int_helper.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 6d238b989d..be53cd6f68 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -770,8 +770,9 @@ VCMPNE(w, u32, uint32_t, 0) \ for (i = 0; i < ARRAY_SIZE(r->f32); i++) { \ uint32_t result; \ - int rel = float32_compare_quiet(a->f32[i], b->f32[i], \ - &env->vec_status); \ + FloatRelation rel = \ + float32_compare_quiet(a->f32[i], b->f32[i], \ + &env->vec_status); \ if (rel == float_relation_unordered) { \ result = 0; \ } else if (rel compare order) { \ @@ -803,15 +804,15 @@ static inline void vcmpbfp_internal(CPUPPCState *env, ppc_avr_t *r, int all_in = 0; for (i = 0; i < ARRAY_SIZE(r->f32); i++) { - int le_rel = float32_compare_quiet(a->f32[i], b->f32[i], - &env->vec_status); + FloatRelation le_rel = float32_compare_quiet(a->f32[i], b->f32[i], + &env->vec_status); if (le_rel == float_relation_unordered) { r->u32[i] = 0xc0000000; all_in = 1; } else { float32 bneg = float32_chs(b->f32[i]); - int ge_rel = float32_compare_quiet(a->f32[i], bneg, - &env->vec_status); + FloatRelation ge_rel = float32_compare_quiet(a->f32[i], bneg, + &env->vec_status); int le = le_rel != float_relation_greater; int ge = ge_rel != float_relation_less; |