From 5500e7807ef0b47ac878f1f8adf8acd7bda0408c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 19 Apr 2024 02:13:30 +0200 Subject: [PATCH] snan: Add support for m68k. * lib/snan.h (construct_memory_SNaNl): Handle m68k specially. --- ChangeLog | 5 +++++ lib/snan.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6a92574391..3fe1847897 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-18 Bruno Haible totalorderl: Simplify on MSVC. diff --git a/lib/snan.h b/lib/snan.h index c7312e259f..caee37b515 100644 --- a/lib/snan.h +++ b/lib/snan.h @@ -230,6 +230,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 -- 2.39.5