]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Target FP: Remove convert_typed_floating from tdep files
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 6 Nov 2017 15:01:37 +0000 (16:01 +0100)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 6 Nov 2017 15:01:37 +0000 (16:01 +0100)
This patch mechanically replaces convert_typed_floating with the
equivalent target_float_convert throughout tdep files, to prepare
for the removal of doublest.{c,h}.

No functional change intended.

gdb/ChangeLog:
2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>

* i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
(i386_extract_return_value): Use target_float_convert.
(i386_store_return_value): Likewise.
* i387-tdep.c (i387_register_to_value): Use target_float_convert.
(i387_value_to_register): Likewise.
* ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
(ia64_register_to_value): Use target_float_convert.
(ia64_value_to_register): Likewise.
(ia64_extract_return_value): Likewise.
(ia64_store_return_value): Likewise.
(ia64_push_dummy_call): Likewise.
* m68k-tdep.c: Include "target-float.h".
(m68k_register_to_value): Use target_float_convert.
(m68k_value_to_register): Likewise.
(m68k_svr4_extract_return_value): Likewise.
(m68k_svr4_store_return_value): Likewise.
* ppc-sysv-tdep.c: Include "target-float.h".
(ppc_sysv_abi_push_dummy_call): Use target_float_convert.
(do_ppc_sysv_return_value): Likewise.
(ppc64_sysv_abi_push_freg): Likewise.
(ppc64_sysv_abi_return_value_base): Likewise.
* rs6000-aix-tdep.c: Include "target-float.h".
(rs6000_push_dummy_call): Use target_float_convert.
(rs6000_return_value): Likewise.
* rs6000-lynx178-tdep.c: Include "target-float.h".
(rs6000_lynx178_push_dummy_call): Use target_float_convert.
(rs6000_lynx178_return_value): Likewise.
* rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
(rs6000_register_to_value): Use target_float_convert.
(rs6000_value_to_register): Likewise.
* arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
(arm_extract_return_value): Use target_float_convert.
(arm_store_return_value): Likewise.
* sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
(sh_register_convert_to_virtual): Use target_float_convert.
(sh_register_convert_to_raw): Likewise.
* sh64-tdep.c: Include "target-float.h".
(sh64_extract_return_value): Use target_float_convert.
(sh64_register_convert_to_virtual): Likewise.
(sh64_register_convert_to_raw): Likewise.  Fix argument types.

12 files changed:
gdb/ChangeLog
gdb/arm-tdep.c
gdb/i386-tdep.c
gdb/i387-tdep.c
gdb/ia64-tdep.c
gdb/m68k-tdep.c
gdb/ppc-sysv-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-lynx178-tdep.c
gdb/rs6000-tdep.c
gdb/sh-tdep.c
gdb/sh64-tdep.c

