diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-10-03 21:11:39 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-10-03 21:11:39 +0000 |
commit | afd48b755b8aa259b9a7e287cc88642351a887c1 (patch) | |
tree | 6b79b0ffab5a26030774902e97be0431dfc763f2 /gdb/rs6000-tdep.c | |
parent | 268e2188466a6af7c98a68358c90141a54d1481d (diff) | |
download | gdb-afd48b755b8aa259b9a7e287cc88642351a887c1.zip gdb-afd48b755b8aa259b9a7e287cc88642351a887c1.tar.gz gdb-afd48b755b8aa259b9a7e287cc88642351a887c1.tar.bz2 |
2003-10-03 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): When the 64 bit SysV ABI,
set extract_return_value, store_return_value and
use_struct_convention to ppc64_sysv_abi_extract_return_value,
ppc64_sysv_abi_store_return_value and
ppc64_sysv_abi_use_struct_convention.
* ppc-tdep.h (ppc64_sysv_abi_extract_return_value): Declare.
(ppc64_sysv_abi_store_return_value): Declare.
(ppc64_sysv_abi_use_struct_convention): Declare.
* ppc-sysv-tdep.c (enum return_value_convention): Define.
(ppc64_sysv_abi_extract_return_value): New function.
(ppc64_sysv_abi_store_return_value): New function.
(ppc64_sysv_abi_use_struct_convention): New function.
(ppc64_sysv_abi_return_value): New function.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index deb5555..fe51340 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2830,9 +2830,16 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, 64); set_gdbarch_sp_regnum (gdbarch, 1); set_gdbarch_deprecated_fp_regnum (gdbarch, 1); - set_gdbarch_deprecated_extract_return_value (gdbarch, - rs6000_extract_return_value); - set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value); + if (sysv_abi && wordsize == 8) + { + set_gdbarch_extract_return_value (gdbarch, ppc64_sysv_abi_extract_return_value); + set_gdbarch_store_return_value (gdbarch, ppc64_sysv_abi_store_return_value); + } + else + { + set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value); + set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value); + } if (v->arch == bfd_arch_powerpc) switch (v->mach) @@ -2967,9 +2974,11 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Not sure on this. FIXMEmgo */ set_gdbarch_frame_args_skip (gdbarch, 8); - if (sysv_abi) + if (sysv_abi && wordsize == 4) set_gdbarch_use_struct_convention (gdbarch, ppc_sysv_abi_use_struct_convention); + else if (sysv_abi && wordsize == 8) + set_gdbarch_use_struct_convention (gdbarch, ppc64_sysv_abi_use_struct_convention); else set_gdbarch_use_struct_convention (gdbarch, rs6000_use_struct_convention); |