aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2004-03-11 22:53:52 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2004-03-11 22:53:52 +0000
commit03ca1672e4d910a7829d8680860fe9aa0fbcfbaf (patch)
tree51f389498132bd61009c90235cb367c519aac5ba /gcc/calls.c
parentbbe708a3914c49b9124bd2b44a9d62d5640ffd27 (diff)
downloadgcc-03ca1672e4d910a7829d8680860fe9aa0fbcfbaf.zip
gcc-03ca1672e4d910a7829d8680860fe9aa0fbcfbaf.tar.gz
gcc-03ca1672e4d910a7829d8680860fe9aa0fbcfbaf.tar.bz2
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
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c9
1 files changed, 6 insertions, 3 deletions
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);
}