[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 for-10.0 00/54] fpu: Remove pickNaNMulAdd, default-NaN ifd
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 for-10.0 00/54] fpu: Remove pickNaNMulAdd, default-NaN ifdefs |
Date: |
Mon, 2 Dec 2024 21:51:36 -0600 |
User-agent: |
Mozilla Thunderbird |
On 12/2/24 07:12, Peter Maydell wrote:
(Apologies for this patchset being both big and having a wide CC list;
the good news is that this is the last lot of fpu ifdef cleanup that
needs to touch all the targets.)
This patchset does the same thing we already did for pickNaN() to
pickNaNMulAdd() -- it replaces the compile-time ifdef ladder that
selected target-specific NaN propagation behaviour with checking some
runtime selectable settings in the float_status. The motivation is:
* this will let us have multiple targets in one QEMU binary
* the Arm FEAT_AFP architectural feature includes letting
the guest select a NaN propagation rule at runtime
This is patches 1-26 (which were in the v1 of this series).
It then does a similar thing for making targets select the default
NaN value at runtime rather than relying on a compile-time ifdef.
This is patches 34-54, which are new in v2.
Update needed for is_ebf in target/arm/tcg/vec_helper.c.
I think the best choice is to reverse the copy and test, e.g.
*statusp = env->vfp.fp_status;
set_default_nan_mode(true, statusp);
if (ebf) {
/* EBF=1 needs to do a step with round-to-odd semantics */
*oddstatusp = *statusp;
set_float_rounding_mode(float_round_to_odd, oddstatusp);
} else {
set_flush_to_zero(true, statusp);
set_flush_inputs_to_zero(true, statusp);
set_float_rounding_mode(float_round_to_odd_inf, statusp);
}
r~
- Re: [PATCH v2 for-10.0 36/54] target/microblaze: Set default NaN pattern explicitly, (continued)
- [PATCH v2 for-10.0 33/54] target/ppc: Use env->fp_status in helper_compute_fprf functions, Peter Maydell, 2024/12/02
- [PATCH v2 for-10.0 51/54] target/hexagon: Set default NaN pattern explicitly, Peter Maydell, 2024/12/02
- [PATCH v2 for-10.0 30/54] target/m68k: In frem helper, initialize local float_status from env->fp_status, Peter Maydell, 2024/12/02
- [PATCH v2 for-10.0 44/54] target/openrisc: Set default NaN pattern explicitly, Peter Maydell, 2024/12/02
- [PATCH v2 for-10.0 10/54] target/xtensa: Set FloatInfZeroNaNRule explicitly, Peter Maydell, 2024/12/02
- Re: [PATCH v2 for-10.0 00/54] fpu: Remove pickNaNMulAdd, default-NaN ifdefs,
Richard Henderson <=