[PATCH 07/10] fpu: Always decide no_signaling_nans() at runtime

Peter Maydell posted 10 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH 07/10] fpu: Always decide no_signaling_nans() at runtime
Posted by Peter Maydell 1 month, 3 weeks ago
Currently we have a compile-time shortcut where we
return false from no_signaling_nans() on everything except
Xtensa, because we know that's the only target that
might ever set status->no_signaling_nans.

Remove the ifdef, so we always look at the status flag;
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>
---
 fpu/softfloat-specialize.c.inc | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc
index 8327f727861..a2c6afad5da 100644
--- a/fpu/softfloat-specialize.c.inc
+++ b/fpu/softfloat-specialize.c.inc
@@ -85,11 +85,7 @@ this code that are retained.
  */
 static inline bool no_signaling_nans(float_status *status)
 {
-#if defined(TARGET_XTENSA)
     return status->no_signaling_nans;
-#else
-    return false;
-#endif
 }
 
 /* Define how the architecture discriminates signaling NaNs.
-- 
2.43.0
Re: [PATCH 07/10] fpu: Always decide no_signaling_nans() at runtime
Posted by Richard Henderson 1 month, 3 weeks ago
On 2/17/25 04:50, Peter Maydell wrote:
> Currently we have a compile-time shortcut where we
> return false from no_signaling_nans() on everything except
> Xtensa, because we know that's the only target that
> might ever set status->no_signaling_nans.
> 
> Remove the ifdef, so we always look at the status flag;
> 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>
> ---
>   fpu/softfloat-specialize.c.inc | 4 ----
>   1 file changed, 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH 07/10] fpu: Always decide no_signaling_nans() at runtime
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
On 17/2/25 13:50, Peter Maydell wrote:
> Currently we have a compile-time shortcut where we
> return false from no_signaling_nans() on everything except
> Xtensa, because we know that's the only target that
> might ever set status->no_signaling_nans.
> 
> Remove the ifdef, so we always look at the status flag;
> 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>
> ---
>   fpu/softfloat-specialize.c.inc | 4 ----
>   1 file changed, 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>