Define YYOBJ in terms of YYFILES
[deliverable/binutils-gdb.git] / gdb / ppc-sysv-tdep.c
index c1778f2ef06dfee18f0631e32477a201e8d67dbf..b43f22da171b14dd88f945e9c4bb9e4f1484ecb7 100644 (file)
@@ -28,6 +28,7 @@
 #include "objfiles.h"
 #include "infcall.h"
 #include "dwarf2.h"
+#include "target-float.h"
 #include <algorithm>
 
 
@@ -134,10 +135,10 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                    {
                      /* Always store the floating point value using
                         the register's floating-point format.  */
-                     gdb_byte regval[MAX_REGISTER_SIZE];
+                     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);
@@ -278,7 +279,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                {
                  if (write_pass)
                    {
-                     gdb_byte regval[MAX_REGISTER_SIZE];
+                     gdb_byte regval[PPC_MAX_REGISTER_SIZE];
                      const gdb_byte *p;
 
                      /* 32-bit decimal floats are right aligned in the
@@ -364,11 +365,11 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                          if (write_pass)
                            {
                              int regnum = tdep->ppc_fp0_regnum + freg;
-                             gdb_byte regval[MAX_REGISTER_SIZE];
+                             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++;
@@ -411,7 +412,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                    }
                  else
                    {
-                     gdb_byte word[MAX_REGISTER_SIZE];
+                     gdb_byte word[PPC_MAX_REGISTER_SIZE];
                      store_unsigned_integer (word, tdep->wordsize, byte_order,
                                              unpack_long (eltype, elval));
 
@@ -516,8 +517,8 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
            {
              /* Reduce the parameter down to something that fits in a
                 "word".  */
-             gdb_byte word[MAX_REGISTER_SIZE];
-             memset (word, 0, MAX_REGISTER_SIZE);
+             gdb_byte word[PPC_MAX_REGISTER_SIZE];
+             memset (word, 0, PPC_MAX_REGISTER_SIZE);
              if (len > tdep->wordsize
                  || TYPE_CODE (type) == TYPE_CODE_STRUCT
                  || TYPE_CODE (type) == TYPE_CODE_UNION)
@@ -623,7 +624,7 @@ get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
     {
       if (writebuf != NULL)
        {
-         gdb_byte regval[MAX_REGISTER_SIZE];
+         gdb_byte regval[PPC_MAX_REGISTER_SIZE];
          const gdb_byte *p;
 
          /* 32-bit decimal float is right aligned in the doubleword.  */
@@ -706,19 +707,19 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
        {
          /* Floats and doubles stored in "f1".  Convert the value to
             the required type.  */
-         gdb_byte regval[MAX_REGISTER_SIZE];
+         gdb_byte regval[PPC_MAX_REGISTER_SIZE];
          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)
        {
          /* Floats and doubles stored in "f1".  Convert the value to
             the register's "double" type.  */
-         gdb_byte regval[MAX_REGISTER_SIZE];
+         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;
@@ -847,20 +848,20 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          if (TYPE_CODE (eltype) == TYPE_CODE_FLT)
            {
              int regnum = tdep->ppc_fp0_regnum + 1 + i;
-             gdb_byte regval[MAX_REGISTER_SIZE];
+             gdb_byte regval[PPC_MAX_REGISTER_SIZE];
              struct type *regtype = register_type (gdbarch, regnum);
 
              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
@@ -977,7 +978,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
       /* GCC screwed up for structures or unions whose size is less
         than or equal to 8 bytes..  Instead of left-aligning, it
         right-aligns the data into the buffer formed by r3, r4.  */
-      gdb_byte regvals[MAX_REGISTER_SIZE * 2];
+      gdb_byte regvals[PPC_MAX_REGISTER_SIZE * 2];
       int len = TYPE_LENGTH (type);
       int offset = (2 * tdep->wordsize - len) % tdep->wordsize;
 
@@ -1010,7 +1011,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          /* This matches SVr4 PPC, it does not match GCC.  */
          /* The value is right-padded to 8 bytes and then loaded, as
             two "words", into r3/r4.  */
-         gdb_byte regvals[MAX_REGISTER_SIZE * 2];
+         gdb_byte regvals[PPC_MAX_REGISTER_SIZE * 2];
          regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
                                regvals + 0 * tdep->wordsize);
          if (TYPE_LENGTH (type) > tdep->wordsize)
@@ -1023,7 +1024,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          /* This matches SVr4 PPC, it does not match GCC.  */
          /* The value is padded out to 8 bytes and then loaded, as
             two "words" into r3/r4.  */
-         gdb_byte regvals[MAX_REGISTER_SIZE * 2];
+         gdb_byte regvals[PPC_MAX_REGISTER_SIZE * 2];
          memset (regvals, 0, sizeof regvals);
          memcpy (regvals, writebuf, TYPE_LENGTH (type));
          regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3,
@@ -1340,7 +1341,7 @@ ppc64_sysv_abi_push_integer (struct gdbarch *gdbarch, ULONGEST val,
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  gdb_byte buf[MAX_REGISTER_SIZE];
+  gdb_byte buf[PPC_MAX_REGISTER_SIZE];
 
   if (argpos->regcache)
     store_unsigned_integer (buf, tdep->wordsize, byte_order, val);
@@ -1369,9 +1370,9 @@ ppc64_sysv_abi_push_freg (struct gdbarch *gdbarch,
        {
          int regnum = tdep->ppc_fp0_regnum + argpos->freg;
          struct type *regtype = register_type (gdbarch, regnum);
-         gdb_byte regval[MAX_REGISTER_SIZE];
+         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);
        }
 
@@ -1814,17 +1815,17 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
     {
       int regnum = tdep->ppc_fp0_regnum + 1 + index;
       struct type *regtype = register_type (gdbarch, regnum);
-      gdb_byte regval[MAX_REGISTER_SIZE];
+      gdb_byte regval[PPC_MAX_REGISTER_SIZE];
 
       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;
     }
@@ -2071,7 +2072,7 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
 
       for (i = 0; i < n_regs; i++)
        {
-         gdb_byte regval[MAX_REGISTER_SIZE];
+         gdb_byte regval[PPC_MAX_REGISTER_SIZE];
          int regnum = tdep->ppc_gp0_regnum + 3 + i;
          int offset = i * tdep->wordsize;
          int len = TYPE_LENGTH (valtype) - offset;
This page took 0.028264 seconds and 4 git commands to generate.