summaryrefslogtreecommitdiff
path: root/gnu/egcs
diff options
context:
space:
mode:
authorHugh Graham <hugh@cvs.openbsd.org>2002-01-20 23:20:14 +0000
committerHugh Graham <hugh@cvs.openbsd.org>2002-01-20 23:20:14 +0000
commit80657539bceb3ff282139af1ed38495274a3f3a4 (patch)
tree33b4849ccb3a7e1b14e8a966ded5f8f68b67984c /gnu/egcs
parentf7035266fd80f3ded6bbdbf0e15f5eed32507540 (diff)
Commit change from gcc mainline that's been kicking around in my tree
for too long. Needed for vax and tested by various.
Diffstat (limited to 'gnu/egcs')
-rw-r--r--gnu/egcs/gcc/calls.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/egcs/gcc/calls.c b/gnu/egcs/gcc/calls.c
index d0153a3d124..d6aa4d7968c 100644
--- a/gnu/egcs/gcc/calls.c
+++ b/gnu/egcs/gcc/calls.c
@@ -1,5 +1,6 @@
/* Convert function calls to rtl insns, for GNU C compiler.
- Copyright (C) 1989, 92-97, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -405,7 +406,16 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size,
#ifndef ACCUMULATE_OUTGOING_ARGS
#if defined (HAVE_call_pop) && defined (HAVE_call_value_pop)
- if (HAVE_call_pop && HAVE_call_value_pop && n_popped > 0)
+/* If the target has "call" or "call_value" insns, then prefer them
+ if no arguments are actually popped. If the target does not have
+ "call" or "call_value" insns, then we must use the popping versions
+ even if the call has no arguments to pop. */
+#if defined (HAVE_call) && defined (HAVE_call_value)
+ if (HAVE_call && HAVE_call_value && HAVE_call_pop && HAVE_call_value_pop
+ && n_popped > 0)
+#else
+ if (HAVE_call_pop && HAVE_call_value_pop)
+#endif
{
rtx n_pop = GEN_INT (n_popped);
rtx pat;