This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Remove PRETEND_OUTGOING_VARARGS_NAMED.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Dec 2003 15:46:20 -0500 (EST)
- Subject: [patch] Remove PRETEND_OUTGOING_VARARGS_NAMED.
Hi,
Attached is a patch to remove PRETEND_OUTGOING_VARARGS_NAMED as every
port seems to have switched to TARGET_PRETEND_OUTGOING_VARARGS_NAMED.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2003-12-12 Kazu Hirata <kazu@cs.umass.edu>
* calls.c (expand_call): Update comments.
* system.h (PRETEND_OUTGOING_VARARGS_NAMED): Poison.
* targhooks.c: Do not refer to PRETEND_OUTGOING_VARARGS_NAMED.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.308
diff -u -r1.308 calls.c
--- calls.c 8 Dec 2003 10:33:46 -0000 1.308
+++ calls.c 12 Dec 2003 19:36:23 -0000
@@ -2413,15 +2413,16 @@
(If no anonymous args follow, the result of list_length is actually
one too large. This is harmless.)
- If PRETEND_OUTGOING_VARARGS_NAMED is set and STRICT_ARGUMENT_NAMING is
- zero, this machine will be able to place unnamed args that were
- passed in registers into the stack. So treat all args as named.
- This allows the insns emitting for a specific argument list to be
- independent of the function declaration.
+ If targetm.calls.pretend_outgoing_varargs_named() returns
+ nonzero, and STRICT_ARGUMENT_NAMING is zero, this machine will be
+ able to place unnamed args that were passed in registers into the
+ stack. So treat all args as named. This allows the insns
+ emitting for a specific argument list to be independent of the
+ function declaration.
- If PRETEND_OUTGOING_VARARGS_NAMED is not set, we do not have any
- reliable way to pass unnamed args in registers, so we must force
- them into memory. */
+ If targetm.calls.pretend_outgoing_varargs_named() returns zero,
+ we do not have any reliable way to pass unnamed args in
+ registers, so we must force them into memory. */
if ((targetm.calls.strict_argument_naming (&args_so_far)
|| ! targetm.calls.pretend_outgoing_varargs_named (&args_so_far))
Index: system.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/system.h,v
retrieving revision 1.173
diff -u -r1.173 system.h
--- system.h 8 Dec 2003 04:09:11 -0000 1.173
+++ system.h 12 Dec 2003 19:36:23 -0000
@@ -594,7 +594,8 @@
ASM_SIMPLIFY_DWARF_ADDR INIT_TARGET_OPTABS INIT_SUBTARGET_OPTABS \
INIT_GOFAST_OPTABS MULSI3_LIBCALL MULDI3_LIBCALL DIVSI3_LIBCALL \
DIVDI3_LIBCALL UDIVSI3_LIBCALL UDIVDI3_LIBCALL MODSI3_LIBCALL \
- MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL BUILD_VA_LIST_TYPE
+ MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL BUILD_VA_LIST_TYPE \
+ PRETEND_OUTGOING_VARARGS_NAMED
/* Other obsolete target macros, or macros that used to be in target
headers and were not used, and may be obsolete or may never have
Index: targhooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.c,v
retrieving revision 2.10
diff -u -r2.10 targhooks.c
--- targhooks.c 4 Dec 2003 09:11:17 -0000 2.10
+++ targhooks.c 12 Dec 2003 19:36:23 -0000
@@ -185,14 +185,10 @@
bool
default_pretend_outgoing_varargs_named(CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
{
-#ifdef PRETEND_OUTGOING_VARARGS_NAMED
- return PRETEND_OUTGOING_VARARGS_NAMED;
-#else
#ifdef SETUP_INCOMING_VARARGS
return 1;
#else
return (targetm.calls.setup_incoming_varargs != default_setup_incoming_varargs);
-#endif
#endif
}