diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-08-08 00:26:51 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-08-08 00:26:51 +0000 |
commit | cb811fe799b18a559b53b719e40dd65504db57c0 (patch) | |
tree | 150add12e78e7f3dd309a30ee3d089c75252e86c /gdb/mips-tdep.c | |
parent | 7330fb86f25844235e4a5c8107b7fdc6be95e0dd (diff) | |
download | gdb-cb811fe799b18a559b53b719e40dd65504db57c0.zip gdb-cb811fe799b18a559b53b719e40dd65504db57c0.tar.gz gdb-cb811fe799b18a559b53b719e40dd65504db57c0.tar.bz2 |
2002-08-06 Michael Snyder <msnyder@redhat.com>
* config/mips/tm-mips.h: Remove #define USE_STRUCT_CONVENTION.
* mips-tdep.c (mips_EABI_use_struct_convention,
mips_OABI_use_struct_convention, mips_NABI_use_struct_convention):
New functions. (mips_use_struct_convention): Delete.
(mips_gdbarch_init): set use_gdbarch_convention.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index fc1bb14..650998b 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -564,13 +564,23 @@ show_mask_address (char *cmd, int from_tty, struct cmd_list_element *c) } /* Should call_function allocate stack space for a struct return? */ + int -mips_use_struct_convention (int gcc_p, struct type *type) +mips_eabi_use_struct_convention (int gcc_p, struct type *type) { - if (MIPS_EABI) - return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE); - else - return 1; /* Structures are returned by ref in extra arg0 */ + return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE); +} + +int +mips_n32n64_use_struct_convention (int gcc_p, struct type *type) +{ + return 1; /* Structures are returned by ref in extra arg0. */ +} + +int +mips_o32_use_struct_convention (int gcc_p, struct type *type) +{ + return 1; /* Structures are returned by ref in extra arg0. */ } /* Should call_function pass struct by reference? @@ -4519,6 +4529,8 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_long_long_bit (gdbarch, 64); set_gdbarch_reg_struct_has_addr (gdbarch, mips_o32_reg_struct_has_addr); + set_gdbarch_use_struct_convention (gdbarch, + mips_o32_use_struct_convention); break; case MIPS_ABI_O64: tdep->mips_default_saved_regsize = 8; @@ -4534,6 +4546,8 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_long_long_bit (gdbarch, 64); set_gdbarch_reg_struct_has_addr (gdbarch, mips_o32_reg_struct_has_addr); + set_gdbarch_use_struct_convention (gdbarch, + mips_o32_use_struct_convention); break; case MIPS_ABI_EABI32: tdep->mips_default_saved_regsize = 4; @@ -4549,6 +4563,8 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_long_long_bit (gdbarch, 64); set_gdbarch_reg_struct_has_addr (gdbarch, mips_eabi_reg_struct_has_addr); + set_gdbarch_use_struct_convention (gdbarch, + mips_eabi_use_struct_convention); break; case MIPS_ABI_EABI64: tdep->mips_default_saved_regsize = 8; @@ -4564,6 +4580,8 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_long_long_bit (gdbarch, 64); set_gdbarch_reg_struct_has_addr (gdbarch, mips_eabi_reg_struct_has_addr); + set_gdbarch_use_struct_convention (gdbarch, + mips_eabi_use_struct_convention); break; case MIPS_ABI_N32: tdep->mips_default_saved_regsize = 8; @@ -4588,6 +4606,9 @@ mips_gdbarch_init (struct gdbarch_info info, tm_print_insn_info.mach = info.bfd_arch_info->mach; else tm_print_insn_info.mach = bfd_mach_mips8000; + + set_gdbarch_use_struct_convention (gdbarch, + mips_n32n64_use_struct_convention); set_gdbarch_reg_struct_has_addr (gdbarch, mips_n32n64_reg_struct_has_addr); break; @@ -4614,6 +4635,9 @@ mips_gdbarch_init (struct gdbarch_info info, tm_print_insn_info.mach = info.bfd_arch_info->mach; else tm_print_insn_info.mach = bfd_mach_mips8000; + + set_gdbarch_use_struct_convention (gdbarch, + mips_n32n64_use_struct_convention); set_gdbarch_reg_struct_has_addr (gdbarch, mips_n32n64_reg_struct_has_addr); break; |