calls.c (expand_call): If the arg block is going to grow downward...
authorDJ Delorie <dj@redhat.com>
Thu, 22 May 2003 20:54:43 +0000 (16:54 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Thu, 22 May 2003 20:54:43 +0000 (16:54 -0400)
* 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

gcc/ChangeLog
gcc/calls.c

index d04de88607042192921bb5e34a78b39f483a3eb6..1a509ef5d882a3dc584a4ddbed1ff63ed2538b54 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-22  DJ Delorie  <dj@redhat.com>
+
+       * 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  <kenner@vlsi1.ultra.nyu.edu>
 
        * c-decl.c (duplicate_decls): Test DECL for ERROR_MARK.
index 5b4fbc9b94f1e410bd51c84c1008a325bfb3a2d0..a3f2de0c8807f33afe2ef9fc97297f52307e2b96 100644 (file)
@@ -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