calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS

* calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS
	* function.c (assign_params): Likewise.
	* arm-protos.h (arm_init_cumulative_args): Update prototype.
	* arm.c (arm_init_cumulative_args): Update function.
	* arm.h (INIT_CUMULATIVE_ARGS): Update.
	* avr-protos.h (init_cumulative_args): Update prototype.
	* avr.c (init_cumulative_args): Update function.
	* avr.h (INIT_CUMULATIVE_ARGS): Update.
	* d30v-protos.h (d30v_init_cumulative_args): Update prototype.
	* d30v.c (d30v_init_cumulative_args): Update function.
	* d30v.h (INIT_CUMULATIVE_ARGS): Update.
	* frv-protos.h (frv_init_cumulative_args): Update prototype.
	* frv.c (frv_init_cumulative_args): Update function.
	* frv.h (INIT_CUMULATIVE_ARGS): Update.
	* mips.c (mips_expand_prolgue): Update call of INIT_CUMULATIVE_ARGS.
	* pa.h (INIT_CUMULATIVE_ARGS): Update.
	* sparc-protos.h (init_cumulative_args): Update prototype.
	* sparc.c (init_cumulative_args): Update function.
	* sparc.h (INIT_CUMULATIVE_ARGS): Update.
	* tm.texi (INIT_CUMULATIVE_ARGS): Update documentation.

From-SVN: r63126
This commit is contained in:
Jan Hubicka 2003-02-19 19:03:11 +01:00 committed by Jan Hubicka
parent be9d08c2ef
commit 563a317a85
22 changed files with 65 additions and 44 deletions

View File

@ -1,3 +1,26 @@
Wed Feb 19 19:00:24 CET 2003 Jan Hubicka <jh@suse.cz>
* calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS
* function.c (assign_params): Likewise.
* arm-protos.h (arm_init_cumulative_args): Update prototype.
* arm.c (arm_init_cumulative_args): Update function.
* arm.h (INIT_CUMULATIVE_ARGS): Update.
* avr-protos.h (init_cumulative_args): Update prototype.
* avr.c (init_cumulative_args): Update function.
* avr.h (INIT_CUMULATIVE_ARGS): Update.
* d30v-protos.h (d30v_init_cumulative_args): Update prototype.
* d30v.c (d30v_init_cumulative_args): Update function.
* d30v.h (INIT_CUMULATIVE_ARGS): Update.
* frv-protos.h (frv_init_cumulative_args): Update prototype.
* frv.c (frv_init_cumulative_args): Update function.
* frv.h (INIT_CUMULATIVE_ARGS): Update.
* mips.c (mips_expand_prolgue): Update call of INIT_CUMULATIVE_ARGS.
* pa.h (INIT_CUMULATIVE_ARGS): Update.
* sparc-protos.h (init_cumulative_args): Update prototype.
* sparc.c (init_cumulative_args): Update function.
* sparc.h (INIT_CUMULATIVE_ARGS): Update.
* tm.texi (INIT_CUMULATIVE_ARGS): Update documentation.
2003-02-19 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*iorsi3_two_qi_sext): New.

View File

@ -1674,7 +1674,7 @@ sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
sched-int.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H)
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(PARAMS_H) profile.h
sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
sched-int.h hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) \
$(TARGET_H) real.h

View File

@ -2418,7 +2418,7 @@ expand_call (exp, target, ignore)
calling convention than normal calls. The last argument in
INIT_CUMULATIVE_ARGS tells the backend if this is an indirect call
or not. */
INIT_CUMULATIVE_ARGS (args_so_far, funtype, NULL_RTX, (fndecl == 0));
INIT_CUMULATIVE_ARGS (args_so_far, funtype, NULL_RTX, fndecl);
/* Make a vector to hold all the information about each arg. */
args = (struct arg_data *) alloca (num_actuals * sizeof (struct arg_data));

View File

@ -149,7 +149,7 @@ extern int arm_is_longcall_p PARAMS ((rtx, int, int));
extern rtx arm_function_arg PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern void arm_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx,
int));
tree));
extern rtx arm_va_arg PARAMS ((tree, tree));
extern int arm_function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode,

View File

