>From 8178a7d30b7a560f1196a2628d2ec2e01178e1a7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 19 Apr 2024 02:14:45 +0200 Subject: [PATCH 3/3] setpayloadsig*: Support newer MIPS CPUs. * lib/setpayloadsig.c (setpayloadsig): On MIPS CPUs with MIPS_NAN2008_DOUBLE, reject a zero payload. * lib/setpayloadsigf.c (setpayloadsigf): On MIPS CPUs with MIPS_NAN2008_FLOAT, reject a zero payload. * lib/setpayloadsigl.c (setpayloadsigl): On MIPS CPUs with MIPS_NAN2008_LONG_DOUBLE, reject a zero payload. --- ChangeLog | 10 ++++++++++ lib/setpayloadsig.c | 2 +- lib/setpayloadsigf.c | 2 +- lib/setpayloadsigl.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3c806d91c..8c90a81e0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-04-18 Bruno Haible + + setpayloadsig*: Support newer MIPS CPUs. + * lib/setpayloadsig.c (setpayloadsig): On MIPS CPUs with MIPS_NAN2008_DOUBLE, + reject a zero payload. + * lib/setpayloadsigf.c (setpayloadsigf): On MIPS CPUs with MIPS_NAN2008_FLOAT, + reject a zero payload. + * lib/setpayloadsigl.c (setpayloadsigl): On MIPS CPUs with + MIPS_NAN2008_LONG_DOUBLE, reject a zero payload. + 2024-04-18 Bruno Haible setpayload*: Support newer MIPS CPUs. diff --git a/lib/setpayloadsig.c b/lib/setpayloadsig.c index c336f08c80..e9036dab86 100644 --- a/lib/setpayloadsig.c +++ b/lib/setpayloadsig.c @@ -32,7 +32,7 @@ setpayloadsig (double *result, double payload) { #if DBL_MANT_DIG == 53 if ( -# if defined __hppa || defined __mips__ || defined __sh__ +# if defined __hppa || (defined __mips__ && !MIPS_NAN2008_DOUBLE) || defined __sh__ payload >= 0.0 # else /* A zero payload is not allowed, because that would denote Infinity. diff --git a/lib/setpayloadsigf.c b/lib/setpayloadsigf.c index 0f41f9f3df..aa92afa495 100644 --- a/lib/setpayloadsigf.c +++ b/lib/setpayloadsigf.c @@ -32,7 +32,7 @@ setpayloadsigf (float *result, float payload) { #if FLT_MANT_DIG == 24 if ( -# if defined __hppa || defined __mips__ || defined __sh__ +# if defined __hppa || (defined __mips__ && !MIPS_NAN2008_FLOAT) || defined __sh__ payload >= 0.0f # else /* A zero payload is not allowed, because that would denote Infinity. diff --git a/lib/setpayloadsigl.c b/lib/setpayloadsigl.c index 5cfe3cb783..752d158401 100644 --- a/lib/setpayloadsigl.c +++ b/lib/setpayloadsigl.c @@ -49,7 +49,7 @@ setpayloadsigl (long double *result, long double payload) # if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 106 || LDBL_MANT_DIG == 113) \ && defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT if ( -# if defined __hppa || defined __mips__ || defined __sh__ +# if defined __hppa || (defined __mips__ && !MIPS_NAN2008_LONG_DOUBLE) || defined __sh__ payload >= 0.0L # else /* A zero payload is not allowed, because that would denote Infinity. -- 2.34.1