diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2002-02-11 13:33:07 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2002-02-11 13:33:07 +0000 |
commit | 841404cd713cb3a78eeebb451039386581a3eb01 (patch) | |
tree | 8858ae8d39700a7e63624e9982e72976877af648 /gcc | |
parent | 1d1ade42a54c38522533a9ddc8347d8dfb41a5c7 (diff) | |
download | gcc-841404cd713cb3a78eeebb451039386581a3eb01.zip gcc-841404cd713cb3a78eeebb451039386581a3eb01.tar.gz gcc-841404cd713cb3a78eeebb451039386581a3eb01.tar.bz2 |
calls.c (store_one_arg): In the non-BLKmode non-partial case...
* calls.c (store_one_arg): In the non-BLKmode non-partial case,
take padding into account when computing the argument value.
From-SVN: r49675
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/calls.c | 23 |
2 files changed, 18 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d669773..748d7a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2002-02-11 Alexandre Oliva <aoliva@redhat.com> + * calls.c (store_one_arg): In the non-BLKmode non-partial case, + take padding into account when computing the argument value. + * config/sh/sh.h (FUNCTION_ARG_REGNO_P): Fix parenthesizing error. * combine.c (try_combine): Apply substitutions in diff --git a/gcc/calls.c b/gcc/calls.c index 9d014f9..7e2bc4b 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -4465,6 +4465,11 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) partial, reg, used - size, argblock, ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space, ARGS_SIZE_RTX (arg->alignment_pad)); + + /* Unless this is a partially-in-register argument, the argument is now + in the stack. */ + if (partial == 0) + arg->value = arg->stack; } else { @@ -4564,16 +4569,18 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) argblock, ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space, ARGS_SIZE_RTX (arg->alignment_pad)); - } - /* Unless this is a partially-in-register argument, the argument is now - in the stack. + /* Unless this is a partially-in-register argument, the argument is now + in the stack. - ??? Note that this can change arg->value from arg->stack to - arg->stack_slot and it matters when they are not the same. - It isn't totally clear that this is correct in all cases. */ - if (partial == 0) - arg->value = arg->stack_slot; + ??? Unlike the case above, in which we want the actual + address of the data, so that we can load it directly into a + register, here we want the address of the stack slot, so that + it's properly aligned for word-by-word copying or something + like that. It's not clear that this is always correct. */ + if (partial == 0) + arg->value = arg->stack_slot; + } /* Once we have pushed something, pops can't safely be deferred during the rest of the arguments. */ |