index 8f0432aed104db215a039d2aeb310b7ec87bda62..617caaea7980c0d0504c62c2478c9f8707d358e9 100644 (file)
@@ -1,3 +1,46 @@
+2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
+       (i386_extract_return_value): Use target_float_convert.
+       (i386_store_return_value): Likewise.
+       * i387-tdep.c (i387_register_to_value): Use target_float_convert.
+       (i387_value_to_register): Likewise.
+       * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
+       (ia64_register_to_value): Use target_float_convert.
+       (ia64_value_to_register): Likewise.
+       (ia64_extract_return_value): Likewise.
+       (ia64_store_return_value): Likewise.
+       (ia64_push_dummy_call): Likewise.
+       * m68k-tdep.c: Include "target-float.h".
+       (m68k_register_to_value): Use target_float_convert.
+       (m68k_value_to_register): Likewise.
+       (m68k_svr4_extract_return_value): Likewise.
+       (m68k_svr4_store_return_value): Likewise.
+       * ppc-sysv-tdep.c: Include "target-float.h".
+       (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
+       (do_ppc_sysv_return_value): Likewise.
+       (ppc64_sysv_abi_push_freg): Likewise.
+       (ppc64_sysv_abi_return_value_base): Likewise.
+       * rs6000-aix-tdep.c: Include "target-float.h".
+       (rs6000_push_dummy_call): Use target_float_convert.
+       (rs6000_return_value): Likewise.
+       * rs6000-lynx178-tdep.c: Include "target-float.h".
+       (rs6000_lynx178_push_dummy_call): Use target_float_convert.
+       (rs6000_lynx178_return_value): Likewise.
+       * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
+       (rs6000_register_to_value): Use target_float_convert.
+       (rs6000_value_to_register): Likewise.
+       * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
+       (arm_extract_return_value): Use target_float_convert.
+       (arm_store_return_value): Likewise.
+       * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
+       (sh_register_convert_to_virtual): Use target_float_convert.
+       (sh_register_convert_to_raw): Likewise.
+       * sh64-tdep.c: Include "target-float.h".
+       (sh64_extract_return_value): Use target_float_convert.
+       (sh64_register_convert_to_virtual): Likewise.
+       (sh64_register_convert_to_raw): Likewise.  Fix argument types.
+
 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * target-float.c (floatformat_to_host_double): New function.
index 46b7888fc99eae47c3047e426ffe11d2d031f8f8..d38f2c82168736fae21441bac360cfee48d72d31 100644 (file)
@@ -30,7 +30,7 @@
 #include "disasm.h"
 #include "regcache.h"
 #include "reggroups.h"
-#include "doublest.h"
+#include "target-float.h"
 #include "value.h"
 #include "arch-utils.h"
 #include "osabi.h"
@@ -7902,8 +7902,8 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
            bfd_byte tmpbuf[FP_REGISTER_SIZE];
 
            regcache_cooked_read (regs, ARM_F0_REGNUM, tmpbuf);
-           convert_typed_floating (tmpbuf, arm_ext_type (gdbarch),
-                                   valbuf, type);
+           target_float_convert (tmpbuf, arm_ext_type (gdbarch),
+                                 valbuf, type);
          }
          break;
 
@@ -8107,7 +8107,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
        {
        case ARM_FLOAT_FPA:
 
-         convert_typed_floating (valbuf, type, buf, arm_ext_type (gdbarch));
+         target_float_convert (valbuf, type, buf, arm_ext_type (gdbarch));
          regcache_cooked_write (regs, ARM_F0_REGNUM, buf);
          break;
 
index e412150df1103ec1d478063c8faf1efc7aa67b01..81048081ad8035cd0c82c651f8982d7c6de987f7 100644 (file)
@@ -23,7 +23,6 @@
 #include "command.h"
 #include "dummy-frame.h"
 #include "dwarf2-frame.h"
-#include "doublest.h"
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
@@ -40,6 +39,7 @@
 #include "symfile.h"
 #include "symtab.h"
 #include "target.h"
+#include "target-float.h"
 #include "value.h"
 #include "dis-asm.h"
 #include "disasm.h"
@@ -2802,7 +2802,7 @@ i386_extract_return_value (struct gdbarch *gdbarch, struct type *type,
         exactly how it would happen on the target itself, but it is
         the best we can do.  */
       regcache_raw_read (regcache, I386_ST0_REGNUM, buf);
-      convert_typed_floating (buf, i387_ext_type (gdbarch), valbuf, type);
+      target_float_convert (buf, i387_ext_type (gdbarch), valbuf, type);
     }
   else
     {
@@ -2857,7 +2857,7 @@ i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
         floating-point format used by the FPU.  This is probably
         not exactly how it would happen on the target itself, but
         it is the best we can do.  */
-      convert_typed_floating (valbuf, type, buf, i387_ext_type (gdbarch));
+      target_float_convert (valbuf, type, buf, i387_ext_type (gdbarch));
       regcache_raw_write (regcache, I386_ST0_REGNUM, buf);
 
       /* Set the top of the floating-point register stack to 7.  The
index 8de0431f378c5127630cf79c2e9fc03cf73062d3..b2ba55746eb9863d28f6a72fbcacd0dd928f847b 100644 (file)
@@ -369,7 +369,7 @@ i387_register_to_value (struct frame_info *frame, int regnum,
                                 from, optimizedp, unavailablep))
     return 0;
 
-  convert_typed_floating (from, i387_ext_type (gdbarch), to, type);
+  target_float_convert (from, i387_ext_type (gdbarch), to, type);
   *optimizedp = *unavailablep = 0;
   return 1;
 }
@@ -395,7 +395,7 @@ i387_value_to_register (struct frame_info *frame, int regnum,
     }
 
   /* Convert from TYPE.  */
-  convert_typed_floating (from, type, to, i387_ext_type (gdbarch));
+  target_float_convert (from, type, to, i387_ext_type (gdbarch));
   put_frame_register (frame, regnum, to);
 }
 \f
index 7007560dadb4c23a438e9daae110b3b90debc08c..e1d8075e2e083063484116f917b29e5ce8660695 100644 (file)
@@ -28,7 +28,7 @@
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "doublest.h"
+#include "target-float.h"
 #include "value.h"
 #include "objfiles.h"
 #include "elf/common.h"                /* for DT_PLTGOT value */
@@ -1228,7 +1228,7 @@ ia64_register_to_value (struct frame_info *frame, int regnum,
                                 in, optimizedp, unavailablep))
     return 0;
 
