[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/11] softfloat: Sink frac_cmp in parts_pick_nan until neede
From: |
Peter Maydell |
Subject: |
Re: [PATCH 10/11] softfloat: Sink frac_cmp in parts_pick_nan until needed |
Date: |
Thu, 5 Dec 2024 13:48:42 +0000 |
On Tue, 3 Dec 2024 at 20:40, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Move the fractional comparison to the end of the
> float_2nan_prop_x87 case. This is not required for
> any other 2nan propagation rule. Reorganize the
> x87 case itself to break out of the switch when the
> fractional comparison is not required.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> @@ -89,20 +84,24 @@ static FloatPartsN *partsN(pick_nan)(FloatPartsN *a,
> FloatPartsN *b,
> * return the NaN with the positive sign bit (if any).
> */
> if (is_snan(a->cls)) {
> - if (is_snan(b->cls)) {
> - which = cmp > 0 ? 0 : 1;
> - } else {
> + if (!is_snan(b->cls)) {
> which = is_qnan(b->cls) ? 1 : 0;
> + break;
> }
> } else if (is_qnan(a->cls)) {
> if (is_snan(b->cls) || !is_qnan(b->cls)) {
Pre-existing code, but isn't
is_snan(X) || !is_qnan(X)
the same as
!is_qnan(X)
?
thanks
-- PMM
- [PATCH 09/11] softfloat: Share code between parts_pick_nan cases, (continued)
- [PATCH 09/11] softfloat: Share code between parts_pick_nan cases, Richard Henderson, 2024/12/03
- [PATCH 06/11] softfloat: Move propagateFloatx80NaN to softfloat.c, Richard Henderson, 2024/12/03
- [PATCH 02/11] softfloat: Inline pickNaNMulAdd, Richard Henderson, 2024/12/03
- [PATCH 07/11] softfloat: Use parts_pick_nan in propagateFloatx80NaN, Richard Henderson, 2024/12/03
- [PATCH 10/11] softfloat: Sink frac_cmp in parts_pick_nan until needed, Richard Henderson, 2024/12/03
- Re: [PATCH 10/11] softfloat: Sink frac_cmp in parts_pick_nan until needed,
Peter Maydell <=
- [PATCH 11/11] softfloat: Replace WHICH with RET in parts_pick_nan, Richard Henderson, 2024/12/03
- Re: [PATCH for-10.0 00/11] fpu: pickNaN follow ups, Peter Maydell, 2024/12/10