@samitouri / QOSamiQemu / commits / 1a0d3159c2

fpu: Drop parts_round_to_int

Use parts{64,128}_round_to_int at each call site. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Richard Henderson committed Apr 26, 2026 at 19:59 UTC 1a0d3159c2aef6b688b235faa4e340e7472bba59
1 file changed +6 -16
fpu/softfloat.c
+6 -16
@@ -779,16 +779,6 @@ static float128 QEMU_FLATTEN float128_pack_raw(const FloatParts128 *p)
779 FloatParts128 *: parts128_##NAME, \
780 FloatParts256 *: parts256_##NAME)
781
782 -static void parts64_round_to_int(FloatParts64 *a, FloatRoundMode rm,
783 - int scale, float_status *s,
784 - const FloatFmt *fmt);
785 -static void parts128_round_to_int(FloatParts128 *a, FloatRoundMode r,
786 - int scale, float_status *s,
787 - const FloatFmt *fmt);
788 -
789 -#define parts_round_to_int(A, R, C, S, F) \
790 - PARTS_GENERIC_64_128(round_to_int, A)(A, R, C, S, F)
791 -
782 static int64_t parts64_float_to_sint(FloatParts64 *p, FloatRoundMode rmode,
783 int scale, int64_t min, int64_t max,
784 float_status *s);
@@ -3128,7 +3118,7 @@ float16 float16_round_to_int(float16 a, float_status *s)
3118 FloatParts64 p;
3119
3120 float16_unpack_canonical(&p, a, s);
3131 - parts_round_to_int(&p, s->float_rounding_mode, 0, s, &float16_params);
3121 + parts64_round_to_int(&p, s->float_rounding_mode, 0, s, &float16_params);
3122 return float16_round_pack_canonical(&p, s);
3123 }
3124
@@ -3137,7 +3127,7 @@ float32 float32_round_to_int(float32 a, float_status *s)
3127 FloatParts64 p;
3128
3129 float32_unpack_canonical(&p, a, s);
3140 - parts_round_to_int(&p, s->float_rounding_mode, 0, s, &float32_params);
3130 + parts64_round_to_int(&p, s->float_rounding_mode, 0, s, &float32_params);
3131 return float32_round_pack_canonical(&p, s);
3132 }
3133
@@ -3146,7 +3136,7 @@ float64 float64_round_to_int(float64 a, float_status *s)
3136 FloatParts64 p;
3137
3138 float64_unpack_canonical(&p, a, s);
3149 - parts_round_to_int(&p, s->float_rounding_mode, 0, s, &float64_params);
3139 + parts64_round_to_int(&p, s->float_rounding_mode, 0, s, &float64_params);
3140 return float64_round_pack_canonical(&p, s);
3141 }
3142
@@ -3155,7 +3145,7 @@ bfloat16 bfloat16_round_to_int(bfloat16 a, float_status *s)
3145 FloatParts64 p;
3146
3147 bfloat16_unpack_canonical(&p, a, s);
3158 - parts_round_to_int(&p, s->float_rounding_mode, 0, s, &bfloat16_params);
3148 + parts64_round_to_int(&p, s->float_rounding_mode, 0, s, &bfloat16_params);
3149 return bfloat16_round_pack_canonical(&p, s);
3150 }
3151
@@ -3164,7 +3154,7 @@ float128 float128_round_to_int(float128 a, float_status *s)
3154 FloatParts128 p;
3155
3156 float128_unpack_canonical(&p, a, s);
3167 - parts_round_to_int(&p, s->float_rounding_mode, 0, s, &float128_params);
3157 + parts128_round_to_int(&p, s->float_rounding_mode, 0, s, &float128_params);
3158 return float128_round_pack_canonical(&p, s);
3159 }
3160
@@ -3176,7 +3166,7 @@ floatx80 floatx80_round_to_int(floatx80 a, float_status *status)
3166 return floatx80_default_nan(status);
3167 }
3168
3179 - parts_round_to_int(&p, status->float_rounding_mode, 0, status,
3169 + parts128_round_to_int(&p, status->float_rounding_mode, 0, status,
3170 &floatx80_params[status->floatx80_rounding_precision]);
3171 return floatx80_round_pack_canonical(&p, status);
3172 }