-  convert_typed_floating (in, ia64_ext_type (gdbarch), out, valtype);
+  target_float_convert (in, ia64_ext_type (gdbarch), out, valtype);
   *optimizedp = *unavailablep = 0;
   return 1;
 }
@@ -1239,7 +1239,7 @@ ia64_value_to_register (struct frame_info *frame, int regnum,
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   gdb_byte out[IA64_FP_REGISTER_SIZE];
-  convert_typed_floating (in, valtype, out, ia64_ext_type (gdbarch));
+  target_float_convert (in, valtype, out, ia64_ext_type (gdbarch));
   put_frame_register (frame, regnum, out);
 }
 
@@ -3209,8 +3209,8 @@ ia64_extract_return_value (struct type *type, struct regcache *regcache,
       while (n-- > 0)
        {
          regcache_cooked_read (regcache, regnum, from);
-         convert_typed_floating (from, ia64_ext_type (gdbarch),
-                                 (char *)valbuf + offset, float_elt_type);
+         target_float_convert (from, ia64_ext_type (gdbarch),
+                               valbuf + offset, float_elt_type);
          offset += TYPE_LENGTH (float_elt_type);
          regnum++;
        }
@@ -3273,8 +3273,8 @@ ia64_store_return_value (struct type *type, struct regcache *regcache,
 
       while (n-- > 0)
        {
-         convert_typed_floating ((char *)valbuf + offset, float_elt_type,
-                                 to, ia64_ext_type (gdbarch));
+         target_float_convert (valbuf + offset, float_elt_type,
+                               to, ia64_ext_type (gdbarch));
          regcache_cooked_write (regcache, regnum, to);
          offset += TYPE_LENGTH (float_elt_type);
          regnum++;
@@ -3829,9 +3829,9 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
          while (len > 0 && floatreg < IA64_FR16_REGNUM)
            {
              gdb_byte to[IA64_FP_REGISTER_SIZE];
-             convert_typed_floating (value_contents (arg) + argoffset,
-                                     float_elt_type, to,
-                                     ia64_ext_type (gdbarch));
+             target_float_convert (value_contents (arg) + argoffset,
+                                   float_elt_type, to,
+                                   ia64_ext_type (gdbarch));
              regcache_cooked_write (regcache, floatreg, to);
              floatreg++;
              argoffset += TYPE_LENGTH (float_elt_type);
index 274ba61ea587e8952fb284d0617b18119ed0616d..9dc1fe6f014caf7de3884fcda4b57f9da94a142f 100644 (file)
@@ -33,6 +33,7 @@
 #include "dis-asm.h"
 #include "target-descriptions.h"
 #include "floatformat.h"
+#include "target-float.h"
 
 #include "m68k-tdep.h"
 \f
@@ -214,7 +215,7 @@ m68k_register_to_value (struct frame_info *frame, int regnum,
                                 from, optimizedp, unavailablep))
     return 0;
 
-  convert_typed_floating (from, fpreg_type, to, type);
+  target_float_convert (from, fpreg_type, to, type);
   *optimizedp = *unavailablep = 0;
   return 1;
 }
@@ -239,7 +240,7 @@ m68k_value_to_register (struct frame_info *frame, int regnum,
     }
 
   /* Convert from TYPE.  */
-  convert_typed_floating (from, type, to, fpreg_type);
+  target_float_convert (from, type, to, fpreg_type);
   put_frame_register (frame, regnum, to);
 }
 
@@ -311,7 +312,7 @@ m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
     {
       struct type *fpreg_type = register_type (gdbarch, M68K_FP0_REGNUM);
       regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
-      convert_typed_floating (buf, fpreg_type, valbuf, type);
+      target_float_convert (buf, fpreg_type, valbuf, type);
     }
   else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
     regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
@@ -351,7 +352,7 @@ m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
     {
       struct type *fpreg_type = register_type (gdbarch, M68K_FP0_REGNUM);
       gdb_byte buf[M68K_MAX_REGISTER_SIZE];
-      convert_typed_floating (valbuf, type, buf, fpreg_type);
+      target_float_convert (valbuf, type, buf, fpreg_type);
       regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
     }
   else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
index ea655b90d6e9fc27abc48c9677d1aa8717fb53f3..b43f22da171b14dd88f945e9c4bb9e4f1484ecb7 100644 (file)
@@ -28,6 +28,7 @@
 #include "objfiles.h"
 #include "infcall.h"
 #include "dwarf2.h"
+#include "target-float.h"
 #include <algorithm>
 
 
@@ -137,7 +138,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                      gdb_byte regval[PPC_MAX_REGISTER_SIZE];
                      struct type *regtype
                        = register_type (gdbarch, tdep->ppc_fp0_regnum + freg);
-                     convert_typed_floating (val, type, regval, regtype);
+                     target_float_convert (val, type, regval, regtype);
                      regcache_cooked_write (regcache,
                                              tdep->ppc_fp0_regnum + freg,
                                             regval);
@@ -367,8 +368,8 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                              gdb_byte regval[PPC_MAX_REGISTER_SIZE];
                              struct type *regtype
                                = register_type (gdbarch, regnum);
-                             convert_typed_floating (elval, eltype,
-                                                     regval, regtype);
+                             target_float_convert (elval, eltype,
+                                                   regval, regtype);
                              regcache_cooked_write (regcache, regnum, regval);
                            }
                          freg++;
