aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-07-06 12:56:24 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-07-06 12:56:24 +0000
commitf9e9243aad66a7923e30c61cd1749623fa568f79 (patch)
treec7ccf41dd950d38c46f54b59a3641f08c880891e /gdb/doublest.c
parent50248c890f1bc82c6e1751bd549da7580c60f098 (diff)
downloadgdb-f9e9243aad66a7923e30c61cd1749623fa568f79.zip
gdb-f9e9243aad66a7923e30c61cd1749623fa568f79.tar.gz
gdb-f9e9243aad66a7923e30c61cd1749623fa568f79.tar.bz2
include/ChangeLog:
2010-07-06 Ken Werner <ken.werner@de.ibm.com> * floatformat.h (floatformat_ieee_half_big): Add declaration. (floatformat_ieee_half_little): Likewise. libiberty/ChangeLog: 2010-07-06 Ken Werner <ken.werner@de.ibm.com> * floatformat.c (floatformat_ieee_half_big): New variable. (floatformat_ieee_half_little): Likewise. gdb/ChangeLog: 2010-07-06 Ken Werner <ken.werner@de.ibm.com> * gdbtypes.h (floatformats_ieee_half): Add declaration. * gdbtypes.c (floatformats_ieee_half): New variable. * doublest.c (floatformat_from_length): Set format to gdbarch_half_format if length matches. * gdbarch.sh (half_bit): New architecture method. (half_format): Likewise. * gdbarch.h: Regenerate. * gdbarch.c: Likewise.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r--gdb/doublest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 0dc09ab..7e8b343 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -777,7 +777,10 @@ floatformat_from_length (struct gdbarch *gdbarch, int len)
{
const struct floatformat *format;
- if (len * TARGET_CHAR_BIT == gdbarch_float_bit (gdbarch))
+ if (len * TARGET_CHAR_BIT == gdbarch_half_bit (gdbarch))
+ format = gdbarch_half_format (gdbarch)
+ [gdbarch_byte_order (gdbarch)];
+ else if (len * TARGET_CHAR_BIT == gdbarch_float_bit (gdbarch))
format = gdbarch_float_format (gdbarch)
[gdbarch_byte_order (gdbarch)];
else if (len * TARGET_CHAR_BIT == gdbarch_double_bit (gdbarch))