From 03ca1672e4d910a7829d8680860fe9aa0fbcfbaf Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 11 Mar 2004 22:53:52 +0000 Subject: re PR target/14262 (Structure size computed wrong) PR target/14262 * calls.c (load_register_parameters): If BLOCK_REG_PADDING is not defined, pass small BLKmode values in registers in the low-order part. * gcc.dg/20040305-2.c: New test. From-SVN: r79348 --- gcc/calls.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index 4bfcde4..29c06aa 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1675,10 +1675,14 @@ load_register_parameters (struct arg_data *args, int num_actuals, { rtx mem = validize_mem (args[i].value); -#ifdef BLOCK_REG_PADDING /* Handle a BLKmode that needs shifting. */ if (nregs == 1 && size < UNITS_PER_WORD - && args[i].locate.where_pad == downward) +#ifdef BLOCK_REG_PADDING + && args[i].locate.where_pad == downward +#else + && BYTES_BIG_ENDIAN +#endif + ) { rtx tem = operand_subword_force (mem, 0, args[i].mode); rtx ri = gen_rtx_REG (word_mode, REGNO (reg)); @@ -1693,7 +1697,6 @@ load_register_parameters (struct arg_data *args, int num_actuals, emit_move_insn (ri, x); } else -#endif move_block_to_reg (REGNO (reg), mem, nregs, args[i].mode); } -- cgit v1.1