From 2a8e54a453f975f632559722816fff3a8fdb3ccf Mon Sep 17 00:00:00 2001 From: hjl Date: Mon, 11 Nov 2002 03:13:18 +0000 Subject: [PATCH] 2002-11-10 H.J. Lu * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59002 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/calls.c | 2 ++ gcc/config/i386/i386.h | 4 ++++ gcc/expr.c | 2 ++ 4 files changed, 15 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 37e04c6..308e817 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-11-10 H.J. Lu + + * 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-10 Zack Weinberg * config/rs6000/sysv4.h: Define NO_IMPLICIT_EXTERN_C here... diff --git a/gcc/calls.c b/gcc/calls.c index abe3012..f2f9c57 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -48,9 +48,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 diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 325195a..8e33176 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1574,6 +1574,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 diff --git a/gcc/expr.c b/gcc/expr.c index e4d9777..a185311 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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 -- 2.7.4