@ -1957,11 +1957,11 @@ arm_float_words_big_endian ()
for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is NULL. */
void
arm_init_cumulative_args (pcum, fntype, libname, indirect)
arm_init_cumulative_args (pcum, fntype, libname, fndecl)
CUMULATIVE_ARGS * pcum;
tree fntype;
rtx libname ATTRIBUTE_UNUSED;
int indirect ATTRIBUTE_UNUSED;
tree fndecl ATTRIBUTE_UNUSED;
{
/* On the ARM, the offset starts at 0. */
pcum->nregs = ((fntype && aggregate_value_p (TREE_TYPE (fntype))) ? 1 : 0);

View File

@ -1572,8 +1572,8 @@ typedef struct
for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0.
On the ARM, the offset starts at 0. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
arm_init_cumulative_args (&(CUM), (FNTYPE), (LIBNAME), (INDIRECT))
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL) \
arm_init_cumulative_args (&(CUM), (FNTYPE), (LIBNAME), (FNDECL))
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.

View File

@ -52,7 +52,7 @@ extern int avr_progmem_p PARAMS ((tree decl));
extern rtx avr_function_value PARAMS ((tree type, tree func));
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *cum,
tree fntype, rtx libname,
int indirect));
tree fndecl));
extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *cum,
enum machine_mode mode,
tree type, int named));

View File

@ -1488,11 +1488,11 @@ function_arg_regno_p(r)
of the argument list. */
void
init_cumulative_args (cum, fntype, libname, indirect)
init_cumulative_args (cum, fntype, libname, fndecl)
CUMULATIVE_ARGS *cum;
tree fntype;
rtx libname;
int indirect ATTRIBUTE_UNUSED;
tree fndecl;
{
cum->nregs = 18;
cum->regno = FIRST_CUM_REG;

View File

@ -1136,7 +1136,7 @@ typedef struct avr_args {
store anything in `CUMULATIVE_ARGS'; however, the data structure
must exist and should not be empty, so use `int'. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) init_cumulative_args (&(CUM), FNTYPE, LIBNAME, INDIRECT)
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL) init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
/* A C statement (sans semicolon) for initializing the variable CUM
for the state at the beginning of the argument list. The variable

View File

@ -75,7 +75,7 @@ extern int direct_return PARAMS ((void));
#ifdef TREE_CODE
#ifdef RTX_CODE
extern void d30v_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree,
rtx, int, int));
rtx, tree, int));
#endif
extern int d30v_function_arg_boundary PARAMS ((enum machine_mode, tree));
#ifdef RTX_CODE

View File

@ -1922,7 +1922,7 @@ d30v_init_cumulative_args (cum, fntype, libname, indirect, incoming)
CUMULATIVE_ARGS *cum;
tree fntype;
rtx libname;
int indirect;
tree fndecl;
int incoming;
{
*cum = GPR_ARG_FIRST;
@ -1930,7 +1930,7 @@ d30v_init_cumulative_args (cum, fntype, libname, indirect, incoming)
if (TARGET_DEBUG_ARG)
{
fprintf (stderr, "\ninit_cumulative_args:");
if (indirect)
if (!fndecl && fntype)
fputs (" indirect", stderr);
if (incoming)

View File

@ -1622,8 +1622,8 @@ typedef struct d30v_stack {
being processed. Thus, each time this macro is called, either LIBNAME or
FNTYPE is nonzero, but never both of them at once. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
d30v_init_cumulative_args (&CUM, FNTYPE, LIBNAME, INDIRECT, FALSE)
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL) \
d30v_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, FALSE)
/* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the
arguments for the function being compiled. If this macro is undefined,
@ -1634,7 +1634,7 @@ typedef struct d30v_stack {
LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
d30v_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, TRUE)
d30v_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE)
/* A C statement (sans semicolon) to update the summarizer variable CUM to
advance past an argument in the argument list. The values MODE, TYPE and

View File

@ -70,7 +70,7 @@ extern rtx frv_legitimize_address PARAMS ((rtx, rtx,
#ifdef TREE_CODE
extern void frv_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree,
rtx, int, int));
rtx, tree, int));
extern int frv_function_arg_boundary PARAMS ((enum machine_mode, tree));
extern rtx frv_function_arg PARAMS ((CUMULATIVE_ARGS *,

View File

@ -3081,11 +3081,11 @@ frv_print_operand (file, x, code)
FNTYPE is nonzero, but never both of them at once. */
void
frv_init_cumulative_args (cum, fntype, libname, indirect, incoming)
frv_init_cumulative_args (cum, fntype, libname, fndecl, incoming)
CUMULATIVE_ARGS *cum;
tree fntype;
rtx libname;
int indirect;
tree fndecl;
int incoming;
{
*cum = FIRST_ARG_REGNUM;
@ -3093,7 +3093,7 @@ frv_init_cumulative_args (cum, fntype, libname, indirect, incoming)
if (TARGET_DEBUG_ARG)
{
fprintf (stderr, "\ninit_cumulative_args:");
if (indirect)
if (!fndecl && fntype)
fputs (" indirect", stderr);
if (incoming)

View File

@ -1955,8 +1955,8 @@ struct machine_function GTY(())
being processed. Thus, each time this macro is called, either LIBNAME or
FNTYPE is nonzero, but never both of them at once. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, INDIRECT, FALSE)
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL) \
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, FALSE)
/* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the
arguments for the function being compiled. If this macro is undefined,
@ -1967,7 +1967,7 @@ struct machine_function GTY(())
LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, TRUE)
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE)
/* A C statement (sans semicolon) to update the summarizer variable CUM to
advance past an argument in the argument list. The values MODE, TYPE and

View File

@ -7748,7 +7748,7 @@ mips_expand_prologue ()
This is only needed if store_args_on_stack is true. */
INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, 0);
INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, current_function_decl);
regno = GP_ARG_FIRST;
for (cur_arg = fnargs; cur_arg != 0; cur_arg = next_arg)

