2013-01-23 Tiago Stürmer Daitx <tdaitx@linux.vnet.ibm.com>
authorSergio Durigan Junior <sergiodj@redhat.com>
Wed, 23 Jan 2013 20:03:18 +0000 (20:03 +0000)
committerSergio Durigan Junior <sergiodj@redhat.com>
Wed, 23 Jan 2013 20:03:18 +0000 (20:03 +0000)
* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Set correct
type on float conversion for complex type.

gdb/ChangeLog
gdb/ppc-sysv-tdep.c

index 3ea32186e59290ac1ac43eaed04fe1a4bd6fd154..b0f2b3f3e88e24e19013cd8997fd4264d6d39d3b 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-23  Tiago Stürmer Daitx  <tdaitx@linux.vnet.ibm.com>
+
+       * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Set correct
+       type on float conversion for complex type.
+
 2013-01-23  Siva Chandra Reddy  <sivachandra@google.com>
 
        Add a new class gdb.Architecture which exposes GDB's
index 48b47656984e2c32f5456def32fd466b825cf266..0ffeab9745c8c53dbbab4ef4fcd89eb15a2e6ea5 100644 (file)
@@ -1920,11 +1920,13 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
              gdb_byte regval[MAX_REGISTER_SIZE];
              struct type *regtype =
                register_type (gdbarch, tdep->ppc_fp0_regnum);
+             struct type *target_type;
+             target_type = check_typedef (TYPE_TARGET_TYPE (valtype));
              if (writebuf != NULL)
                {
                  convert_typed_floating ((const bfd_byte *) writebuf +
-                                         i * (TYPE_LENGTH (valtype) / 2),
-                                         valtype, regval, regtype);
+                                         i * TYPE_LENGTH (target_type), 
+                                         target_type, regval, regtype);
                  regcache_cooked_write (regcache,
                                          tdep->ppc_fp0_regnum + 1 + i,
                                         regval);
@@ -1936,8 +1938,8 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
                                         regval);
                  convert_typed_floating (regval, regtype,
                                          (bfd_byte *) readbuf +
-                                         i * (TYPE_LENGTH (valtype) / 2),
-                                         valtype);
+                                         i * TYPE_LENGTH (target_type),
+                                         target_type);
                }
            }
        }
This page took 0.027432 seconds and 4 git commands to generate.