From f4ef129aeac1f20073bc3023deb6de774f5f23df Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 28 Jul 1993 10:16:54 -0700 Subject: (function_arg): Shift all structures less than 4 bytes, not just those which are QImode or HImode. From-SVN: r5017 --- gcc/config/mips/mips.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') 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); } -- cgit v1.1