summary refs log tree commit diff stats
path: root/fpu
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-02-24 11:15:22 +0000
committerPeter Maydell <peter.maydell@linaro.org>2025-02-25 15:32:57 +0000
commit3abed4d0eace62910e90c206cb9d5741c6095b12 (patch)
tree27f7393f1f58c980ccb8c245b83f360a144d24bc /fpu
parent2e01cfea0735889a1e0481fc783d621779439572 (diff)
downloadfocaccia-qemu-3abed4d0eace62910e90c206cb9d5741c6095b12.tar.gz
focaccia-qemu-3abed4d0eace62910e90c206cb9d5741c6095b12.zip
fpu: Always decide snan_bit_is_one() at runtime
Currently we have a compile-time shortcut where we return a hardcode
value from snan_bit_is_one() on everything except MIPS, because we
know that's the only target that needs to change
status->no_signaling_nans at runtime.

Remove the ifdef, so we always look at the status flag.  This means
we must update the two targets (HPPA and SH4) that were previously
hardcoded to return true so that they set the status flag correctly.

This has no behavioural change, but will be necessary if we want to
build softfloat once for all targets.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250224111524.1101196-11-peter.maydell@linaro.org
Message-id: 20250217125055.160887-9-peter.maydell@linaro.org
Diffstat (limited to 'fpu')
-rw-r--r--fpu/softfloat-specialize.c.inc7
1 files changed, 0 insertions, 7 deletions
diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc
index a2c6afad5d..ba4fa08b7b 100644
--- a/fpu/softfloat-specialize.c.inc
+++ b/fpu/softfloat-specialize.c.inc
@@ -93,17 +93,10 @@ static inline bool no_signaling_nans(float_status *status)
  * In IEEE 754-1985 this was implementation defined, but in IEEE 754-2008
  * the msb must be zero.  MIPS is (so far) unique in supporting both the
  * 2008 revision and backward compatibility with their original choice.
- * Thus for MIPS we must make the choice at runtime.
  */
 static inline bool snan_bit_is_one(float_status *status)
 {
-#if defined(TARGET_MIPS)
     return status->snan_bit_is_one;
-#elif defined(TARGET_HPPA) || defined(TARGET_SH4)
-    return 1;
-#else
-    return 0;
-#endif
 }
 
 /*----------------------------------------------------------------------------