]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
2006-02-22 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Wed, 22 Feb 2006 19:59:31 +0000 (19:59 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 22 Feb 2006 19:59:31 +0000 (19:59 +0000)
* ppc64_retval.c (SVR4_STRUCT_RETURN): New macro.
(ppc64_return_value_location): Use registers for aggregate conditional
on that.
* ppc_retval.c (SVR4_STRUCT_RETURN): New macro.
(ppc_return_value_location): Use registers for aggregate conditional
on that.

backends/ChangeLog
backends/ppc64_retval.c
backends/ppc_retval.c

index 84515e51d97b3a1ca9d10586f101cd22447d2a84..33d52a2f8f2f380b2b964dc4a9fad8e1e8d52f1e 100644 (file)
@@ -1,3 +1,12 @@
+2006-02-22  Roland McGrath  <roland@redhat.com>
+
+       * ppc64_retval.c (SVR4_STRUCT_RETURN): New macro.
+       (ppc64_return_value_location): Use registers for aggregate conditional
+       on that.
+       * ppc_retval.c (SVR4_STRUCT_RETURN): New macro.
+       (ppc_return_value_location): Use registers for aggregate conditional
+       on that.
+
 2006-01-12  Roland McGrath  <roland@redhat.com>
 
        * s390_retval.c: New file.
index 81852915754d440af530b2c8701697844ecaa718..797b22a2563c594d3da97ad22a0d91cb32adac56 100644 (file)
@@ -1,5 +1,5 @@
 /* Function return value location for Linux/PPC64 ABI.
-   Copyright (C) 2005 Red Hat, Inc.
+   Copyright (C) 2005, 2006 Red Hat, Inc.
 
    This program is Open Source software; you can redistribute it and/or
    modify it under the terms of the Open Software License version 1.0 as
 #include "libebl_CPU.h"
 
 
+/* This is the SVR4 ELF ABI convention, but AIX and Linux do not use it.  */
+#define SVR4_STRUCT_RETURN 0
+
+
 /* r3.  */
 static const Dwarf_Op loc_intreg[] =
   {
@@ -121,7 +125,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
                return nloc_fp4regs;
            }
        }
-      if (size <= 8)
+      if (size <= 8 && SVR4_STRUCT_RETURN)
        {
        intreg:
          *locp = loc_intreg;
index 369c5997a734cebcebef142358e400481a3313ee..99458eb523049869540da8869c5e050eb3f0956c 100644 (file)
@@ -1,5 +1,5 @@
 /* Function return value location for Linux/PPC ABI.
-   Copyright (C) 2005 Red Hat, Inc.
+   Copyright (C) 2005, 2006 Red Hat, Inc.
 
    This program is Open Source software; you can redistribute it and/or
    modify it under the terms of the Open Software License version 1.0 as
 #include "libebl_CPU.h"
 
 
+/* This is the SVR4 ELF ABI convention, but AIX and Linux do not use it.  */
+#define SVR4_STRUCT_RETURN 0
+
+
 /* r3, or pair r3, r4.  */
 static const Dwarf_Op loc_intreg[] =
   {
@@ -47,6 +51,7 @@ static const Dwarf_Op loc_aggregate[] =
   };
 #define nloc_aggregate 1
 
+
 int
 ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
 {
@@ -127,7 +132,8 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
     case DW_TAG_class_type:
     case DW_TAG_union_type:
     case DW_TAG_array_type:
-      if (dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
+      if (SVR4_STRUCT_RETURN
+         && dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
                                       &attr_mem), &size) == 0
          && size > 0 && size <= 8)
        goto intreg;