]> Savannah Git Hosting - gnulib.git/commitdiff
snan: Add support for m68k.
authorBruno Haible <bruno@clisp.org>
Fri, 19 Apr 2024 00:13:30 +0000 (02:13 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Apr 2024 12:48:13 +0000 (14:48 +0200)
* lib/snan.h (construct_memory_SNaNl): Handle m68k specially.

ChangeLog
lib/snan.h

index a9f1a08d07ad6459ac87e33d933df4a82e23177e..740a170c432ed206a0b1deae717587853a74211c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-04-18  Bruno Haible  <bruno@clisp.org>
+
+       snan: Add support for m68k.
+       * lib/snan.h (construct_memory_SNaNl): Handle m68k specially.
+
 2024-04-13  Bruno Haible  <bruno@clisp.org>
 
        bootstrap: Fix --help messages.
index 95235040461c51169c3b750ea090b87401f39c24..00fea938e9301801703dbe897fc0e18fd21c9c3d 100644 (file)
@@ -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