This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unit at a time 2/3 - backward inlining, local functions


> On Sun, Feb 16, 2003 at 04:25:49PM +0100, Jan Hubicka wrote:
> > What would be best interface for this?  Adding extra argument into
> > init_cumulative_args with declaration?
> 
> Probably.
OK, here is the patch to change init_cumulative_args.
I replaced indirect by the declaration itself.  Regtested/bootstrapped
i386

Tue Feb 18 23:45:47 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.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.256
diff -c -3 -p -r1.256 calls.c
*** calls.c	10 Feb 2003 06:16:53 -0000	1.256
--- calls.c	18 Feb 2003 22:44:30 -0000
*************** expand_call (exp, target, ignore)
*** 2418,2424 ****
       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));
  
    /* Make a vector to hold all the information about each arg.  */
    args = (struct arg_data *) alloca (num_actuals * sizeof (struct arg_data));
--- 2418,2424 ----
       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);
  
    /* Make a vector to hold all the information about each arg.  */
    args = (struct arg_data *) alloca (num_actuals * sizeof (struct arg_data));
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.400
diff -c -3 -p -r1.400 function.c
*** function.c	15 Feb 2003 21:22:54 -0000	1.400
--- function.c	18 Feb 2003 22:44:31 -0000
*************** assign_parms (fndecl)
*** 4273,4279 ****
  #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);
  #endif
  
    /* We haven't yet found an argument that we must push and pretend the
--- 4273,4279 ----
  #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, fndecl);
  #endif
  
    /* We haven't yet found an argument that we must push and pretend the
Index: config/arm/arm-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm-protos.h,v
retrieving revision 1.49
diff -c -3 -p -r1.49 arm-protos.h
*** config/arm/arm-protos.h	10 Feb 2003 16:33:08 -0000	1.49
--- config/arm/arm-protos.h	18 Feb 2003 22:44:33 -0000
*************** extern int    arm_is_longcall_p 	PARAMS 
*** 149,155 ****
  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));
  extern rtx    arm_va_arg                PARAMS ((tree, tree));
  extern int    arm_function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
  							 enum machine_mode,
--- 149,155 ----
  extern rtx    arm_function_arg		PARAMS ((CUMULATIVE_ARGS *,
  						enum machine_mode, tree, int));
  extern void   arm_init_cumulative_args	PARAMS ((CUMULATIVE_ARGS *, tree, rtx,
! 						tree));
  extern rtx    arm_va_arg                PARAMS ((tree, tree));
  extern int    arm_function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
  							 enum machine_mode,
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.260
diff -c -3 -p -r1.260 arm.c
*** config/arm/arm.c	16 Feb 2003 19:40:11 -0000	1.260
--- config/arm/arm.c	18 Feb 2003 22:44:35 -0000
*************** arm_float_words_big_endian ()
*** 1957,1967 ****
     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)
       CUMULATIVE_ARGS * pcum;
       tree fntype;
       rtx libname  ATTRIBUTE_UNUSED;
!      int indirect ATTRIBUTE_UNUSED;
  {
    /* On the ARM, the offset starts at 0.  */
    pcum->nregs = ((fntype && aggregate_value_p (TREE_TYPE (fntype))) ? 1 : 0);
--- 1957,1967 ----
     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, fndecl)
       CUMULATIVE_ARGS * pcum;
       tree fntype;
       rtx libname  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);