View File

@ -769,9 +769,9 @@ struct hppa_args {int words, nargs_prototype, indirect; };
for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0. */
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL) \
(CUM).words = 0, \
(CUM).indirect = INDIRECT, \
(CUM).indirect = (FNTYPE) && !(FNDECL), \
(CUM).nargs_prototype = (FNTYPE && TYPE_ARG_TYPES (FNTYPE) \
? (list_length (TYPE_ARG_TYPES (FNTYPE)) - 1 \
+ (TYPE_MODE (TREE_TYPE (FNTYPE)) == BLKmode \

View File

@ -41,7 +41,7 @@ extern int function_arg_pass_by_reference PARAMS ((const CUMULATIVE_ARGS *,
tree, int));
extern struct rtx_def *sparc_builtin_saveregs PARAMS ((void));
#ifdef RTX_CODE
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int));
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, tree));
extern void sparc_va_start PARAMS ((tree, rtx));
#endif
extern struct rtx_def *sparc_va_arg PARAMS ((tree, tree));

View File

@ -4367,11 +4367,11 @@ output_sibcall (insn, call_operand)
For a library call, FNTYPE is 0. */
void
init_cumulative_args (cum, fntype, libname, indirect)
init_cumulative_args (cum, fntype, libname, fndecl)
CUMULATIVE_ARGS *cum;
tree fntype;
rtx libname ATTRIBUTE_UNUSED;
int indirect ATTRIBUTE_UNUSED;
tree fndecl ATTRIBUTE_UNUSED;
{
cum->words = 0;
cum->prototype_p = fntype && TYPE_ARG_TYPES (fntype);

View File

@ -1734,8 +1734,8 @@ struct sparc_args {
for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (INDIRECT));
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL) \
init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (FNDECL));
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.

View File

@ -3664,17 +3664,15 @@ arguments are passed on the stack, there is no need to store anything in
should not be empty, so use @code{int}.
@findex INIT_CUMULATIVE_ARGS
@item INIT_CUMULATIVE_ARGS (@var{cum}, @var{fntype}, @var{libname}, @var{indirect})
A C statement (sans semicolon) for initializing the variable @var{cum}
for the state at the beginning of the argument list. The variable has
type @code{CUMULATIVE_ARGS}. The value of @var{fntype} is the tree node
for the data type of the function which will receive the args, or 0
if the args are to a compiler support library function. The value of
@var{indirect} is nonzero when processing an indirect call, for example
a call through a function pointer. The value of @var{indirect} is zero
for a call to an explicitly named function, a library function call, or when
@code{INIT_CUMULATIVE_ARGS} is used to find arguments for the function
being compiled.
@item INIT_CUMULATIVE_ARGS (@var{cum}, @var{fntype}, @var{libname},
@var{fndecl}) A C statement (sans semicolon) for initializing the variable
@var{cum} for the state at the beginning of the argument list. The variable
has type @code{CUMULATIVE_ARGS}. The value of @var{fntype} is the tree node
for the data type of the function which will receive the args, or 0 if the args
are to a compiler support library function. For direct calls that are not
libcalls, @var{fndecl} contain the declaration node of the function.
@var{fndecl} is also set when code{INIT_CUMULATIVE_ARGS} is used to find
arguments for the function being compiled.
When processing a call to a compiler support library function,
@var{libname} identifies which one. It is a @code{symbol_ref} rtx which

View File

@ -4273,7 +4273,7 @@ assign_parms (fndecl)
#ifdef INIT_CUMULATIVE_INCOMING_ARGS
INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, NULL_RTX);
#else
INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, 0);
INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, fndecl);
#endif
/* We haven't yet found an argument that we must push and pretend the