diff options
| author | Roland McGrath <[email protected]> | 2006-02-22 19:59:31 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2006-02-22 19:59:31 +0000 |
| commit | 123ccad620d8e02bd925996b1843f1bf0e28fdb6 (patch) | |
| tree | 76eb2593e3a4432ca884ba9029b4eced2ab5da63 /backends | |
| parent | c40f58a64aec04758e9c50eda1b556789f74bdb9 (diff) | |
2006-02-22 Roland McGrath <[email protected]>
* 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.
Diffstat (limited to 'backends')
| -rw-r--r-- | backends/ChangeLog | 9 | ||||
| -rw-r--r-- | backends/ppc64_retval.c | 8 | ||||
| -rw-r--r-- | backends/ppc_retval.c | 10 |
3 files changed, 23 insertions, 4 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index 84515e51..33d52a2f 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,12 @@ +2006-02-22 Roland McGrath <[email protected]> + + * 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 <[email protected]> * s390_retval.c: New file. diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c index 81852915..797b22a2 100644 --- a/backends/ppc64_retval.c +++ b/backends/ppc64_retval.c @@ -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 @@ -22,6 +22,10 @@ #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; diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c index 369c5997..99458eb5 100644 --- a/backends/ppc_retval.c +++ b/backends/ppc_retval.c @@ -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 @@ -22,6 +22,10 @@ #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; |