Index: config/arm/arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.183
diff -c -3 -p -r1.183 arm.h
*** config/arm/arm.h	10 Feb 2003 16:33:08 -0000	1.183
--- config/arm/arm.h	18 Feb 2003 22:44:35 -0000
*************** typedef struct
*** 1572,1579 ****
     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))
  
  /* Update the data in CUM to advance over an argument
     of mode MODE and data type TYPE.
--- 1572,1579 ----
     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, 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.
Index: config/avr/avr-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr-protos.h,v
retrieving revision 1.24
diff -c -3 -p -r1.24 avr-protos.h
*** config/avr/avr-protos.h	28 Jan 2003 18:08:49 -0000	1.24
--- config/avr/avr-protos.h	18 Feb 2003 22:44:36 -0000
*************** extern int    avr_progmem_p             
*** 52,58 ****
  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));
  extern rtx    function_arg         PARAMS ((CUMULATIVE_ARGS *cum,
  					   enum machine_mode mode,
  					   tree type, int named));
--- 52,58 ----
  extern rtx    avr_function_value           PARAMS ((tree type, tree func));
  extern void   init_cumulative_args         PARAMS ((CUMULATIVE_ARGS *cum,
  						   tree fntype, rtx libname,
! 						   tree fndecl));
  extern rtx    function_arg         PARAMS ((CUMULATIVE_ARGS *cum,
  					   enum machine_mode mode,
  					   tree type, int named));
Index: config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.89
diff -c -3 -p -r1.89 avr.c
*** config/avr/avr.c	28 Jan 2003 18:08:49 -0000	1.89
--- config/avr/avr.c	18 Feb 2003 22:44:36 -0000
*************** function_arg_regno_p(r)
*** 1488,1498 ****
     of the argument list.  */
  
  void
