aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2003-03-11 16:38:52 +0000
committerPierre Muller <muller@sourceware.org>2003-03-11 16:38:52 +0000
commitddbfdd0686dc4fddb4ca5bf33d1f4032fade7752 (patch)
tree5e709589804321d77219804d1e7e57c759bd0362 /gdb/doublest.c
parent4e6498c8665e0a45ad017ea747fd148764a4b4a2 (diff)
downloadgdb-ddbfdd0686dc4fddb4ca5bf33d1f4032fade7752.zip
gdb-ddbfdd0686dc4fddb4ca5bf33d1f4032fade7752.tar.gz
gdb-ddbfdd0686dc4fddb4ca5bf33d1f4032fade7752.tar.bz2
2003-03-11 Pierre Muller <muller@ics.u-strasbg.fr>
* doublest.c (floatformat_from_length): Accept also the real size of 'long double' type.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r--gdb/doublest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c
index e601a4d..3f68273 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -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;
}