From: DJ Delorie Date: Thu, 22 May 2003 20:54:43 +0000 (-0400) Subject: calls.c (expand_call): If the arg block is going to grow downward... X-Git-Tag: releases/gcc-3.4.0~6401 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d892f28886e30a63770448115656dc2026a8c92d;p=thirdparty%2Fgcc.git calls.c (expand_call): If the arg block is going to grow downward... * calls.c (expand_call): If the arg block is going to grow downward, we need argblock to point to the top of the block, not the bottom. From-SVN: r67099 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d04de8860704..1a509ef5d882 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-05-22 DJ Delorie + + * calls.c (expand_call): If the arg block is going to grow + downward, we need argblock to point to the top of the block, + not the bottom. + 2003-05-22 Richard Kenner * c-decl.c (duplicate_decls): Test DECL for ERROR_MARK. diff --git a/gcc/calls.c b/gcc/calls.c index 5b4fbc9b94f1..a3f2de0c8807 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2828,7 +2828,12 @@ expand_call (exp, target, ignore) if (needed == 0) argblock = virtual_outgoing_args_rtx; else - argblock = push_block (GEN_INT (needed), 0, 0); + { + argblock = push_block (GEN_INT (needed), 0, 0); +#ifdef ARGS_GROW_DOWNWARD + argblock = plus_constant (argblock, needed); +#endif + } /* We only really need to call `copy_to_reg' in the case where push insns are going to be used to pass ARGBLOCK