diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-06-02 01:59:13 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-06-02 01:59:13 +0000 |
commit | f0d4cc9e0ec5ad1533782d32bbf5029b2601828f (patch) | |
tree | 694515271aab5920d4cf655104b857ff03479e1a /gdb/d10v-tdep.c | |
parent | 1b3739704ea05cca80c0401d4b33ad3dc625e6f4 (diff) | |
download | gdb-f0d4cc9e0ec5ad1533782d32bbf5029b2601828f.zip gdb-f0d4cc9e0ec5ad1533782d32bbf5029b2601828f.tar.gz gdb-f0d4cc9e0ec5ad1533782d32bbf5029b2601828f.tar.bz2 |
Multiarch TARGET_FLOAT_FORMAT, TARGET_DOUBLE_FORMAT,
TARGET_LONG_DOUBLE_FORMAT. Update d10v.
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r-- | gdb/d10v-tdep.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 7ac4174..094741e 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -36,6 +36,7 @@ #include "language.h" #include "arch-utils.h" +#include "floatformat.h" #include "sim-d10v.h" #undef XMALLOC @@ -1596,9 +1597,26 @@ d10v_gdbarch_init (info, arches) set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT); set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_long_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); + /* NOTE: The d10v as a 32 bit ``float'' and ``double''. ``long + double'' is 64 bits. */ set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); + switch (info.byte_order) + { + case BIG_ENDIAN: + set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_big); + set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_big); + set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big); + break; + case LITTLE_ENDIAN: + set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_little); + set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_little); + set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_little); + break; + default: + internal_error ("d10v_gdbarch_init: bad byte order for float format"); + } set_gdbarch_use_generic_dummy_frames (gdbarch, 1); set_gdbarch_call_dummy_length (gdbarch, 0); |