diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-01-29 17:31:06 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-01-29 17:31:06 +0000 |
commit | 8da61cc40ac287bc30919c8648c0f7addc515008 (patch) | |
tree | eb58ca81d7519243507ccb6362816ede4a492163 /gdb/arm-tdep.c | |
parent | cecb04b70c2a8d2f5ea53524435ccd59d6e65bbb (diff) | |
download | gdb-8da61cc40ac287bc30919c8648c0f7addc515008.zip gdb-8da61cc40ac287bc30919c8648c0f7addc515008.tar.gz gdb-8da61cc40ac287bc30919c8648c0f7addc515008.tar.bz2 |
* doublest.c (floatformat_from_length): Use the right element from
gdbarch floatformats.
(floatformat_from_type, extract_typed_floating)
(store_typed_floating): Likewise.
* doublest.h: Remove declarations for undefined floatformat arrays.
* gdbarch.sh (float_format, double_format, long_double_format): Change
to pairs.
(pformat): Update for pairs.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbtypes.c (floatformats_ieee_single, floatformats_ieee_double)
(floatformats_ieee_double_littlebyte_bigword)
(floatformats_i387_ext, floatformats_m68881_ext, floatformats_arm_ext)
(floatformats_ia64_spill, floatformats_ia64_quad, floatformats_vax_f)
(floatformats_vax_d): New variables.
(builtin_type_ieee_single, builtin_type_ieee_double)
(builtin_type_arm_ext, builtin_type_ia64_spill)
(builtin_type_ia64_quad): Replace arrays with individual types.
(builtin_type_ieee_single_big, builtin_type_ieee_single_little)
(builtin_type_ieee_double_big, builtin_type_ieee_double_little)
(builtin_type_ieee_double_littlebyte_bigword, builtin_type_i960_ext)
(builtin_type_m88110_ext, builtin_type_m88110_harris_ext)
(builtin_type_arm_ext_big, builtin_type_arm_ext_littlebyte_bigword)
(builtin_type_ia64_spill_big, builtin_type_ia64_spill_little)
(builtin_type_ia64_quad_big, builtin_type_ia64_quad_little): Delete
unused and endian-specific types.
(recursive_dump_type): Update for floatformat pairs.
(build_flt): Move higher. Handle bit == -1. Take a floatformat pair.
(build_gdbtypes): Use build_flt.
(_initialize_gdbtypes): Update set of initialized types.
* gdbtypes.h: Update declarations to match gdbtypes.c.
(struct main_type): Store a pointer to two floatformats.
* arch-utils.c (default_float_format, default_double_format): Delete.
* arch-utils.h (default_float_format, default_double_format): Delete.
* arm-tdep.c, avr-tdep.c, hppa-tdep.c, hppabsd-tdep.c, i386-tdep.c,
ia64-tdep.c, iq2000-tdep.c, m68k-tdep.c, m88k-tdep.c,
mips-linux-tdep.c, mips-tdep.c, mt-tdep.c, ppcobsd-tdep.c,
sparc-linux-tdep.c, sparc-tdep.c, sparcnbsd-tdep.c, spu-tdep.c,
vax-tdep.c, alpha-tdep.c, ppc-sysv-tdep.c: Update.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index f254876..7b92cd7 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1334,12 +1334,7 @@ static struct type * arm_register_type (struct gdbarch *gdbarch, int regnum) { if (regnum >= ARM_F0_REGNUM && regnum < ARM_F0_REGNUM + NUM_FREGS) - { - if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) - return builtin_type_arm_ext_big; - else - return builtin_type_arm_ext_littlebyte_bigword; - } + return builtin_type_arm_ext; else if (regnum == ARM_SP_REGNUM) return builtin_type_void_data_ptr; else if (regnum == ARM_PC_REGNUM) @@ -2833,34 +2828,18 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_get_longjmp_target (gdbarch, arm_get_longjmp_target); /* Floating point sizes and format. */ - switch (info.byte_order) + set_gdbarch_float_format (gdbarch, floatformats_ieee_single); + if (fp_model == ARM_FLOAT_SOFT_FPA || fp_model == ARM_FLOAT_FPA) { - case BFD_ENDIAN_BIG: - set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_big); - set_gdbarch_double_format (gdbarch, &floatformat_ieee_double_big); - set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big); - break; - - case BFD_ENDIAN_LITTLE: - set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_little); - if (fp_model == ARM_FLOAT_SOFT_FPA || fp_model == ARM_FLOAT_FPA) - { - set_gdbarch_double_format - (gdbarch, &floatformat_ieee_double_littlebyte_bigword); - set_gdbarch_long_double_format - (gdbarch, &floatformat_ieee_double_littlebyte_bigword); - } - else - { - set_gdbarch_double_format (gdbarch, &floatformat_ieee_double_little); - set_gdbarch_long_double_format (gdbarch, - &floatformat_ieee_double_little); - } - break; - - default: - internal_error (__FILE__, __LINE__, - _("arm_gdbarch_init: bad byte order for float format")); + set_gdbarch_double_format + (gdbarch, floatformats_ieee_double_littlebyte_bigword); + set_gdbarch_long_double_format + (gdbarch, floatformats_ieee_double_littlebyte_bigword); + } + else + { + set_gdbarch_double_format (gdbarch, floatformats_ieee_double); + set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double); } return gdbarch; |