@@ -710,7 +711,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          struct type *regtype = register_type (gdbarch,
                                                 tdep->ppc_fp0_regnum + 1);
          regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
-         convert_typed_floating (regval, regtype, readbuf, type);
+         target_float_convert (regval, regtype, readbuf, type);
        }
       if (writebuf)
        {
@@ -718,7 +719,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
             the register's "double" type.  */
          gdb_byte regval[PPC_MAX_REGISTER_SIZE];
          struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum);
-         convert_typed_floating (writebuf, type, regval, regtype);
+         target_float_convert (writebuf, type, regval, regtype);
          regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1, regval);
        }
       return RETURN_VALUE_REGISTER_CONVENTION;
@@ -852,15 +853,15 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
 
              if (writebuf != NULL)
                {
-                 convert_typed_floating (writebuf + offset, eltype,
-                                         regval, regtype);
+                 target_float_convert (writebuf + offset, eltype,
+                                       regval, regtype);
                  regcache_cooked_write (regcache, regnum, regval);
                }
              if (readbuf != NULL)
                {
                  regcache_cooked_read (regcache, regnum, regval);
-                 convert_typed_floating (regval, regtype,
-                                         readbuf + offset, eltype);
+                 target_float_convert (regval, regtype,
+                                       readbuf + offset, eltype);
                }
            }
          else
