From: Bruno Haible Date: Fri, 19 Apr 2024 00:13:30 +0000 (+0200) Subject: snan: Add support for m68k. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b04dacbe6cb9393ef8136ca5b362e5725345d27f;p=gnulib.git snan: Add support for m68k. * lib/snan.h (construct_memory_SNaNl): Handle m68k specially. --- diff --git a/ChangeLog b/ChangeLog index a9f1a08d07..740a170c43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-04-18 Bruno Haible + + snan: Add support for m68k. + * lib/snan.h (construct_memory_SNaNl): Handle m68k specially. + 2024-04-13 Bruno Haible bootstrap: Fix --help messages. diff --git a/lib/snan.h b/lib/snan.h index 9523504046..00fea938e9 100644 --- a/lib/snan.h +++ b/lib/snan.h @@ -226,6 +226,11 @@ construct_memory_SNaNl (long double quiet_value) m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < HNWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 2); #endif + #elif (defined __m68k__ && LDBL_MANT_DIG == 64) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE + /* In this representation, there is a 16-bits gap between the exponent and + the mantissa, and the leading 1 of the mantissa is explicitly stored. */ + m.word[LDBL_EXPBIT0_WORD + 1] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 2); #else /* In this representation, the leading 1 of the mantissa is implicit. */ #if LDBL_EXPBIT0_BIT > 0