aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-07-14 08:03:09 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-07-14 08:03:09 -0400
commitebb904cbbe15329df926b3c7da7c8098fe225fa3 (patch)
tree72a6e6dc9e780ac0652cf0ba42bc5850bb163c8d /gcc
parent7da7e611099b29c3586647a3e72cf863eb26e1a9 (diff)
downloadgcc-ebb904cbbe15329df926b3c7da7c8098fe225fa3.zip
gcc-ebb904cbbe15329df926b3c7da7c8098fe225fa3.tar.gz
gcc-ebb904cbbe15329df926b3c7da7c8098fe225fa3.tar.bz2
(current_function_stdarg): New global variable.
(push_function_context_to): Save it. (pop_function_context_from): Restore it. (assign_parms): Set it. (init_function_start): Clear it. From-SVN: r10123
Diffstat (limited to 'gcc')
-rw-r--r--gcc/function.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index ce2020e..a7279be 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -168,6 +168,11 @@ rtx current_function_arg_offset_rtx;
int current_function_varargs;
+/* Nonzero if current function uses stdarg.h or equivalent.
+ Zero for functions that use varargs.h. */
+
+int current_function_stdarg;
+
/* Quantities of various kinds of registers
used for the current function's args. */
@@ -487,6 +492,7 @@ push_function_context_to (context)
p->pretend_args_size = current_function_pretend_args_size;
p->arg_offset_rtx = current_function_arg_offset_rtx;
p->varargs = current_function_varargs;
+ p->stdarg = current_function_stdarg;
p->uses_const_pool = current_function_uses_const_pool;
p->uses_pic_offset_table = current_function_uses_pic_offset_table;
p->internal_arg_pointer = current_function_internal_arg_pointer;
@@ -563,6 +569,7 @@ pop_function_context_from (context)
current_function_pretend_args_size = p->pretend_args_size;
current_function_arg_offset_rtx = p->arg_offset_rtx;
current_function_varargs = p->varargs;
+ current_function_stdarg = p->stdarg;
current_function_uses_const_pool = p->uses_const_pool;
current_function_uses_pic_offset_table = p->uses_pic_offset_table;
current_function_internal_arg_pointer = p->internal_arg_pointer;
@@ -3169,6 +3176,8 @@ assign_parms (fndecl, second_time)
&& (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
!= void_type_node));
+ current_function_stdarg = stdarg;
+
/* If the reg that the virtual arg pointer will be translated into is
not a fixed reg or is the stack pointer, make a copy of the virtual
arg pointer, and address parms via the copy. The frame pointer is
@@ -4834,8 +4843,9 @@ init_function_start (subr, filename, line)
/* Indicate we have no need of a frame pointer yet. */
frame_pointer_needed = 0;
- /* By default assume not varargs. */
+ /* By default assume not varargs or stdarg. */
current_function_varargs = 0;
+ current_function_stdarg = 0;
}
/* Indicate that the current function uses extra args