]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix bootstrap/8146 and gcc.c-torture/execute/20020307-2.c with -march=i686.
authorH.J. Lu <hjl@gnu.org>
Thu, 7 Nov 2002 17:46:18 +0000 (17:46 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 7 Nov 2002 17:46:18 +0000 (09:46 -0800)
2002-11-07  H.J. Lu <hjl@gnu.org>

Fix bootstrap/8146 and
gcc.c-torture/execute/20020307-2.c with -march=i686.

* calls.c (PUSH_ARGS_REVERSED): Define only if not defined.
* expr.c (PUSH_ARGS_REVERSED): Likewise.

* config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1.

From-SVN: r58898

gcc/ChangeLog
gcc/calls.c
gcc/config/i386/i386.h
gcc/expr.c

index d32a4c004b61d77ceb1e2471f6115f8529b37c95..447403410998999d0f697980b5379f69c8aeb729 100644 (file)
@@ -1,3 +1,13 @@
+2002-11-07  H.J. Lu <hjl@gnu.org>
+
+       Fix bootstrap/8146 and
+       gcc.c-torture/execute/20020307-2.c with -march=i686.
+
+       * calls.c (PUSH_ARGS_REVERSED): Define only if not defined.
+       * expr.c (PUSH_ARGS_REVERSED): Likewise.
+
+       * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1.
+
 2002-11-04  Aldy Hernandez  <aldyh@redhat.com>
 
        Fix c/8252.
index 9a9dc24a353075a1c7ca3f8663042f18534beb62..df39596ed10008cd908898d13566df469cf398e8 100644 (file)
@@ -46,9 +46,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #ifdef PUSH_ROUNDING
 
+#ifndef PUSH_ARGS_REVERSED
 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
 #define PUSH_ARGS_REVERSED  PUSH_ARGS
 #endif
+#endif
 
 #endif
 
index b32b09041c7000914a4de2f10180909cd2c9a9fc..db6970e1fbaecc7fae8f9e32872ccfc494460499 100644 (file)
@@ -1588,6 +1588,10 @@ enum reg_class
 
 #define PUSH_ARGS (TARGET_PUSH_ARGS && !ACCUMULATE_OUTGOING_ARGS)
 
+/* We want the stack and args grow in opposite directions, even if
+   PUSH_ARGS is 0.  */
+#define PUSH_ARGS_REVERSED 1
+
 /* Offset of first parameter from the argument pointer register value.  */
 #define FIRST_PARM_OFFSET(FNDECL) 0
 
index 25d1fad1a3f1ac8aa556d5a5c14e2aa4be477d9a..94a28e9922be8a980fb824847986a2c40d44efac 100644 (file)
@@ -54,9 +54,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #ifdef PUSH_ROUNDING
 
+#ifndef PUSH_ARGS_REVERSED
 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
 #define PUSH_ARGS_REVERSED     /* If it's last to first.  */
 #endif
+#endif
 
 #endif