summaryrefslogtreecommitdiff
path: root/gcc/config/alpha
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-16 02:16:47 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-16 02:16:47 +0000
commit7ccc713a1f28ef9a1206745ceba153374cdd6f7a (patch)
tree01f97dd69fbdd80f44d832c9dc5b8a6a0aa6c26d /gcc/config/alpha
parent44e8a86043be6633df299e293ea58fabd33fe37e (diff)
downloadgcc-7ccc713a1f28ef9a1206745ceba153374cdd6f7a.tar.gz
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed __builtin_va_start. * builtins.def (BUILT_IN_VARARGS_START): Delete. (BUILT_IN_VA_START): New. * builtins.c (expand_builtin_va_start): Eliminate first argument and code to implement pre-ISO varargs. (std_expand_builtin_va_start): Ignore first argument; it is always 1. (expand_builtin): Handle BUILT_IN_VA_START and BUILT_IN_STDARG_START identically. Delete BUILT_IN_VARARGS_START case. * function.c (assign_parms): Delete hide_last_arg and all its uses. (mark_varargs): Delete function. * function.h (struct function): Delete 'varargs' bit. (current_function_varargs): Delete macro. * tree.h: Don't declare mark_varargs. * c-decl.c (c_function_varargs, c_mark_varargs): Delete. (c_expand_body): Don't call mark_varargs. * c-objc-common.c: Handle BUILT_IN_VA_START and BUILT_IN_STDARG_START identically. Delete BUILT_IN_VARARGS_START case. * c-tree.h: Don't declare c_mark_varargs. * c-parse.in: Remove grammar rules for '&...' (which has been commented out since before 2.7.2) and for '...' in K+R argument declarations. * builtins.c, function.c, integrate.c, sibcall.c, config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h, config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c, config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c, config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.c: Delete all references to current_function_varargs, and code predicated on that flag. * config/alpha/alpha.c (alpha_va_start), config/arc/arc.c (arc_va_start), config/i386/i386.c (ix86_va_start), config/mips/mips.c (mips_va_start), config/mn10300/mn10300.c (mn10300_va_start), config/rs6000/rs6000.c (rs6000_va_start), config/s390/s390.c (s390_va_start), config/sh/sh.c (sh_va_start), Ignore first argument; it is always 1. * config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. * config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: Delete m68hc11_va_start. * config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h: No need to define EXPAND_BUILTIN_VA_START. * doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Remove references to GCC-provided <varargs.h>. testsuite: * c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c, c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c, c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c, c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c: Convert to use <stdarg.h>. * c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x: Delete. * gcc.dg/va-arg-2.c: New. * lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55472 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r--gcc/config/alpha/alpha.c8
-rw-r--r--gcc/config/alpha/unicosmk.h34
2 files changed, 6 insertions, 36 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 9e240058e24..0b6aee09ec6 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -6163,7 +6163,7 @@ alpha_build_va_list ()
void
alpha_va_start (stdarg_p, valist, nextarg)
- int stdarg_p;
+ int stdarg_p ATTRIBUTE_UNUSED;
tree valist;
rtx nextarg ATTRIBUTE_UNUSED;
{
@@ -6174,7 +6174,7 @@ alpha_va_start (stdarg_p, valist, nextarg)
return;
if (TARGET_ABI_UNICOSMK)
- std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+ std_expand_builtin_va_start (1, valist, nextarg);
/* For Unix, SETUP_INCOMING_VARARGS moves the starting address base
up by 48, storing fp arg registers in the first 48 bytes, and the
@@ -6185,7 +6185,7 @@ alpha_va_start (stdarg_p, valist, nextarg)
in order to account for the integer arg registers which are counted
in argsize above, but which are not actually stored on the stack. */
- if (NUM_ARGS <= 5 + stdarg_p)
+ if (NUM_ARGS <= 6)
offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD;
else
offset = -6 * UNITS_PER_WORD;
@@ -6732,7 +6732,7 @@ alpha_sa_size ()
alpha_procedure_type
= (sa_size || get_frame_size() != 0
- || current_function_outgoing_args_size || current_function_varargs
+ || current_function_outgoing_args_size
|| current_function_stdarg || current_function_calls_alloca
|| frame_pointer_needed)
? PT_STACK : PT_REGISTER;
diff --git a/gcc/config/alpha/unicosmk.h b/gcc/config/alpha/unicosmk.h
index cd9308c027e..457cfbad737 100644
--- a/gcc/config/alpha/unicosmk.h
+++ b/gcc/config/alpha/unicosmk.h
@@ -237,10 +237,7 @@ do { \
On Unicos/Mk, the standard subroutine __T3E_MISMATCH stores all register
arguments on the stack. Unfortunately, it doesn't always store the first
one (i.e. the one that arrives in $16 or $f16). This is not a problem
- with stdargs as we always have at least one named argument there. This is
- not always the case when varargs.h is used, however. In such cases, we
- have to store the first argument ourselves. We use the information from
- the CIW to determine whether the first argument arrives in $16 or $f16. */
+ with stdargs as we always have at least one named argument there. */
#undef SETUP_INCOMING_VARARGS
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
@@ -248,36 +245,9 @@ do { \
{ \
if (! (NO_RTL)) \
{ \
- int start; \
- \
- start = (CUM).num_reg_words; \
- if (!current_function_varargs || start == 0) \
- ++start; \
+ int start = (CUM).num_reg_words + 1; \
\
emit_insn (gen_umk_mismatch_args (GEN_INT (start))); \
- if (current_function_varargs && (CUM).num_reg_words == 0) \
- { \
- rtx tmp; \
- rtx int_label, end_label; \
- \
- tmp = gen_reg_rtx (DImode); \
- emit_move_insn (tmp, \
- gen_rtx_ZERO_EXTRACT (DImode, \
- gen_rtx_REG (DImode, 2),\
- (GEN_INT (1)), \
- (GEN_INT (7)))); \
- int_label = gen_label_rtx (); \
- end_label = gen_label_rtx (); \
- emit_insn (gen_cmpdi (tmp, GEN_INT (0))); \
- emit_jump_insn (gen_beq (int_label)); \
- emit_move_insn (gen_rtx_MEM (DFmode, virtual_incoming_args_rtx),\
- gen_rtx_REG (DFmode, 48)); \
- emit_jump (end_label); \
- emit_label (int_label); \
- emit_move_insn (gen_rtx_MEM (DImode, virtual_incoming_args_rtx),\
- gen_rtx_REG (DImode, 16)); \
- emit_label (end_label); \
- } \
emit_insn (gen_arg_home_umk ()); \
} \
\