mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
2003-11-07 Andrew Cagney <cagney@redhat.com>
* ppc-linux-tdep.c (ppc_linux_init_abi): When 32-bit GNU/Linux, set "return_value" instead of "use_struct_convention". (ppc_linux_use_struct_convention): Delete function. (ppc_linux_return_value): New function. * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. (ppc_sysv_abi_broken_return_value): New function. (do_ppc_sysv_return_value): Add "gdbarch" parameter. (ppc64_sysv_abi_push_dummy_call): Add "gdbarch" parameter, drop static. (ppc_sysv_abi_extract_return_value): Delete function. (ppc_sysv_abi_broken_extract_return_value): Delete function. (ppc_sysv_abi_store_return_value): Delete function. (ppc_sysv_abi_broken_store_return_value): Delete function. (ppc_sysv_abi_use_struct_convention): Delete function. (ppc64_sysv_abi_use_struct_convention): Delete function. (ppc64_sysv_abi_extract_return_value): Delete function. (ppc64_sysv_abi_store_return_value): Delete function. * ppcnbsd-tdep.c (ppcnbsd_return_value): New function. (ppcnbsd_init_abi): Set "return_value", instead of "use_struct_convention", "extract_return_value", and "store_return_value". (ppcnbsd_use_struct_convention): Delete function. * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. (ppc_sysv_abi_return_value): Declare. (ppc_sysv_abi_broken_return_value): Declare. (ppc_sysv_abi_use_struct_convention): Delete. (ppc_sysv_abi_store_return_value): Delete. (ppc_sysv_abi_extract_return_value): Delete. (ppc_sysv_abi_broken_store_return_value): Delete. (ppc_sysv_abi_broken_extract_return_value): Delete. (ppc64_sysv_abi_use_struct_convention): Delete. (ppc64_sysv_abi_extract_return_value): Delete. (ppc64_sysv_abi_store_return_value): Delete. * rs6000-tdep.c (rs6000_gdbarch_init): For 32-bit and 64-bit SYSV, set "return_value" instead of "extract_return_value", "store_return_value", and "use_struct_convention".
This commit is contained in:
@@ -596,13 +596,17 @@ ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
|
||||
structures, no matter their size, are put in memory. Vectors,
|
||||
which were added later, do get returned in a register though. */
|
||||
|
||||
static int
|
||||
ppc_linux_use_struct_convention (int gcc_p, struct type *value_type)
|
||||
static enum return_value_convention
|
||||
ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
|
||||
struct regcache *regcache, const void *inval, void *outval)
|
||||
{
|
||||
if ((TYPE_LENGTH (value_type) == 16 || TYPE_LENGTH (value_type) == 8)
|
||||
&& TYPE_VECTOR (value_type))
|
||||
return 0;
|
||||
return 1;
|
||||
if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|
||||
|| TYPE_CODE (valtype) == TYPE_CODE_UNION)
|
||||
&& !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
|
||||
&& TYPE_VECTOR (valtype)))
|
||||
return RETURN_VALUE_STRUCT_CONVENTION;
|
||||
else
|
||||
return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, inval, outval);
|
||||
}
|
||||
|
||||
/* Fetch (and possibly build) an appropriate link_map_offsets
|
||||
@@ -1043,7 +1047,7 @@ ppc_linux_init_abi (struct gdbarch_info info,
|
||||
(well ignoring vectors that is). When this was corrected, it
|
||||
wasn't fixed for GNU/Linux native platform. Use the
|
||||
PowerOpen struct convention. */
|
||||
set_gdbarch_use_struct_convention (gdbarch, ppc_linux_use_struct_convention);
|
||||
set_gdbarch_return_value (gdbarch, ppc_linux_return_value);
|
||||
|
||||
/* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding
|
||||
*_push_arguments(). The same remarks hold for the methods below. */
|
||||
|
||||
Reference in New Issue
Block a user