aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-07-10 15:09:23 +0000
committerAndrew Cagney <cagney@redhat.com>2000-07-10 15:09:23 +0000
commitcce41527ca1386c9658507424cee111869170997 (patch)
tree245ba96039ff8bf7b6101b5c1c1a55e5eeb25442 /gdb
parent12c616f16e85d318aa0cb1842abcb557e4cf2d40 (diff)
downloadgdb-cce41527ca1386c9658507424cee111869170997.zip
gdb-cce41527ca1386c9658507424cee111869170997.tar.gz
gdb-cce41527ca1386c9658507424cee111869170997.tar.bz2
* mips-tdep.c (mips_push_arguments): Always align struct_addr on a
16 byte boundary. Align allocated argument space using MIPS_STACK_ARGSIZE. Reserve space on stack for the struct return and floating-point registers. Use fp_register_arg_p to determine if float_argreg should be aligned.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/mips-tdep.c11
2 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 72584e0..06d4b1b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+Mon Jul 10 18:06:18 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips-tdep.c (mips_push_arguments): Always align struct_addr on a
+ 16 byte boundary. Align allocated argument space using
+ MIPS_STACK_ARGSIZE. Reserve space on stack for the struct return
+ and floating-point registers. Use fp_register_arg_p to determine
+ if float_argreg should be aligned.
+
2000-07-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* config/sh/tm-sh.h (STORE_RETURN_VALUE): Redefine as
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 41bf280..67a320a 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2104,13 +2104,13 @@ mips_push_arguments (nargs, args, sp, struct_return, struct_addr)
On at least one MIPS variant, stack frames need to be 128-bit
aligned, so we round to this widest known alignment. */
sp = ROUND_DOWN (sp, 16);
- struct_addr = ROUND_DOWN (struct_addr, MIPS_SAVED_REGSIZE);
+ struct_addr = ROUND_DOWN (struct_addr, 16);
/* Now make space on the stack for the args. We allocate more
than necessary for EABI, because the first few arguments are
passed in registers, but that's OK. */
for (argnum = 0; argnum < nargs; argnum++)
- len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), MIPS_SAVED_REGSIZE);
+ len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), MIPS_STACK_ARGSIZE);
sp -= ROUND_UP (len, 16);
if (mips_debug)
@@ -2126,9 +2126,11 @@ mips_push_arguments (nargs, args, sp, struct_return, struct_addr)
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_push_arguments: struct_return at r%d 0x%lx\n",
+ "mips_push_arguments: struct_return reg=%d 0x%lx\n",
argreg, (long) struct_addr);
write_register (argreg++, struct_addr);
+ if (MIPS_REGS_HAVE_HOME_P)
+ stack_offset += MIPS_STACK_ARGSIZE;
}
/* Now load as many as possible of the first arguments into
@@ -2243,6 +2245,9 @@ mips_push_arguments (nargs, args, sp, struct_return, struct_addr)
argreg += FP_REGISTER_DOUBLE ? 1 : 2;
}
}
+ /* Reserve space for the FP register. */
+ if (MIPS_REGS_HAVE_HOME_P)
+ stack_offset += ROUND_UP (len, MIPS_STACK_ARGSIZE);
}
else
{