From: Thomas Schwinge Date: Wed, 19 Sep 2012 11:09:16 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f92589cba1cb4e3ca65c1b97d797d7ddc5660226;p=binutils-gdb.git gdb/ * h8300-tdep.c (h8300_gdbarch_init): Invoke set_gdbarch_double_format and set_gdbarch_long_double_format. * m68hc11-tdep.c (m68hc11_gdbarch_init): Invoke set_gdbarch_double_format. * sh-tdep.c (sh_gdbarch_init): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 371217ee4e3..ce9d33811b8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2012-09-19 Thomas Schwinge + * h8300-tdep.c (h8300_gdbarch_init): Invoke + set_gdbarch_double_format and set_gdbarch_long_double_format. + * m68hc11-tdep.c (m68hc11_gdbarch_init): Invoke + set_gdbarch_double_format. + * sh-tdep.c (sh_gdbarch_init): Likewise. + * NEWS: Document the removal of SH's 'regs' command. * sh-tdep.c (_initialize_sh_tdep): Remove the deprecated 'regs' command. diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 7fc4daadc84..bcb769e4246 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1351,7 +1351,9 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT); + set_gdbarch_double_format (gdbarch, floatformats_ieee_single); set_gdbarch_long_double_bit (gdbarch, 4 * TARGET_CHAR_BIT); + set_gdbarch_long_double_format (gdbarch, floatformats_ieee_single); set_gdbarch_believe_pcc_promotion (gdbarch, 1); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 79629ef897b..cd324596ca0 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1498,7 +1498,16 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_short_bit (gdbarch, 16); set_gdbarch_int_bit (gdbarch, elf_flags & E_M68HC11_I32 ? 32 : 16); set_gdbarch_float_bit (gdbarch, 32); - set_gdbarch_double_bit (gdbarch, elf_flags & E_M68HC11_F64 ? 64 : 32); + if (elf_flags & E_M68HC11_F64) + { + set_gdbarch_double_bit (gdbarch, 64); + set_gdbarch_double_format (gdbarch, floatformats_ieee_double); + } + else + { + set_gdbarch_double_bit (gdbarch, 32); + set_gdbarch_double_format (gdbarch, floatformats_ieee_single); + } set_gdbarch_long_double_bit (gdbarch, 64); set_gdbarch_long_bit (gdbarch, 32); set_gdbarch_ptr_bit (gdbarch, 16); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 03cc4b19a7c..fc462a4a300 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2299,6 +2299,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case bfd_mach_sh2e: /* doubles on sh2e and sh3e are actually 4 byte. */ set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT); + set_gdbarch_double_format (gdbarch, floatformats_ieee_single); set_gdbarch_register_name (gdbarch, sh_sh2e_register_name); set_gdbarch_register_type (gdbarch, sh_sh3e_register_type); @@ -2344,6 +2345,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case bfd_mach_sh2a_or_sh3e: /* doubles on sh2e and sh3e are actually 4 byte. */ set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT); + set_gdbarch_double_format (gdbarch, floatformats_ieee_single); set_gdbarch_register_name (gdbarch, sh_sh3e_register_name); set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);