aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2007-09-21 15:54:58 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2007-09-21 15:54:58 +0000
commitab2e1992cfa13130abcafd4ca81cdb4a81b554cd (patch)
tree3f06bbc08afc4f3587a0c7bed72bb96e6b983e00 /gdb
parent377caf49a5881bb23084de3e9bcaa1812327119f (diff)
downloadfsf-binutils-gdb-ab2e1992cfa13130abcafd4ca81cdb4a81b554cd.zip
fsf-binutils-gdb-ab2e1992cfa13130abcafd4ca81cdb4a81b554cd.tar.gz
fsf-binutils-gdb-ab2e1992cfa13130abcafd4ca81cdb4a81b554cd.tar.bz2
* mips-tdep.c (mips_n32n64_push_dummy_call): Per N32/N64 ABI
rules do not treat composite types specially.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/mips-tdep.c17
2 files changed, 15 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 833ef75..c217f0c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-21 David Ung <davidu@mips.com>
+ Maciej W. Rozycki <macro@mips.com>
+
+ * mips-tdep.c (mips_n32n64_push_dummy_call): Per N32/N64 ABI
+ rules do not treat composite types specially.
+
2007-09-20 Maciej W. Rozycki <macro@mips.com>
* mips-tdep.c (mips32_in_function_epilogue_p): New function.
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 2384e12..332387a 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2937,12 +2937,14 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
/* Copy the argument to general registers or the stack in
register-sized pieces. Large arguments are split between
registers and stack. */
- /* Note: structs whose size is not a multiple of MIPS64_REGSIZE
- are treated specially: Irix cc passes them in registers
- where gcc sometimes puts them on the stack. For maximum
- compatibility, we will put them in both places. */
- int odd_sized_struct = (len > MIPS64_REGSIZE
- && len % MIPS64_REGSIZE != 0);
+ /* For N32/N64, structs, unions, or other composite types are
+ treated as a sequence of doublewords, and are passed in integer
+ or floating point registers as though they were simple scalar
+ parameters to the extent that they fit, with any excess on the
+ stack packed according to the normal memory layout of the
+ object.
+ The caller does not reserve space for the register arguments;
+ the callee is responsible for reserving it if required. */
/* Note: Floating-point values that didn't fit into an FP
register are only written to memory. */
while (len > 0)
@@ -2959,8 +2961,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
gdb_assert (argreg > MIPS_LAST_ARG_REGNUM);
/* Write this portion of the argument to the stack. */
- if (argreg > MIPS_LAST_ARG_REGNUM
- || odd_sized_struct)
+ if (argreg > MIPS_LAST_ARG_REGNUM)
{
/* Should shorter than int integer values be
promoted to int before being stored? */