@@ -1371,7 +1372,7 @@ ppc64_sysv_abi_push_freg (struct gdbarch *gdbarch,
          struct type *regtype = register_type (gdbarch, regnum);
          gdb_byte regval[PPC_MAX_REGISTER_SIZE];
 
-         convert_typed_floating (val, type, regval, regtype);
+         target_float_convert (val, type, regval, regtype);
          regcache_cooked_write (argpos->regcache, regnum, regval);
        }
 
@@ -1818,13 +1819,13 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
 
       if (writebuf != NULL)
        {
-         convert_typed_floating (writebuf, valtype, regval, regtype);
+         target_float_convert (writebuf, valtype, regval, regtype);
          regcache_cooked_write (regcache, regnum, regval);
        }
       if (readbuf != NULL)
        {
          regcache_cooked_read (regcache, regnum, regval);
-         convert_typed_floating (regval, regtype, readbuf, valtype);
+         target_float_convert (regval, regtype, readbuf, valtype);
        }
       return 1;
     }
index 2399677c828b01de4a57199a08380fb9a0265253..8cc7539a8cb1d015b9a0c8f3eaaa79f95da9a0fb 100644 (file)
@@ -36,6 +36,7 @@
 #include "xcoffread.h"
 #include "solib.h"
 #include "solib-aix.h"
