[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 04/28] softfloat: Move minmax_flags to softfloat-parts.c.i
From: |
Alex Bennée |
Subject: |
Re: [PATCH v2 04/28] softfloat: Move minmax_flags to softfloat-parts.c.inc |
Date: |
Wed, 02 Jun 2021 21:36:38 +0100 |
User-agent: |
mu4e 1.5.13; emacs 28.0.50 |
Richard Henderson <richard.henderson@linaro.org> writes:
> Rename to parts$N_minmax. Combine 3 bool arguments to a bitmask,
> return a tri-state value to indicate nan vs unchanged operand.
> Introduce ftype_minmax functions as a common optimization point.
> Fold bfloat16 expansions into the same macro as the other types.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
<snip>
> - switch (a.cls) {
> - case float_class_normal:
> - a_exp = a.exp;
> - break;
> - case float_class_inf:
> - a_exp = INT_MAX;
> - break;
> - case float_class_zero:
> - a_exp = INT_MIN;
> - break;
> - default:
> - g_assert_not_reached();
> - break;
> - }
> - switch (b.cls) {
> - case float_class_normal:
> - b_exp = b.exp;
> - break;
> - case float_class_inf:
> - b_exp = INT_MAX;
> - break;
> - case float_class_zero:
> - b_exp = INT_MIN;
> - break;
> - default:
> - g_assert_not_reached();
> - break;
> - }
> -
<snip>
> + if (unlikely(ab_mask != float_cmask_normal)) {
> + switch (a->cls) {
> + case float_class_normal:
> + break;
> + case float_class_inf:
> + a_exp = INT16_MAX;
We've gone from min/max of our internal representation to INT16_MIN/MAX
- I guess that doesn't break until we get to Float256 but why the change?
--
Alex Bennée
- Re: [PATCH v2 04/28] softfloat: Move minmax_flags to softfloat-parts.c.inc,
Alex Bennée <=