Message ID | 20241128104310.3452934-24-peter.maydell@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | fpu: Make pickNaNMulAdd behaviour runtime selected | expand |
On 11/28/24 04:43, Peter Maydell wrote: > Set the Float3NaNPropRule explicitly for i386. We had no > i386-specific behaviour in the old ifdef ladder, so we were using the > default "prefer a then b then c" fallback. This is very likely wrong > for i386, but in this refactoring we don't want to make a behaviour > change, so we leave a TODO note. > > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> > --- > target/i386/tcg/fpu_helper.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c > index e9de084a96d..b62719dead1 100644 > --- a/target/i386/tcg/fpu_helper.c > +++ b/target/i386/tcg/fpu_helper.c > @@ -180,6 +180,8 @@ void cpu_init_fp_statuses(CPUX86State *env) > * against the manual. > */ > set_float_infzeronan_rule(float_infzeronan_dnan_never, &env->sse_status); > + /* Similarly the NaN propagation rule is likely wrong. */ > + set_float_3nan_prop_rule(float_3nan_prop_abc, &env->sse_status); Per my response to patch 11, this is correct. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index e9de084a96d..b62719dead1 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -180,6 +180,8 @@ void cpu_init_fp_statuses(CPUX86State *env) * against the manual. */ set_float_infzeronan_rule(float_infzeronan_dnan_never, &env->sse_status); + /* Similarly the NaN propagation rule is likely wrong. */ + set_float_3nan_prop_rule(float_3nan_prop_abc, &env->sse_status); } static inline uint8_t save_exception_flags(CPUX86State *env)
Set the Float3NaNPropRule explicitly for i386. We had no i386-specific behaviour in the old ifdef ladder, so we were using the default "prefer a then b then c" fallback. This is very likely wrong for i386, but in this refactoring we don't want to make a behaviour change, so we leave a TODO note. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target/i386/tcg/fpu_helper.c | 2 ++ 1 file changed, 2 insertions(+)