aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-07-28 10:16:54 -0700
committerJim Wilson <wilson@gcc.gnu.org>1993-07-28 10:16:54 -0700
commitf4ef129aeac1f20073bc3023deb6de774f5f23df (patch)
tree2818bdc2249583e24555ac4bd1e6a0cb9219c043 /gcc
parentf31870c1b09afaccfaff82feec2c9f447e8c2b68 (diff)
downloadgcc-f4ef129aeac1f20073bc3023deb6de774f5f23df.zip
gcc-f4ef129aeac1f20073bc3023deb6de774f5f23df.tar.gz
gcc-f4ef129aeac1f20073bc3023deb6de774f5f23df.tar.bz2
(function_arg): Shift all structures less than 4 bytes,
not just those which are QImode or HImode. From-SVN: r5017
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/mips/mips.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index bd470d8..65ceff1 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -2628,9 +2628,10 @@ function_arg (cum, mode, type, named)
last real argument, pass back a parallel vector holding each
of the adjustments. */
- if (struct_p && (mode == QImode || mode == HImode))
+ if (struct_p && int_size_in_bytes (type) < 4)
{
- rtx amount = GEN_INT (BITS_PER_WORD - GET_MODE_BITSIZE (mode));
+ rtx amount = GEN_INT (BITS_PER_WORD
+ - int_size_in_bytes (type) * BITS_PER_UNIT);
rtx reg = gen_rtx (REG, SImode, regbase + cum->arg_words + bias);
cum->adjust[ cum->num_adjusts++ ] = gen_ashlsi3 (reg, reg, amount);
}