• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión71bfd65c5fcd72f8af2735905415c7ce4220f6dc (tree)
Tiempo2020-05-20 00:41:45
AutorRichard Henderson <richard.henderson@lina...>
CommiterRichard Henderson

Log Message

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>

Cambiar Resumen

Diferencia incremental

--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -2848,8 +2848,8 @@ MINMAX(64, maxnummag, false, true, true)
28482848 #undef MINMAX
28492849
28502850 /* Floating point compare */
2851-static int compare_floats(FloatParts a, FloatParts b, bool is_quiet,
2852- float_status *s)
2851+static FloatRelation compare_floats(FloatParts a, FloatParts b, bool is_quiet,
2852+ float_status *s)
28532853 {
28542854 if (is_nan(a.cls) || is_nan(b.cls)) {
28552855 if (!is_quiet ||
@@ -2920,17 +2920,17 @@ COMPARE(soft_f64_compare, QEMU_SOFTFLOAT_ATTR, 64)
29202920
29212921 #undef COMPARE
29222922
2923-int float16_compare(float16 a, float16 b, float_status *s)
2923+FloatRelation float16_compare(float16 a, float16 b, float_status *s)
29242924 {
29252925 return soft_f16_compare(a, b, false, s);
29262926 }
29272927
2928-int float16_compare_quiet(float16 a, float16 b, float_status *s)
2928+FloatRelation float16_compare_quiet(float16 a, float16 b, float_status *s)
29292929 {
29302930 return soft_f16_compare(a, b, true, s);
29312931 }
29322932
2933-static int QEMU_FLATTEN
2933+static FloatRelation QEMU_FLATTEN
29342934 f32_compare(float32 xa, float32 xb, bool is_quiet, float_status *s)
29352935 {
29362936 union_float32 ua, ub;
@@ -2959,17 +2959,17 @@ f32_compare(float32 xa, float32 xb, bool is_quiet, float_status *s)
29592959 return soft_f32_compare(ua.s, ub.s, is_quiet, s);
29602960 }
29612961
2962-int float32_compare(float32 a, float32 b, float_status *s)
2962+FloatRelation float32_compare(float32 a, float32 b, float_status *s)
29632963 {
29642964 return f32_compare(a, b, false, s);
29652965 }
29662966
2967-int float32_compare_quiet(float32 a, float32 b, float_status *s)
2967+FloatRelation float32_compare_quiet(float32 a, float32 b, float_status *s)
29682968 {
29692969 return f32_compare(a, b, true, s);
29702970 }
29712971
2972-static int QEMU_FLATTEN
2972+static FloatRelation QEMU_FLATTEN
29732973 f64_compare(float64 xa, float64 xb, bool is_quiet, float_status *s)
29742974 {
29752975 union_float64 ua, ub;
@@ -2998,12 +2998,12 @@ f64_compare(float64 xa, float64 xb, bool is_quiet, float_status *s)
29982998 return soft_f64_compare(ua.s, ub.s, is_quiet, s);
29992999 }
30003000
3001-int float64_compare(float64 a, float64 b, float_status *s)
3001+FloatRelation float64_compare(float64 a, float64 b, float_status *s)
30023002 {
30033003 return f64_compare(a, b, false, s);
30043004 }
30053005
3006-int float64_compare_quiet(float64 a, float64 b, float_status *s)
3006+FloatRelation float64_compare_quiet(float64 a, float64 b, float_status *s)
30073007 {
30083008 return f64_compare(a, b, true, s);
30093009 }
@@ -7892,8 +7892,9 @@ int float128_unordered_quiet(float128 a, float128 b, float_status *status)
78927892 return 0;
78937893 }
78947894
7895-static inline int floatx80_compare_internal(floatx80 a, floatx80 b,
7896- int is_quiet, float_status *status)
7895+static inline FloatRelation
7896+floatx80_compare_internal(floatx80 a, floatx80 b, bool is_quiet,
7897+ float_status *status)
78977898 {
78987899 bool aSign, bSign;
78997900
@@ -7939,18 +7940,20 @@ static inline int floatx80_compare_internal(floatx80 a, floatx80 b,
79397940 }
79407941 }
79417942
7942-int floatx80_compare(floatx80 a, floatx80 b, float_status *status)
7943+FloatRelation floatx80_compare(floatx80 a, floatx80 b, float_status *status)
79437944 {
79447945 return floatx80_compare_internal(a, b, 0, status);
79457946 }
79467947
7947-int floatx80_compare_quiet(floatx80 a, floatx80 b, float_status *status)
7948+FloatRelation floatx80_compare_quiet(floatx80 a, floatx80 b,
7949+ float_status *status)
79487950 {
79497951 return floatx80_compare_internal(a, b, 1, status);
79507952 }
79517953
7952-static inline int float128_compare_internal(float128 a, float128 b,
7953- int is_quiet, float_status *status)
7954+static inline FloatRelation
7955+float128_compare_internal(float128 a, float128 b, bool is_quiet,
7956+ float_status *status)
79547957 {
79557958 bool aSign, bSign;
79567959
@@ -7983,12 +7986,13 @@ static inline int float128_compare_internal(float128 a, float128 b,
79837986 }
79847987 }
79857988
7986-int float128_compare(float128 a, float128 b, float_status *status)
7989+FloatRelation float128_compare(float128 a, float128 b, float_status *status)
79877990 {
79887991 return float128_compare_internal(a, b, 0, status);
79897992 }
79907993
7991-int float128_compare_quiet(float128 a, float128 b, float_status *status)
7994+FloatRelation float128_compare_quiet(float128 a, float128 b,
7995+ float_status *status)
79927996 {
79937997 return float128_compare_internal(a, b, 1, status);
79947998 }
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -85,12 +85,13 @@ this code that are retained.
8585 /*----------------------------------------------------------------------------
8686 | Software IEC/IEEE floating-point ordering relations
8787 *----------------------------------------------------------------------------*/
88-enum {
88+
89+typedef enum {
8990 float_relation_less = -1,
9091 float_relation_equal = 0,
9192 float_relation_greater = 1,
9293 float_relation_unordered = 2
93-};
94+} FloatRelation;
9495
9596 #include "fpu/softfloat-types.h"
9697 #include "fpu/softfloat-helpers.h"
@@ -231,8 +232,8 @@ float16 float16_maxnum(float16, float16, float_status *status);
231232 float16 float16_minnummag(float16, float16, float_status *status);
232233 float16 float16_maxnummag(float16, float16, float_status *status);
233234 float16 float16_sqrt(float16, float_status *status);
234-int float16_compare(float16, float16, float_status *status);
235-int float16_compare_quiet(float16, float16, float_status *status);
235+FloatRelation float16_compare(float16, float16, float_status *status);
236+FloatRelation float16_compare_quiet(float16, float16, float_status *status);
236237
237238 int float16_is_quiet_nan(float16, float_status *status);
238239 int float16_is_signaling_nan(float16, float_status *status);
@@ -350,8 +351,8 @@ int float32_eq_quiet(float32, float32, float_status *status);
350351 int float32_le_quiet(float32, float32, float_status *status);
351352 int float32_lt_quiet(float32, float32, float_status *status);
352353 int float32_unordered_quiet(float32, float32, float_status *status);
353-int float32_compare(float32, float32, float_status *status);
354-int float32_compare_quiet(float32, float32, float_status *status);
354+FloatRelation float32_compare(float32, float32, float_status *status);
355+FloatRelation float32_compare_quiet(float32, float32, float_status *status);
355356 float32 float32_min(float32, float32, float_status *status);
356357 float32 float32_max(float32, float32, float_status *status);
357358 float32 float32_minnum(float32, float32, float_status *status);
@@ -506,8 +507,8 @@ int float64_eq_quiet(float64, float64, float_status *status);
506507 int float64_le_quiet(float64, float64, float_status *status);
507508 int float64_lt_quiet(float64, float64, float_status *status);
508509 int float64_unordered_quiet(float64, float64, float_status *status);
509-int float64_compare(float64, float64, float_status *status);
510-int float64_compare_quiet(float64, float64, float_status *status);
510+FloatRelation float64_compare(float64, float64, float_status *status);
511+FloatRelation float64_compare_quiet(float64, float64, float_status *status);
511512 float64 float64_min(float64, float64, float_status *status);
512513 float64 float64_max(float64, float64, float_status *status);
513514 float64 float64_minnum(float64, float64, float_status *status);
@@ -630,8 +631,8 @@ int floatx80_eq_quiet(floatx80, floatx80, float_status *status);
630631 int floatx80_le_quiet(floatx80, floatx80, float_status *status);
631632 int floatx80_lt_quiet(floatx80, floatx80, float_status *status);
632633 int floatx80_unordered_quiet(floatx80, floatx80, float_status *status);
633-int floatx80_compare(floatx80, floatx80, float_status *status);
634-int floatx80_compare_quiet(floatx80, floatx80, float_status *status);
634+FloatRelation floatx80_compare(floatx80, floatx80, float_status *status);
635+FloatRelation floatx80_compare_quiet(floatx80, floatx80, float_status *status);
635636 int floatx80_is_quiet_nan(floatx80, float_status *status);
636637 int floatx80_is_signaling_nan(floatx80, float_status *status);
637638 floatx80 floatx80_silence_nan(floatx80, float_status *status);
@@ -842,8 +843,8 @@ int float128_eq_quiet(float128, float128, float_status *status);
842843 int float128_le_quiet(float128, float128, float_status *status);
843844 int float128_lt_quiet(float128, float128, float_status *status);
844845 int float128_unordered_quiet(float128, float128, float_status *status);
845-int float128_compare(float128, float128, float_status *status);
846-int float128_compare_quiet(float128, float128, float_status *status);
846+FloatRelation float128_compare(float128, float128, float_status *status);
847+FloatRelation float128_compare_quiet(float128, float128, float_status *status);
847848 int float128_is_quiet_nan(float128, float_status *status);
848849 int float128_is_signaling_nan(float128, float_status *status);
849850 float128 float128_silence_nan(float128, float_status *status);
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -281,7 +281,7 @@ float64 VFP_HELPER(sqrt, d)(float64 a, CPUARMState *env)
281281 return float64_sqrt(a, &env->vfp.fp_status);
282282 }
283283
284-static void softfloat_to_vfp_compare(CPUARMState *env, int cmp)
284+static void softfloat_to_vfp_compare(CPUARMState *env, FloatRelation cmp)
285285 {
286286 uint32_t flags;
287287 switch (cmp) {
--- a/target/hppa/op_helper.c
+++ b/target/hppa/op_helper.c
@@ -523,7 +523,8 @@ uint64_t HELPER(fcnv_t_d_udw)(CPUHPPAState *env, float64 arg)
523523 return ret;
524524 }
525525
526-static void update_fr0_cmp(CPUHPPAState *env, uint32_t y, uint32_t c, int r)
526+static void update_fr0_cmp(CPUHPPAState *env, uint32_t y,
527+ uint32_t c, FloatRelation r)
527528 {
528529 uint32_t shadow = env->fr0_shadow;
529530
@@ -565,7 +566,7 @@ static void update_fr0_cmp(CPUHPPAState *env, uint32_t y, uint32_t c, int r)
565566 void HELPER(fcmp_s)(CPUHPPAState *env, float32 a, float32 b,
566567 uint32_t y, uint32_t c)
567568 {
568- int r;
569+ FloatRelation r;
569570 if (c & 1) {
570571 r = float32_compare(a, b, &env->fp_status);
571572 } else {
@@ -578,7 +579,7 @@ void HELPER(fcmp_s)(CPUHPPAState *env, float32 a, float32 b,
578579 void HELPER(fcmp_d)(CPUHPPAState *env, float64 a, float64 b,
579580 uint32_t y, uint32_t c)
580581 {
581- int r;
582+ FloatRelation r;
582583 if (c & 1) {
583584 r = float64_compare(a, b, &env->fp_status);
584585 } else {
--- a/target/i386/fpu_helper.c
+++ b/target/i386/fpu_helper.c
@@ -420,7 +420,7 @@ static const int fcom_ccval[4] = {0x0100, 0x4000, 0x0000, 0x4500};
420420
421421 void helper_fcom_ST0_FT0(CPUX86State *env)
422422 {
423- int ret;
423+ FloatRelation ret;
424424
425425 ret = floatx80_compare(ST0, FT0, &env->fp_status);
426426 env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret + 1];
@@ -428,7 +428,7 @@ void helper_fcom_ST0_FT0(CPUX86State *env)
428428
429429 void helper_fucom_ST0_FT0(CPUX86State *env)
430430 {
431- int ret;
431+ FloatRelation ret;
432432
433433 ret = floatx80_compare_quiet(ST0, FT0, &env->fp_status);
434434 env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret + 1];
@@ -439,7 +439,7 @@ static const int fcomi_ccval[4] = {CC_C, CC_Z, 0, CC_Z | CC_P | CC_C};
439439 void helper_fcomi_ST0_FT0(CPUX86State *env)
440440 {
441441 int eflags;
442- int ret;
442+ FloatRelation ret;
443443
444444 ret = floatx80_compare(ST0, FT0, &env->fp_status);
445445 eflags = cpu_cc_compute_all(env, CC_OP);
@@ -450,7 +450,7 @@ void helper_fcomi_ST0_FT0(CPUX86State *env)
450450 void helper_fucomi_ST0_FT0(CPUX86State *env)
451451 {
452452 int eflags;
453- int ret;
453+ FloatRelation ret;
454454
455455 ret = floatx80_compare_quiet(ST0, FT0, &env->fp_status);
456456 eflags = cpu_cc_compute_all(env, CC_OP);
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -1031,7 +1031,7 @@ static const int comis_eflags[4] = {CC_C, CC_Z, 0, CC_Z | CC_P | CC_C};
10311031
10321032 void helper_ucomiss(CPUX86State *env, Reg *d, Reg *s)
10331033 {
1034- int ret;
1034+ FloatRelation ret;
10351035 float32 s0, s1;
10361036
10371037 s0 = d->ZMM_S(0);
@@ -1042,7 +1042,7 @@ void helper_ucomiss(CPUX86State *env, Reg *d, Reg *s)
10421042
10431043 void helper_comiss(CPUX86State *env, Reg *d, Reg *s)
10441044 {
1045- int ret;
1045+ FloatRelation ret;
10461046 float32 s0, s1;
10471047
10481048 s0 = d->ZMM_S(0);
@@ -1053,7 +1053,7 @@ void helper_comiss(CPUX86State *env, Reg *d, Reg *s)
10531053
10541054 void helper_ucomisd(CPUX86State *env, Reg *d, Reg *s)
10551055 {
1056- int ret;
1056+ FloatRelation ret;
10571057 float64 d0, d1;
10581058
10591059 d0 = d->ZMM_D(0);
@@ -1064,7 +1064,7 @@ void helper_ucomisd(CPUX86State *env, Reg *d, Reg *s)
10641064
10651065 void helper_comisd(CPUX86State *env, Reg *d, Reg *s)
10661066 {
1067- int ret;
1067+ FloatRelation ret;
10681068 float64 d0, d1;
10691069
10701070 d0 = d->ZMM_D(0);
--- a/target/openrisc/fpu_helper.c
+++ b/target/openrisc/fpu_helper.c
@@ -155,13 +155,13 @@ FLOAT_CMP(un, unordered_quiet)
155155 target_ulong helper_float_ ## name ## _d(CPUOpenRISCState *env, \
156156 uint64_t fdt0, uint64_t fdt1) \
157157 { \
158- int r = float64_compare_quiet(fdt0, fdt1, &env->fp_status); \
158+ FloatRelation r = float64_compare_quiet(fdt0, fdt1, &env->fp_status); \
159159 return expr; \
160160 } \
161161 target_ulong helper_float_ ## name ## _s(CPUOpenRISCState *env, \
162162 uint32_t fdt0, uint32_t fdt1) \
163163 { \
164- int r = float32_compare_quiet(fdt0, fdt1, &env->fp_status); \
164+ FloatRelation r = float32_compare_quiet(fdt0, fdt1, &env->fp_status); \
165165 return expr; \
166166 }
167167
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -770,8 +770,9 @@ VCMPNE(w, u32, uint32_t, 0)
770770 \
771771 for (i = 0; i < ARRAY_SIZE(r->f32); i++) { \
772772 uint32_t result; \
773- int rel = float32_compare_quiet(a->f32[i], b->f32[i], \
774- &env->vec_status); \
773+ FloatRelation rel = \
774+ float32_compare_quiet(a->f32[i], b->f32[i], \
775+ &env->vec_status); \
775776 if (rel == float_relation_unordered) { \
776777 result = 0; \
777778 } else if (rel compare order) { \
@@ -803,15 +804,15 @@ static inline void vcmpbfp_internal(CPUPPCState *env, ppc_avr_t *r,
803804 int all_in = 0;
804805
805806 for (i = 0; i < ARRAY_SIZE(r->f32); i++) {
806- int le_rel = float32_compare_quiet(a->f32[i], b->f32[i],
807- &env->vec_status);
807+ FloatRelation le_rel = float32_compare_quiet(a->f32[i], b->f32[i],
808+ &env->vec_status);
808809 if (le_rel == float_relation_unordered) {
809810 r->u32[i] = 0xc0000000;
810811 all_in = 1;
811812 } else {
812813 float32 bneg = float32_chs(b->f32[i]);
813- int ge_rel = float32_compare_quiet(a->f32[i], bneg,
814- &env->vec_status);
814+ FloatRelation ge_rel = float32_compare_quiet(a->f32[i], bneg,
815+ &env->vec_status);
815816 int le = le_rel != float_relation_greater;
816817 int ge = ge_rel != float_relation_less;
817818
--- a/target/s390x/fpu_helper.c
+++ b/target/s390x/fpu_helper.c
@@ -112,7 +112,7 @@ static void handle_exceptions(CPUS390XState *env, bool XxC, uintptr_t retaddr)
112112 }
113113 }
114114
115-int float_comp_to_cc(CPUS390XState *env, int float_compare)
115+int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare)
116116 {
117117 switch (float_compare) {
118118 case float_relation_equal:
@@ -368,7 +368,7 @@ uint64_t HELPER(lexb)(CPUS390XState *env, uint64_t ah, uint64_t al,
368368 /* 32-bit FP compare */
369369 uint32_t HELPER(ceb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
370370 {
371- int cmp = float32_compare_quiet(f1, f2, &env->fpu_status);
371+ FloatRelation cmp = float32_compare_quiet(f1, f2, &env->fpu_status);
372372 handle_exceptions(env, false, GETPC());
373373 return float_comp_to_cc(env, cmp);
374374 }
@@ -376,7 +376,7 @@ uint32_t HELPER(ceb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
376376 /* 64-bit FP compare */
377377 uint32_t HELPER(cdb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
378378 {
379- int cmp = float64_compare_quiet(f1, f2, &env->fpu_status);
379+ FloatRelation cmp = float64_compare_quiet(f1, f2, &env->fpu_status);
380380 handle_exceptions(env, false, GETPC());
381381 return float_comp_to_cc(env, cmp);
382382 }
@@ -385,9 +385,9 @@ uint32_t HELPER(cdb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
385385 uint32_t HELPER(cxb)(CPUS390XState *env, uint64_t ah, uint64_t al,
386386 uint64_t bh, uint64_t bl)
387387 {
388- int cmp = float128_compare_quiet(make_float128(ah, al),
389- make_float128(bh, bl),
390- &env->fpu_status);
388+ FloatRelation cmp = float128_compare_quiet(make_float128(ah, al),
389+ make_float128(bh, bl),
390+ &env->fpu_status);
391391 handle_exceptions(env, false, GETPC());
392392 return float_comp_to_cc(env, cmp);
393393 }
@@ -675,7 +675,7 @@ uint64_t HELPER(fixb)(CPUS390XState *env, uint64_t ah, uint64_t al,
675675 /* 32-bit FP compare and signal */
676676 uint32_t HELPER(keb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
677677 {
678- int cmp = float32_compare(f1, f2, &env->fpu_status);
678+ FloatRelation cmp = float32_compare(f1, f2, &env->fpu_status);
679679 handle_exceptions(env, false, GETPC());
680680 return float_comp_to_cc(env, cmp);
681681 }
@@ -683,7 +683,7 @@ uint32_t HELPER(keb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
683683 /* 64-bit FP compare and signal */
684684 uint32_t HELPER(kdb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
685685 {
686- int cmp = float64_compare(f1, f2, &env->fpu_status);
686+ FloatRelation cmp = float64_compare(f1, f2, &env->fpu_status);
687687 handle_exceptions(env, false, GETPC());
688688 return float_comp_to_cc(env, cmp);
689689 }
@@ -692,9 +692,9 @@ uint32_t HELPER(kdb)(CPUS390XState *env, uint64_t f1, uint64_t f2)
692692 uint32_t HELPER(kxb)(CPUS390XState *env, uint64_t ah, uint64_t al,
693693 uint64_t bh, uint64_t bl)
694694 {
695- int cmp = float128_compare(make_float128(ah, al),
696- make_float128(bh, bl),
697- &env->fpu_status);
695+ FloatRelation cmp = float128_compare(make_float128(ah, al),
696+ make_float128(bh, bl),
697+ &env->fpu_status);
698698 handle_exceptions(env, false, GETPC());
699699 return float_comp_to_cc(env, cmp);
700700 }
--- a/target/sparc/fop_helper.c
+++ b/target/sparc/fop_helper.c
@@ -264,7 +264,7 @@ void helper_fsqrtq(CPUSPARCState *env)
264264 #define GEN_FCMP(name, size, reg1, reg2, FS, E) \
265265 target_ulong glue(helper_, name) (CPUSPARCState *env) \
266266 { \
267- int ret; \
267+ FloatRelation ret; \
268268 target_ulong fsr; \
269269 if (E) { \
270270 ret = glue(size, _compare)(reg1, reg2, &env->fp_status); \
@@ -295,7 +295,7 @@ void helper_fsqrtq(CPUSPARCState *env)
295295 #define GEN_FCMP_T(name, size, FS, E) \
296296 target_ulong glue(helper_, name)(CPUSPARCState *env, size src1, size src2)\
297297 { \
298- int ret; \
298+ FloatRelation ret; \
299299 target_ulong fsr; \
300300 if (E) { \
301301 ret = glue(size, _compare)(src1, src2, &env->fp_status); \
--- a/target/unicore32/ucf64_helper.c
+++ b/target/unicore32/ucf64_helper.c
@@ -174,8 +174,7 @@ float64 HELPER(ucf64_absd)(float64 a)
174174 void HELPER(ucf64_cmps)(float32 a, float32 b, uint32_t c,
175175 CPUUniCore32State *env)
176176 {
177- int flag;
178- flag = float32_compare_quiet(a, b, &env->ucf64.fp_status);
177+ FloatRelation flag = float32_compare_quiet(a, b, &env->ucf64.fp_status);
179178 env->CF = 0;
180179 switch (c & 0x7) {
181180 case 0: /* F */
@@ -223,8 +222,7 @@ void HELPER(ucf64_cmps)(float32 a, float32 b, uint32_t c,
223222 void HELPER(ucf64_cmpd)(float64 a, float64 b, uint32_t c,
224223 CPUUniCore32State *env)
225224 {
226- int flag;
227- flag = float64_compare_quiet(a, b, &env->ucf64.fp_status);
225+ FloatRelation flag = float64_compare_quiet(a, b, &env->ucf64.fp_status);
228226 env->CF = 0;
229227 switch (c & 0x7) {
230228 case 0: /* F */
--- a/target/xtensa/fpu_helper.c
+++ b/target/xtensa/fpu_helper.c
@@ -139,7 +139,7 @@ void HELPER(oeq_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
139139
140140 void HELPER(ueq_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
141141 {
142- int v = float32_compare_quiet(a, b, &env->fp_status);
142+ FloatRelation v = float32_compare_quiet(a, b, &env->fp_status);
143143 set_br(env, v == float_relation_equal || v == float_relation_unordered, br);
144144 }
145145
@@ -150,7 +150,7 @@ void HELPER(olt_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
150150
151151 void HELPER(ult_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
152152 {
153- int v = float32_compare_quiet(a, b, &env->fp_status);
153+ FloatRelation v = float32_compare_quiet(a, b, &env->fp_status);
154154 set_br(env, v == float_relation_less || v == float_relation_unordered, br);
155155 }
156156
@@ -161,6 +161,6 @@ void HELPER(ole_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
161161
162162 void HELPER(ule_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
163163 {
164- int v = float32_compare_quiet(a, b, &env->fp_status);
164+ FloatRelation v = float32_compare_quiet(a, b, &env->fp_status);
165165 set_br(env, v != float_relation_greater, br);
166166 }