gdb/
authorThomas Schwinge <tschwinge@gnu.org>
Wed, 19 Sep 2012 11:09:16 +0000 (11:09 +0000)
committerThomas Schwinge <tschwinge@gnu.org>
Wed, 19 Sep 2012 11:09:16 +0000 (11:09 +0000)
* 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.

gdb/ChangeLog
gdb/h8300-tdep.c
gdb/m68hc11-tdep.c
gdb/sh-tdep.c

index 371217e..ce9d338 100644 (file)
@@ -1,5 +1,11 @@
 2012-09-19  Thomas Schwinge  <thomas@codesourcery.com>
 
+       * 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.
index 7fc4daa..bcb769e 100644 (file)
@@ -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);
 
index 79629ef..cd32459 100644 (file)
@@ -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);
index 03cc4b1..fc462a4 100644 (file)
@@ -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);