diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-09-16 23:33:17 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-09-16 23:33:17 +0000 |
commit | b9ff3018cd573e009421f7aa357ebba6345adf42 (patch) | |
tree | 7835603ea6841d08231ff33a8a405ca6979ac588 /gdb/rs6000-tdep.c | |
parent | aa1ee363bce1eac43bf9824069e231d7113f7453 (diff) | |
download | gdb-b9ff3018cd573e009421f7aa357ebba6345adf42.zip gdb-b9ff3018cd573e009421f7aa357ebba6345adf42.tar.gz gdb-b9ff3018cd573e009421f7aa357ebba6345adf42.tar.bz2 |
2003-09-16 Andrew Cagney <cagney@redhat.com>
* ppc-linux-tdep.c (ppc_linux_init_abi): Set the 32 bit
"use_struct_convention" to "ppc_linux_use_struct_convention".
(ppc_linux_use_struct_convention): New function.
* rs6000-tdep.c (rs6000_use_struct_convention): New function.
(rs6000_gdbarch_init): For AIX, set "use_struct_convention" to
"rs6000_use_struct_convention".
* ppc-tdep.h (ppc_sysv_abi_broken_use_struct_convention): Delete
declaration.
* ppc-sysv-tdep.c (ppc_sysv_abi_broken_use_struct_convention):
Delete function.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index a631ffc..43fb799 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1372,6 +1372,18 @@ e500_extract_return_value (struct type *valtype, struct regcache *regbuf, void * } } +/* PowerOpen always puts structures in memory. Vectors, which were + added later, do get returned in a register though. */ + +static int +rs6000_use_struct_convention (int gcc_p, struct type *value_type) +{ + if ((TYPE_LENGTH (value_type) == 16 || TYPE_LENGTH (value_type) == 8) + && TYPE_VECTOR (value_type)) + return 0; + return 1; +} + static void rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf) { @@ -2957,7 +2969,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) ppc_sysv_abi_use_struct_convention); else set_gdbarch_use_struct_convention (gdbarch, - generic_use_struct_convention); + rs6000_use_struct_convention); set_gdbarch_frameless_function_invocation (gdbarch, rs6000_frameless_function_invocation); |