qemu/target/m68k
Peter Maydell 1e75d8247f fpu: Move m68k_denormal fmt flag into floatx80_behaviour
Currently we compile-time set an 'm68k_denormal' flag in the FloatFmt
for floatx80 for m68k.  This controls our handling of what the Intel
documentation calls a "pseudo-denormal": a value where the exponent
field is zero and the explicit integer bit is set.

For x86, the x87 FPU is supposed to accept a pseudo-denormal as
input, but never generate one on output.  For m68k, these values are
permitted on input and may be produced on output.

Replace the flag in the FloatFmt with a flag indicating whether the
float format has an explicit bit (which will be true for floatx80 for
all targets, and false for every other float type).  Then we can gate
the handling of these pseudo-denormals on the setting of a
floatx80_behaviour flag.

As far as I can see from the code we don't actually handle the
x86-mandated "accept on input but don't generate" behaviour, because
the handling in partsN(canonicalize) looked at fmt->m68k_denormal.
So I have added TODO comments to that effect.

This commit doesn't change any behaviour for any target.

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-9-peter.maydell@linaro.org
Message-id: 20250217125055.160887-7-peter.maydell@linaro.org
2025-02-25 15:32:57 +00:00
..
cpu-param.h target/*: Remove TARGET_LONG_BITS from cpu-param.h 2025-02-08 12:41:33 -08:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu.c fpu: Move m68k_denormal fmt flag into floatx80_behaviour 2025-02-25 15:32:57 +00:00
cpu.h accel/tcg: Move gen_intermediate_code to TCGCPUOps.translate_core 2024-12-24 08:32:15 -08:00
fpu_helper.c fpu: Pass float_status to floatx80_is_infinity() 2025-02-25 15:32:57 +00:00
gdbstub.c target/m68k: Use explicit big-endian LD/ST API 2024-10-07 11:33:20 +02:00
helper.c target/m68k: Init local float_status from env fp_status in gdb get/set reg 2024-12-11 15:31:03 +00:00
helper.h target/m68k: Map FPU exceptions to FPSR register 2024-04-09 07:43:31 -10:00
Kconfig target/m68k: Restrict semihosting to TCG 2024-07-22 09:38:08 +01:00
m68k-semi.c target/m68k: Pass semihosting arg to exit 2024-04-24 15:46:00 -07:00
meson.build target/m68k: Add semihosting stub 2024-07-22 09:38:03 +01:00
monitor.c hmp: Pass monitor to mon_get_cpu_env() 2020-11-13 12:45:51 +00:00
op_helper.c target/m68k: Perform the semihosting test during translate 2024-04-24 15:46:00 -07:00
qregs.h.inc target/m68k: Rename qregs.def -> qregs.h.inc 2022-11-05 20:35:45 +01:00
semihosting-stub.c licenses: Remove SPDX tags not being license identifier for Linaro 2025-01-30 13:01:22 +03:00
softfloat.c target/m68k: Avoid using floatx80_infinity global const 2025-02-25 15:32:57 +00:00
softfloat.h softfloat: merge floatx80_mod and floatx80_rem 2020-06-26 09:39:37 -04:00
softfloat_fpsp_tables.h m68k comments break patch submission due to being incorrectly formatted 2019-06-26 17:14:39 +02:00
translate.c accel/tcg: Move gen_intermediate_code to TCGCPUOps.translate_core 2024-12-24 08:32:15 -08:00