+2024-04-18 Bruno Haible <bruno@clisp.org>
+
+ totalorder*: Support newer MIPS CPUs.
+ * lib/totalorder.c (totalorder): On MIPS CPUs with MIPS_NAN2008_DOUBLE,
+ don't invert the most significant bit of the mantissa field.
+ * lib/totalorderf.c (totalorderf): On MIPS CPUs with MIPS_NAN2008_FLOAT,
+ don't invert the most significant bit of the mantissa field.
+ * lib/totalorderl.c (totalorderl): On MIPS CPUs with
+ MIPS_NAN2008_LONG_DOUBLE, don't invert the most significant bit of the
+ mantissa field.
+ * m4/totalorder.m4 (gl_FUNC_TOTALORDERF, gl_FUNC_TOTALORDER,
+ gl_FUNC_TOTALORDERL): Invoke gl_NAN_MIPS.
+ * modules/totalorder (Files): Add m4/nan-mips.m4.
+ * modules/totalorderf (Files): Likewise.
+ * modules/totalorderl (Files): Likewise.
+
2024-04-18 Bruno Haible <bruno@clisp.org>
snan: Add support for m68k.
/* At this point, *X and *Y are NaNs with the same sign bit. */
unsigned long long extended_sign = -!!xs;
-#if defined __hppa || defined __mips__ || defined __sh__
+#if defined __hppa || (defined __mips__ && !MIPS_NAN2008_DOUBLE) || defined __sh__
/* Invert the most significant bit of the mantissa field. Cf. snan.h. */
extended_sign ^= (1ULL << 51);
#endif
/* At this point, *X and *Y are NaNs with the same sign bit. */
unsigned int extended_sign = -!!xs;
-#if defined __hppa || defined __mips__ || defined __sh__
+#if defined __hppa || (defined __mips__ && !MIPS_NAN2008_FLOAT) || defined __sh__
/* Invert the most significant bit of the mantissa field. Cf. snan.h. */
extended_sign ^= (1U << 22);
#endif
if (sizeof (long double) <= sizeof (unsigned long long))
{
-#if defined __hppa || defined __mips__ || defined __sh__
+#if defined __hppa || (defined __mips__ && !MIPS_NAN2008_DOUBLE) || defined __sh__
/* Invert the most significant bit of the mantissa field. Cf. snan.h. */
extended_sign ^= (1ULL << 51);
#endif
}
unsigned long long extended_sign_hi = extended_sign;
-#if defined __hppa || defined __mips__ || defined __sh__
+#if defined __hppa || (defined __mips__ && !MIPS_NAN2008_LONG_DOUBLE) || defined __sh__
/* Invert the most significant bit of the mantissa field. Cf. snan.h. */
extended_sign_hi ^=
(1ULL << (LDBL_MANT_DIG == 106
fi
if test $HAVE_TOTALORDERF = 0 || test $REPLACE_TOTALORDERF = 1; then
TOTALORDERF_LIBM='$(ISNANF_LIBM)'
+ dnl Prerequisite of lib/totalorderf.c.
+ gl_NAN_MIPS
fi
AC_SUBST([TOTALORDERF_LIBM])
])
fi
if test $HAVE_TOTALORDER = 0 || test $REPLACE_TOTALORDER = 1; then
TOTALORDER_LIBM='$(ISNAND_LIBM)'
+ dnl Prerequisite of lib/totalorder.c.
+ gl_NAN_MIPS
fi
AC_SUBST([TOTALORDER_LIBM])
])
TOTALORDERL_LIBM='$(ISNANL_LIBM)'
dnl Prerequisite of lib/totalorderl.c.
gl_LONG_DOUBLE_SIGN_LOCATION
+ gl_NAN_MIPS
fi
AC_SUBST([TOTALORDERL_LIBM])
])
lib/totalorder.c
m4/mathfunc.m4
m4/totalorder.m4
+m4/nan-mips.m4
Depends-on:
math
lib/totalorderf.c
m4/mathfunc.m4
m4/totalorder.m4
+m4/nan-mips.m4
Depends-on:
math
lib/totalorderl.c
m4/mathfunc.m4
m4/totalorder.m4
+m4/nan-mips.m4
m4/signbit.m4
Depends-on: