aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2003-10-06 17:48:25 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2003-10-06 17:48:25 +0000
commitac1605d6d3a0a049524738c35aacfc1641b2c065 (patch)
tree9b271bc4f202d0133b93916213935d34aef71195 /gcc
parent6357135a0e6e8d95d05b370f15e6daff39d7dfee (diff)
downloadgcc-ac1605d6d3a0a049524738c35aacfc1641b2c065.zip
gcc-ac1605d6d3a0a049524738c35aacfc1641b2c065.tar.gz
gcc-ac1605d6d3a0a049524738c35aacfc1641b2c065.tar.bz2
mips.c (mips_arg_info): If MUST_PASS_IN_STACK, skip any remaining register arguments.
* config/mips/mips.c (mips_arg_info): If MUST_PASS_IN_STACK, skip any remaining register arguments. From-SVN: r72156
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/mips.c23
2 files changed, 20 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b39d79c..5e01a06 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-06 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/mips/mips.c (mips_arg_info): If MUST_PASS_IN_STACK,
+ skip any remaining register arguments.
+
2003-10-06 Ulrich Weigand <uweigand@de.ibm.com>
* reload.c (find_reloads_subreg_address): Use correct offset for
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 0d2f931..bcd9586 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3644,15 +3644,22 @@ mips_arg_info (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
even_reg_p = true;
}
- /* Set REG_OFFSET to the register count we're interested in.
- The EABI allocates the floating-point registers separately,
- but the other ABIs allocate them like integer registers. */
- info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p
- ? cum->num_fprs
- : cum->num_gprs);
+ if (mips_abi != ABI_EABI && MUST_PASS_IN_STACK (mode, type))
+ /* This argument must be passed on the stack. Eat up all the
+ remaining registers. */
+ info->reg_offset = MAX_ARGS_IN_REGISTERS;
+ else
+ {
+ /* Set REG_OFFSET to the register count we're interested in.
+ The EABI allocates the floating-point registers separately,
+ but the other ABIs allocate them like integer registers. */
+ info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p
+ ? cum->num_fprs
+ : cum->num_gprs);
- if (even_reg_p)
- info->reg_offset += info->reg_offset & 1;
+ if (even_reg_p)
+ info->reg_offset += info->reg_offset & 1;
+ }
/* The alignment applied to registers is also applied to stack arguments. */
info->stack_offset = cum->stack_words;