! init_cumulative_args (cum, fntype, libname, indirect)
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname;
!      int indirect ATTRIBUTE_UNUSED;
  {
    cum->nregs = 18;
    cum->regno = FIRST_CUM_REG;
--- 1488,1498 ----
     of the argument list.  */
  
  void
! init_cumulative_args (cum, fntype, libname, fndecl)
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname;
!      tree fndecl;
  {
    cum->nregs = 18;
    cum->regno = FIRST_CUM_REG;
Index: config/avr/avr.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.h,v
retrieving revision 1.75
diff -c -3 -p -r1.75 avr.h
*** config/avr/avr.h	28 Jan 2003 18:08:49 -0000	1.75
--- config/avr/avr.h	18 Feb 2003 22:44:37 -0000
*************** typedef struct avr_args {
*** 1136,1142 ****
     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)
  
  /* A C statement (sans semicolon) for initializing the variable CUM
     for the state at the beginning of the argument list.  The variable
--- 1136,1142 ----
     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, 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
Index: config/d30v/d30v-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v-protos.h,v
retrieving revision 1.9
diff -c -3 -p -r1.9 d30v-protos.h
*** config/d30v/d30v-protos.h	16 Jul 2002 20:58:57 -0000	1.9
--- config/d30v/d30v-protos.h	18 Feb 2003 22:44:37 -0000
*************** extern int direct_return		PARAMS ((void)
*** 75,81 ****
  #ifdef TREE_CODE
  #ifdef RTX_CODE
  extern void d30v_init_cumulative_args	PARAMS ((CUMULATIVE_ARGS *, tree,
! 						 rtx, int, int));
  #endif
  extern int d30v_function_arg_boundary	PARAMS ((enum machine_mode, tree));
  #ifdef RTX_CODE
--- 75,81 ----
  #ifdef TREE_CODE
  #ifdef RTX_CODE
  extern void d30v_init_cumulative_args	PARAMS ((CUMULATIVE_ARGS *, tree,
! 						 rtx, tree, int));
  #endif
  extern int d30v_function_arg_boundary	PARAMS ((enum machine_mode, tree));
  #ifdef RTX_CODE
Index: config/d30v/d30v.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v.c,v
retrieving revision 1.28
diff -c -3 -p -r1.28 d30v.c
*** config/d30v/d30v.c	28 Jan 2003 18:08:49 -0000	1.28
--- config/d30v/d30v.c	18 Feb 2003 22:44:37 -0000
*************** d30v_init_cumulative_args (cum, fntype, 
*** 1922,1928 ****
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname;
!      int indirect;
       int incoming;
  {
    *cum = GPR_ARG_FIRST;
--- 1922,1928 ----
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname;
!      tree fndecl;
       int incoming;
  {
    *cum = GPR_ARG_FIRST;
*************** d30v_init_cumulative_args (cum, fntype, 
*** 1930,1936 ****
    if (TARGET_DEBUG_ARG)
      {
        fprintf (stderr, "\ninit_cumulative_args:");
!       if (indirect)
  	fputs (" indirect", stderr);
  
        if (incoming)
--- 1930,1936 ----
    if (TARGET_DEBUG_ARG)
      {
        fprintf (stderr, "\ninit_cumulative_args:");
!       if (!fndecl && !fntype)
  	fputs (" indirect", stderr);
  
        if (incoming)
Index: config/d30v/d30v.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v.h,v
retrieving revision 1.77
diff -c -3 -p -r1.77 d30v.h
*** config/d30v/d30v.h	28 Jan 2003 18:08:49 -0000	1.77
--- config/d30v/d30v.h	18 Feb 2003 22:44:37 -0000
*************** typedef struct d30v_stack {
*** 1622,1629 ****
     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)
  
  /* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the
     arguments for the function being compiled.  If this macro is undefined,
--- 1622,1629 ----
     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, 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,
*************** typedef struct d30v_stack {
*** 1634,1640 ****
     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)
  
  /* 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
--- 1634,1640 ----
     LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'.  */
  
  #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
!   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
Index: config/frv/frv-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv-protos.h,v
retrieving revision 1.4
diff -c -3 -p -r1.4 frv-protos.h
*** config/frv/frv-protos.h	20 Oct 2002 22:37:09 -0000	1.4
--- config/frv/frv-protos.h	18 Feb 2003 22:44:37 -0000
*************** extern rtx frv_legitimize_address		PARAM
*** 70,76 ****
  
  #ifdef TREE_CODE
  extern void frv_init_cumulative_args		PARAMS ((CUMULATIVE_ARGS *, tree,
! 						       rtx, int, int));
  
  extern int frv_function_arg_boundary		PARAMS ((enum machine_mode, tree));
  extern rtx frv_function_arg			PARAMS ((CUMULATIVE_ARGS *,
--- 70,76 ----
  
  #ifdef TREE_CODE
  extern void frv_init_cumulative_args		PARAMS ((CUMULATIVE_ARGS *, tree,
! 						       rtx, tree, int));
  
  extern int frv_function_arg_boundary		PARAMS ((enum machine_mode, tree));
  extern rtx frv_function_arg			PARAMS ((CUMULATIVE_ARGS *,
Index: config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 frv.c
*** config/frv/frv.c	28 Jan 2003 04:46:25 -0000	1.17
--- config/frv/frv.c	18 Feb 2003 22:44:38 -0000
*************** frv_print_operand (file, x, code)
*** 3081,3091 ****
     FNTYPE is nonzero, but never both of them at once.  */
  
  void
! frv_init_cumulative_args (cum, fntype, libname, indirect, incoming)
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname;
!      int indirect;
       int incoming;
  {
    *cum = FIRST_ARG_REGNUM;
--- 3081,3091 ----
     FNTYPE is nonzero, but never both of them at once.  */
  
  void
! frv_init_cumulative_args (cum, fntype, libname, fndecl, incoming)
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname;
!      tree fndecl;
       int incoming;
  {
    *cum = FIRST_ARG_REGNUM;
*************** frv_init_cumulative_args (cum, fntype, l
*** 3093,3099 ****
    if (TARGET_DEBUG_ARG)
      {
        fprintf (stderr, "\ninit_cumulative_args:");
!       if (indirect)
  	fputs (" indirect", stderr);
  
        if (incoming)
--- 3093,3099 ----
    if (TARGET_DEBUG_ARG)
      {
        fprintf (stderr, "\ninit_cumulative_args:");
!       if (!fndecl && !fntype)
  	fputs (" indirect", stderr);
  
        if (incoming)
Index: config/frv/frv.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.h,v
retrieving revision 1.16
diff -c -3 -p -r1.16 frv.h
*** config/frv/frv.h	28 Jan 2003 04:46:25 -0000	1.16
--- config/frv/frv.h	18 Feb 2003 22:44:39 -0000
*************** struct machine_function GTY(())
*** 1955,1962 ****
     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)
  
  /* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the
     arguments for the function being compiled.  If this macro is undefined,
--- 1955,1962 ----
     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, 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,
*************** struct machine_function GTY(())
*** 1967,1973 ****
     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)
  
  /* 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
--- 1967,1973 ----
     LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'.  */
  
  #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
!   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
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.251
diff -c -3 -p -r1.251 mips.c
*** config/mips/mips.c	31 Jan 2003 23:34:15 -0000	1.251
--- config/mips/mips.c	18 Feb 2003 22:44:40 -0000
*************** mips_expand_prologue ()
*** 7748,7754 ****
  
       This is only needed if store_args_on_stack is true.  */
  
!   INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, 0);
    regno = GP_ARG_FIRST;
  
    for (cur_arg = fnargs; cur_arg != 0; cur_arg = next_arg)
--- 7748,7754 ----
  
       This is only needed if store_args_on_stack is true.  */
  
!   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)
Index: config/pa/pa.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.h,v
retrieving revision 1.182
diff -c -3 -p -r1.182 pa.h
*** config/pa/pa.h	28 Jan 2003 18:08:53 -0000	1.182
--- config/pa/pa.h	18 Feb 2003 22:44:40 -0000
*************** struct hppa_args {int words, nargs_proto
*** 769,777 ****
     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) \
    (CUM).words = 0, 							\
!   (CUM).indirect = INDIRECT,						\
    (CUM).nargs_prototype = (FNTYPE && TYPE_ARG_TYPES (FNTYPE)		\
  			   ? (list_length (TYPE_ARG_TYPES (FNTYPE)) - 1	\
  			      + (TYPE_MODE (TREE_TYPE (FNTYPE)) == BLKmode \
--- 769,777 ----
     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,FNDECL) \
    (CUM).words = 0, 							\
!   (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 \
Index: config/sparc/sparc-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc-protos.h,v
retrieving revision 1.33
diff -c -3 -p -r1.33 sparc-protos.h
*** config/sparc/sparc-protos.h	28 Jan 2003 04:46:33 -0000	1.33
--- config/sparc/sparc-protos.h	18 Feb 2003 22:44:40 -0000
*************** extern int function_arg_pass_by_referenc
*** 41,47 ****
  						   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 sparc_va_start PARAMS ((tree, rtx));
  #endif
  extern struct rtx_def *sparc_va_arg PARAMS ((tree, tree));
--- 41,47 ----
  						   tree, int));
  extern struct rtx_def *sparc_builtin_saveregs PARAMS ((void));
  #ifdef RTX_CODE
! 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));
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.236
diff -c -3 -p -r1.236 sparc.c
*** config/sparc/sparc.c	28 Jan 2003 18:08:54 -0000	1.236
--- config/sparc/sparc.c	18 Feb 2003 22:44:41 -0000
*************** output_sibcall (insn, call_operand)
*** 4367,4377 ****
     For a library call, FNTYPE is 0.  */
  
  void
! init_cumulative_args (cum, fntype, libname, indirect)
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname ATTRIBUTE_UNUSED;
!      int indirect ATTRIBUTE_UNUSED;
  {
    cum->words = 0;
    cum->prototype_p = fntype && TYPE_ARG_TYPES (fntype);
--- 4367,4377 ----
     For a library call, FNTYPE is 0.  */
  
  void
! init_cumulative_args (cum, fntype, libname, fndecl)
       CUMULATIVE_ARGS *cum;
       tree fntype;
       rtx libname ATTRIBUTE_UNUSED;
!      tree fndecl ATTRIBUTE_UNUSED;
  {
    cum->words = 0;
    cum->prototype_p = fntype && TYPE_ARG_TYPES (fntype);
Index: config/sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.h,v
retrieving revision 1.218
diff -c -3 -p -r1.218 sparc.h
*** config/sparc/sparc.h	28 Jan 2003 18:08:55 -0000	1.218
--- config/sparc/sparc.h	18 Feb 2003 22:44:41 -0000
*************** struct sparc_args {
*** 1734,1741 ****
     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));
  
  /* Update the data in CUM to advance over an argument
     of mode MODE and data type TYPE.
--- 1734,1741 ----
     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, 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.
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.200
diff -c -3 -p -r1.200 tm.texi
*** doc/tm.texi	12 Feb 2003 18:39:35 -0000	1.200
--- doc/tm.texi	18 Feb 2003 22:44:43 -0000
*************** arguments are passed on the stack, there
*** 3658,3674 ****
  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.
  
  When processing a call to a compiler support library function,
  @var{libname} identifies which one.  It is a @code{symbol_ref} rtx which
--- 3658,3672 ----
  should not be empty, so use @code{int}.
  
  @findex INIT_CUMULATIVE_ARGS
! @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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]