+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.
$(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
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));
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,
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);
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.
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));
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;
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
#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
CUMULATIVE_ARGS *cum;
tree fntype;
rtx libname;
- int indirect;
+ tree fndecl;
int incoming;
{
*cum = GPR_ARG_FIRST;
if (TARGET_DEBUG_ARG)
{
fprintf (stderr, "\ninit_cumulative_args:");
- if (indirect)
+ if (!fndecl && fntype)
fputs (" indirect", stderr);
if (incoming)
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,
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
#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 *,
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;
if (TARGET_DEBUG_ARG)
{
fprintf (stderr, "\ninit_cumulative_args:");
- if (indirect)
+ if (!fndecl && fntype)
fputs (" indirect", stderr);
if (incoming)
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,
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
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)
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 \
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));
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);
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.
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
#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