diff mbox series

[2/3] target/s390x: fix NaN propagation rules

Message ID 20220712015717.3602602-3-iii@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series target/s390x: vfmin/vfmax fixes | expand

Commit Message

Ilya Leoshkevich July 12, 2022, 1:57 a.m. UTC
s390x has the same NaN propagation rules as ARM, and not as x86.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 fpu/softfloat-specialize.c.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Henderson July 12, 2022, 4:24 a.m. UTC | #1
On 7/12/22 07:27, Ilya Leoshkevich wrote:
> s390x has the same NaN propagation rules as ARM, and not as x86.
> 
> Signed-off-by: Ilya Leoshkevich<iii@linux.ibm.com>
> ---
>   fpu/softfloat-specialize.c.inc | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Yes, I think no one has those x86 rules, including x86.  :-)

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

r~
David Hildenbrand July 12, 2022, 7:17 a.m. UTC | #2
On 12.07.22 03:57, Ilya Leoshkevich wrote:
> s390x has the same NaN propagation rules as ARM, and not as x86.
> 
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  fpu/softfloat-specialize.c.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc
> index 943e3301d2..a43ff5e02e 100644
> --- a/fpu/softfloat-specialize.c.inc
> +++ b/fpu/softfloat-specialize.c.inc
> @@ -390,7 +390,8 @@ bool float32_is_signaling_nan(float32 a_, float_status *status)
>  static int pickNaN(FloatClass a_cls, FloatClass b_cls,
>                     bool aIsLargerSignificand, float_status *status)
>  {
> -#if defined(TARGET_ARM) || defined(TARGET_MIPS) || defined(TARGET_HPPA)
> +#if defined(TARGET_ARM) || defined(TARGET_MIPS) || defined(TARGET_HPPA) || \
> +    defined(TARGET_S390X)
>      /* ARM mandated NaN propagation rules (see FPProcessNaNs()), take
>       * the first of:
>       *  1. A if it is signaling

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc
index 943e3301d2..a43ff5e02e 100644
--- a/fpu/softfloat-specialize.c.inc
+++ b/fpu/softfloat-specialize.c.inc
@@ -390,7 +390,8 @@  bool float32_is_signaling_nan(float32 a_, float_status *status)
 static int pickNaN(FloatClass a_cls, FloatClass b_cls,
                    bool aIsLargerSignificand, float_status *status)
 {
-#if defined(TARGET_ARM) || defined(TARGET_MIPS) || defined(TARGET_HPPA)
+#if defined(TARGET_ARM) || defined(TARGET_MIPS) || defined(TARGET_HPPA) || \
+    defined(TARGET_S390X)
     /* ARM mandated NaN propagation rules (see FPProcessNaNs()), take
      * the first of:
      *  1. A if it is signaling