OSDN Git Service

2003-03-11 Pierre Muller <muller@ics.u-strasbg.fr>
authormuller <muller>
Tue, 11 Mar 2003 16:38:51 +0000 (16:38 +0000)
committermuller <muller>
Tue, 11 Mar 2003 16:38:51 +0000 (16:38 +0000)
* doublest.c (floatformat_from_length): Accept also
the real size of 'long double' type.

gdb/ChangeLog
gdb/doublest.c

index 9407556..da11769 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-11  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * doublest.c (floatformat_from_length): Accept also
+       the real size of 'long double' type.
+
 2003-03-10  Klee Dienes  <kdienes@apple.com>
 
        * breakpoint.c (bpstat_copy): Copy the command lines as well
index e601a4d..3f68273 100644 (file)
@@ -633,6 +633,14 @@ floatformat_from_length (int len)
     return TARGET_DOUBLE_FORMAT;
   else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT)
     return TARGET_LONG_DOUBLE_FORMAT;
+  /* On i386 the 'long double' type takes 96 bits,
+     while the real number of used bits is only 80,
+     both in processor and in memory.  
+     The code below accepts the real bit size.  */ 
+  else if ((TARGET_LONG_DOUBLE_FORMAT != NULL) 
+          && (len * TARGET_CHAR_BIT ==
+               TARGET_LONG_DOUBLE_FORMAT->totalsize))
+    return TARGET_LONG_DOUBLE_FORMAT;
 
   return NULL;
 }