fpu: Make targets specify whether floatx80 Inf can have Int bit clear

In Intel terminology, a floatx80 Infinity with the explicit integer
bit clear is a "pseudo-infinity"; for x86 these are not valid
infinity values.  m68k is looser and does not care whether the
Integer bit is set or clear in an infinity.

Move this setting to runtime rather than using an ifdef in
floatx80_is_infinity().

Since this was the last use of the floatx80_infinity global constant,
we remove it and its definition here.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20250224111524.1101196-6-peter.maydell@linaro.org
Message-id: 20250217125055.160887-5-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2025-02-24 11:15:17 +00:00
parent 9ea6d1f141
commit 44eb32a983
4 changed files with 19 additions and 18 deletions

View file

@ -110,8 +110,10 @@ static void m68k_cpu_reset_hold(Object *obj, ResetType type)
/*
* m68k-specific floatx80 behaviour:
* * default Infinity values have a zero Integer bit
* * input Infinities may have the Integer bit either 0 or 1
*/
set_floatx80_behaviour(floatx80_default_inf_int_bit_is_zero,
set_floatx80_behaviour(floatx80_default_inf_int_bit_is_zero |
floatx80_pseudo_inf_valid,
&env->fp_status);
nan = floatx80_default_nan(&env->fp_status);