summary refs log tree commit diff stats
path: root/include/fpu/softfloat-types.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-02-24 11:15:17 +0000
committerPeter Maydell <peter.maydell@linaro.org>2025-02-25 15:32:57 +0000
commit44eb32a9835fe2feb19503e93476eee602daee0b (patch)
tree6615fb3fc6eef6579ccb25afed9df78d149620d0 /include/fpu/softfloat-types.h
parent9ea6d1f141426a7da91f1c7ba3d693472f0550a4 (diff)
downloadfocaccia-qemu-44eb32a9835fe2feb19503e93476eee602daee0b.tar.gz
focaccia-qemu-44eb32a9835fe2feb19503e93476eee602daee0b.zip
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
Diffstat (limited to 'include/fpu/softfloat-types.h')
-rw-r--r--include/fpu/softfloat-types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h
index dd22ecdbe6..e1732beba4 100644
--- a/include/fpu/softfloat-types.h
+++ b/include/fpu/softfloat-types.h
@@ -330,6 +330,11 @@ typedef enum __attribute__((__packed__)) {
 typedef enum __attribute__((__packed__)) {
     /* In the default Infinity value, is the Integer bit 0 ? */
     floatx80_default_inf_int_bit_is_zero = 1,
+    /*
+     * Are Pseudo-infinities (Inf with the Integer bit zero) valid?
+     * If so, floatx80_is_infinity() will return true for them.
+     */
+    floatx80_pseudo_inf_valid = 2,
 } FloatX80Behaviour;
 
 /*