+#include "target-float.h"
 #include "xml-utils.h"
 
 /* If the kernel has to deliver a signal, it pushes a sigcontext
@@ -258,8 +259,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 
          gdb_assert (len <= 8);
 
-         convert_typed_floating (value_contents (arg), type,
-                                 reg_val, reg_type);
+         target_float_convert (value_contents (arg), type, reg_val, reg_type);
          regcache_cooked_write (regcache, fp_regnum, reg_val);
          ++f_argno;
        }
@@ -463,11 +463,11 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
       if (readbuf)
        {
          regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
-         convert_typed_floating (regval, regtype, readbuf, valtype);
+         target_float_convert (regval, regtype, readbuf, valtype);
        }
       if (writebuf)
        {
-         convert_typed_floating (writebuf, valtype, regval, regtype);
+         target_float_convert (writebuf, valtype, regval, regtype);
          regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1, regval);
        }
 
index 18f1802e58fbd7733bf7eeeb87ca6ef9a1512e92..2d0246fa13bff45efd0e9f53e000fabd3c6df3e7 100644 (file)
@@ -22,6 +22,7 @@
 #include "gdbtypes.h"
 #include "infcall.h"
 #include "ppc-tdep.h"
+#include "target-float.h"
 #include "value.h"
 #include "xcoffread.h"
 
@@ -110,8 +111,7 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
 
          gdb_assert (len <= 8);
 
-         convert_typed_floating (value_contents (arg), type,
-                                 reg_val, reg_type);
+         target_float_convert (value_contents (arg), type, reg_val, reg_type);
          regcache_cooked_write (regcache, fp_regnum, reg_val);
          ++f_argno;
        }
@@ -314,11 +314,11 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
       if (readbuf)
        {
          regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
-         convert_typed_floating (regval, regtype, readbuf, valtype);
+         target_float_convert (regval, regtype, readbuf, valtype);
        }
       if (writebuf)
        {
-         convert_typed_floating (writebuf, valtype, regval, regtype);
+         target_float_convert (writebuf, valtype, regval, regtype);
          regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1, regval);
        }
 
index 1fdc658762ce6c6991c91ed15dd4991241bc94d7..e3e659ebba24636d2ea51caa7d9ed674804f3c1c 100644 (file)
@@ -29,7 +29,7 @@
 #include "arch-utils.h"
 #include "regcache.h"
 #include "regset.h"
-#include "doublest.h"
+#include "target-float.h"
 #include "value.h"
 #include "parser-defs.h"
 #include "osabi.h"
@@ -2622,8 +2622,8 @@ rs6000_register_to_value (struct frame_info *frame,
                                 from, optimizedp, unavailablep))
     return 0;
 
-  convert_typed_floating (from, builtin_type (gdbarch)->builtin_double,
-                         to, type);
+  target_float_convert (from, builtin_type (gdbarch)->builtin_double,
+                       to, type);
   *optimizedp = *unavailablep = 0;
   return 1;
 }
@@ -2639,8 +2639,8 @@ rs6000_value_to_register (struct frame_info *frame,
 
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
 
-  convert_typed_floating (from, type,
-                         to, builtin_type (gdbarch)->builtin_double);
+  target_float_convert (from, type,
+                       to, builtin_type (gdbarch)->builtin_double);
   put_frame_register (frame, regnum, to);
 }
 
index 62588258c31f5faffae156b555ff01f9b8aead95..23675bb6ccdae133ada317e5665898dd4926c88e 100644 (file)
@@ -34,7 +34,7 @@
 #include "inferior.h"
 #include "arch-utils.h"
 #include "regcache.h"
-#include "doublest.h"
+#include "target-float.h"
 #include "osabi.h"
 #include "reggroups.h"
 #include "regset.h"
@@ -1576,8 +1576,8 @@ sh_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum,
     }
 
   if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM)
-    convert_typed_floating (from, sh_littlebyte_bigword_type (gdbarch),
-                           to, type);
+    target_float_convert (from, sh_littlebyte_bigword_type (gdbarch),
+                         to, type);
   else
     error
       ("sh_register_convert_to_virtual called with non DR register number");
@@ -1595,8 +1595,8 @@ sh_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type,
     }
 
   if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM)
-    convert_typed_floating (from, type,
-                           to, sh_littlebyte_bigword_type (gdbarch));
+    target_float_convert (from, type,
+                         to, sh_littlebyte_bigword_type (gdbarch));
   else
     error (_("sh_register_convert_to_raw called with non DR register number"));
 }
index 6d27909bedaca974a0a9802a326bf07353de3a25..3004f15b036e4be566247fd33756f662fdcb7e17 100644 (file)
@@ -37,6 +37,7 @@
 #include "osabi.h"
 #include "target-float.h"
 #include "valprint.h"
+#include "target-float.h"
 
 #include "elf-bfd.h"
 
@@ -1259,8 +1260,8 @@ sh64_extract_return_value (struct type *type, struct regcache *regcache,
          gdb_byte buf[8];
          regcache_cooked_read (regcache, DR0_REGNUM, buf);
          
-         convert_typed_floating (buf, sh64_littlebyte_bigword_type (gdbarch),
-                                 valbuf, type);
+         target_float_convert (buf, sh64_littlebyte_bigword_type (gdbarch),
+                               valbuf, type);
        }
     }
   else
@@ -1469,8 +1470,8 @@ sh64_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum,
        && regnum <= DR_LAST_REGNUM)
       || (regnum >= DR0_C_REGNUM 
          && regnum <= DR_LAST_C_REGNUM))
-    convert_typed_floating (from, sh64_littlebyte_bigword_type (gdbarch),
-                           to, type);
+    target_float_convert (from, sh64_littlebyte_bigword_type (gdbarch),
+                         to, type);
   else
     error (_("sh64_register_convert_to_virtual "
             "called with non DR register number"));
@@ -1478,7 +1479,7 @@ sh64_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum,
 
 static void
 sh64_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type,
-                             int regnum, const void *from, void *to)
+                             int regnum, const gdb_byte *from, gdb_byte *to)
 {
   if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_LITTLE)
     {
@@ -1491,8 +1492,8 @@ sh64_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type,
        && regnum <= DR_LAST_REGNUM)
       || (regnum >= DR0_C_REGNUM 
          && regnum <= DR_LAST_C_REGNUM))
-    convert_typed_floating (from, type,
-                           to, sh64_littlebyte_bigword_type (gdbarch));
+    target_float_convert (from, type,
+                         to, sh64_littlebyte_bigword_type (gdbarch));
   else
     error (_("sh64_register_convert_to_raw called "
             "with non DR register number"));