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]

Tidy varargs vs pass-by-reference


I wish I'd done this before introducing 9 copies of the same
function in the first place.

Compile tested on pa, as that's the only target for which 
code is not simply being deleted.


r~


        * builtins.c (std_gimplify_va_arg_expr): Handle types passed
        by reference.
        (ind_gimplify_va_arg_expr): Remove.
        * tree.h (ind_gimplify_va_arg_expr): Remove.
        * config/pa/pa.c (hppa_gimplify_va_arg_expr): Don't use it.
        * config/mmix/mmix.c (mmix_function_arg_pass_by_reference): Allow
        argsp to be null.
                                                                                
        * config/arc/arc.c (arc_gimplify_va_arg_expr): Remove.
        (TARGET_GIMPLIFY_VA_ARG_EXPR): Remove.
        * config/cris/cris.c, config/fr30/fr30.c, config/frv/frv.c,
        config/iq2000/iq2000.c, config/m32r/m32r.c, config/mmix/mmix.c,
        config/mn10300/mn10300.c, config/v850/v850.c: Similarly.

Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.363
diff -c -p -d -r1.363 builtins.c
*** builtins.c	12 Jul 2004 22:45:11 -0000	1.363
--- builtins.c	13 Jul 2004 08:33:30 -0000
*************** std_gimplify_va_arg_expr (tree valist, t
*** 4477,4482 ****
--- 4477,4483 ----
  {
    tree addr, t, type_size, rounded_size, valist_tmp;
    unsigned HOST_WIDE_INT align, boundary;
+   bool indirect;
  
  #ifdef ARGS_GROW_DOWNWARD
    /* All of the alignment and movement below is for args-grow-up machines.
*************** std_gimplify_va_arg_expr (tree valist, t
*** 4485,4490 ****
--- 4486,4495 ----
    abort ();
  #endif
  
+   indirect = pass_by_reference (NULL, TYPE_MODE (type), type, false);
+   if (indirect)
+     type = build_pointer_type (type);
+ 
    align = PARM_BOUNDARY / BITS_PER_UNIT;
    boundary = FUNCTION_ARG_BOUNDARY (TYPE_MODE (type), type) / BITS_PER_UNIT;
  
*************** std_gimplify_va_arg_expr (tree valist, t
*** 4532,4549 ****
    gimplify_and_add (t, pre_p);
  
    addr = fold_convert (build_pointer_type (type), addr);
-   return build_fold_indirect_ref (addr);
- }
  
! /* Like std_gimplify_va_arg_expr, but uses pass-by-reference.  */
!  
! tree
! ind_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
! {
!   tree t;
!   t = build_pointer_type (type);
!   t = std_gimplify_va_arg_expr (valist, t, pre_p, post_p);
!   return build_fold_indirect_ref (t);
  }
  
  /* Return a dummy expression of type TYPE in order to keep going after an
--- 4537,4547 ----
    gimplify_and_add (t, pre_p);
  
    addr = fold_convert (build_pointer_type (type), addr);
  
!   if (indirect)
!     addr = build_fold_indirect_ref (addr);
! 
!   return build_fold_indirect_ref (addr);
  }
  
  /* Return a dummy expression of type TYPE in order to keep going after an
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.557
diff -c -p -d -r1.557 tree.h
*** tree.h	13 Jul 2004 07:44:53 -0000	1.557
--- tree.h	13 Jul 2004 08:33:31 -0000
*************** extern tree strip_float_extensions (tree
*** 3437,3443 ****
  extern tree simplify_builtin (tree, int);
  extern tree c_strlen (tree, int);
  extern tree std_gimplify_va_arg_expr (tree, tree, tree *, tree *);
- extern tree ind_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  /* In convert.c */
  extern tree strip_float_extensions (tree);
--- 3437,3442 ----
Index: config/arc/arc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.c,v
retrieving revision 1.57
diff -c -p -d -r1.57 arc.c
*** config/arc/arc.c	9 Jul 2004 11:40:09 -0000	1.57
--- config/arc/arc.c	13 Jul 2004 08:33:31 -0000
*************** static bool arc_rtx_costs (rtx, int, int
*** 102,108 ****
  static int arc_address_cost (rtx);
  static void arc_external_libcall (rtx);
  static bool arc_return_in_memory (tree, tree);
- static tree arc_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  /* Initialize the GCC target structure.  */
  #undef TARGET_ASM_ALIGNED_HI_OP
--- 102,107 ----
*************** static tree arc_gimplify_va_arg_expr (tr
*** 142,149 ****
  
  #undef TARGET_SETUP_INCOMING_VARARGS
  #define TARGET_SETUP_INCOMING_VARARGS arc_setup_incoming_varargs
- #undef TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR arc_gimplify_va_arg_expr
  
  #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
  #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE hook_int_void_1
--- 141,146 ----
*************** arc_va_start (tree valist, rtx nextarg)
*** 2295,2312 ****
    std_expand_builtin_va_start (valist, nextarg);
  }
  
- static tree
- arc_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   /* All aggregates are passed by reference.  All scalar types larger
-      than 8 bytes are passed by reference.  */
- 
-   if (AGGREGATE_TYPE_P (type) || int_size_in_bytes (type) > 8)
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- 
-   return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /* This is how to output a definition of an internal numbered label where
     PREFIX is the class of label and NUM is the number within the class.  */
  
--- 2292,2297 ----
Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.c,v
retrieving revision 1.55
diff -c -p -d -r1.55 cris.c
*** config/cris/cris.c	8 Jul 2004 22:17:47 -0000	1.55
--- config/cris/cris.c	13 Jul 2004 08:33:31 -0000
*************** static void cris_init_libfuncs (void);
*** 116,123 ****
  static bool cris_rtx_costs (rtx, int, int, int *);
  static int cris_address_cost (rtx);
  
- static tree cris_gimplify_va_arg_expr (tree, tree, tree *, tree *);
- 
  /* The function cris_target_asm_function_epilogue puts the last insn to
     output here.  It always fits; there won't be a symbol operand.  Used in
     delay_slots_for_epilogue and function_epilogue.  */
--- 116,121 ----
*************** int cris_cpu_version = CRIS_DEFAULT_CPU_
*** 191,198 ****
  
  #undef TARGET_SETUP_INCOMING_VARARGS
  #define TARGET_SETUP_INCOMING_VARARGS cris_setup_incoming_varargs
- #undef TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR cris_gimplify_va_arg_expr
  
  struct gcc_target targetm = TARGET_INITIALIZER;
  
--- 189,194 ----
*************** cris_init_libfuncs (void)
*** 2789,2806 ****
    set_optab_libfunc (umod_optab, SImode, "__Umod");
  }
  
- /* The va_arg gimplifier.  All we need to do here special is notice
-    when we we've got a pass-by-reference.  */
- 
- static tree
- cris_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (FUNCTION_ARG_PASS_BY_REFERENCE (dummy, TYPE_MODE (type), type, dummy))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /* The INIT_EXPANDERS worker sets the per-function-data initializer and
     mark functions.  */
  
--- 2785,2790 ----
Index: config/fr30/fr30.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30.c,v
retrieving revision 1.43
diff -c -p -d -r1.43 fr30.c
*** config/fr30/fr30.c	13 Jul 2004 07:44:54 -0000	1.43
--- config/fr30/fr30.c	13 Jul 2004 08:33:31 -0000
*************** static struct fr30_frame_info 	zero_fram
*** 123,129 ****
  
  static void fr30_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
  					 tree, int *, int);
- static tree fr30_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  static bool fr30_must_pass_in_stack (enum machine_mode, tree);
  
  #define FRAME_POINTER_MASK 	(1 << (FRAME_POINTER_REGNUM))
--- 123,128 ----
*************** static bool fr30_must_pass_in_stack (enu
*** 158,166 ****
  #undef  TARGET_MUST_PASS_IN_STACK
  #define TARGET_MUST_PASS_IN_STACK fr30_must_pass_in_stack
  
- #undef  TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR fr30_gimplify_va_arg_expr
- 
  struct gcc_target targetm = TARGET_INITIALIZER;
  
  /* Returns the number of bytes offset between FROM_REG and TO_REG
--- 157,162 ----
*************** fr30_function_arg_partial_nregs (CUMULAT
*** 729,745 ****
    return FR30_NUM_ARG_REGS - cum;
  }
  
- /* Implement `va_arg'.  */
- 
- static tree
- fr30_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (FUNCTION_ARG_PASS_BY_REFERENCE (dummy, TYPE_MODE (type), type, dummy))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /*}}}*/
  /*{{{  Operand predicates */ 
  
--- 725,730 ----
Index: config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.60
diff -c -p -d -r1.60 frv.c
*** config/frv/frv.c	13 Jul 2004 07:44:57 -0000	1.60
--- config/frv/frv.c	13 Jul 2004 08:33:32 -0000
*************** static void frv_output_const_unspec		(FI
*** 286,292 ****
  						 const struct frv_unspec *);
  static bool frv_function_ok_for_sibcall		(tree, tree);
  static rtx frv_struct_value_rtx			(tree, int);
- static tree frv_gimplify_va_arg_expr		(tree, tree, tree *, tree *);
  static bool frv_must_pass_in_stack (enum machine_mode mode, tree type);
  
  /* Initialize the GCC target structure.  */
--- 286,291 ----
*************** static bool frv_must_pass_in_stack (enum
*** 335,342 ****
  #define TARGET_EXPAND_BUILTIN_SAVEREGS frv_expand_builtin_saveregs
  #undef TARGET_SETUP_INCOMING_VARARGS
  #define TARGET_SETUP_INCOMING_VARARGS frv_setup_incoming_varargs
- #undef TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR frv_gimplify_va_arg_expr
  
  struct gcc_target targetm = TARGET_INITIALIZER;
  
--- 334,339 ----
*************** frv_expand_builtin_va_start (tree valist
*** 2085,2102 ****
  }
  
  
- /* Expand __builtin_va_arg to do the va_arg macro.  */
- 
- static tree
- frv_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (AGGREGATE_TYPE_P (type))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
- 
  /* Expand a block move operation, and return 1 if successful.  Return 0
     if we should let the compiler generate normal code.
  
--- 2082,2087 ----
Index: config/iq2000/iq2000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/iq2000/iq2000.c,v
retrieving revision 1.21
diff -c -p -d -r1.21 iq2000.c
*** config/iq2000/iq2000.c	13 Jul 2004 07:44:58 -0000	1.21
--- config/iq2000/iq2000.c	13 Jul 2004 08:33:32 -0000
*************** static bool iq2000_rtx_costs          (r
*** 171,177 ****
  static int  iq2000_address_cost       (rtx);
  static void iq2000_select_section     (tree, int, unsigned HOST_WIDE_INT);
  static bool iq2000_return_in_memory   (tree, tree);
- static tree iq2000_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  #undef  TARGET_INIT_BUILTINS
  #define TARGET_INIT_BUILTINS 		iq2000_init_builtins
--- 171,176 ----
*************** static tree iq2000_gimplify_va_arg_expr 
*** 200,207 ****
  #define TARGET_SETUP_INCOMING_VARARGS	iq2000_setup_incoming_varargs
  #undef  TARGET_STRICT_ARGUMENT_NAMING
  #define TARGET_STRICT_ARGUMENT_NAMING	hook_bool_CUMULATIVE_ARGS_true
- #undef  TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR	iq2000_gimplify_va_arg_expr
  
  #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
  #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE hook_int_void_1
--- 199,204 ----
*************** iq2000_va_start (tree valist, rtx nextar
*** 1590,1606 ****
    nextarg = plus_constant (nextarg, - gpr_save_area_size);
    std_expand_builtin_va_start (valist, nextarg);
  }
- 
- /* Implement va_arg.  */
- 
- static tree
- iq2000_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (function_arg_pass_by_reference (NULL, TYPE_MODE (type), type, 0))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
  
  /* Allocate a chunk of memory for per-function machine-dependent data.  */
  
--- 1587,1592 ----
Index: config/m32r/m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.99
diff -c -p -d -r1.99 m32r.c
*** config/m32r/m32r.c	13 Jul 2004 07:44:59 -0000	1.99
--- config/m32r/m32r.c	13 Jul 2004 08:33:32 -0000
*************** static void m32r_setup_incoming_varargs 
*** 99,105 ****
  					 tree, int *, int);
  static void init_idents (void);
  static bool m32r_rtx_costs (rtx, int, int, int *);
- static tree m32r_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  /* Initialize the GCC target structure.  */
  #undef  TARGET_ATTRIBUTE_TABLE
--- 99,104 ----
*************** static tree m32r_gimplify_va_arg_expr (t
*** 144,152 ****
  #undef  TARGET_MUST_PASS_IN_STACK
  #define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
  
- #undef  TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR m32r_gimplify_va_arg_expr
- 
  struct gcc_target targetm = TARGET_INITIALIZER;
  
  /* Called by OVERRIDE_OPTIONS to initialize various things.  */
--- 143,148 ----
*************** m32r_setup_incoming_varargs (CUMULATIVE_
*** 1396,1412 ****
  }
  
  
- /* Implement `va_arg'.  */
- 
- static tree
- m32r_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (m32r_pass_by_reference (type))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /* Return true if INSN is real instruction bearing insn.  */
  
  static int
--- 1392,1397 ----
Index: config/mmix/mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.65
diff -c -p -d -r1.65 mmix.c
*** config/mmix/mmix.c	13 Jul 2004 07:45:02 -0000	1.65
--- config/mmix/mmix.c	13 Jul 2004 08:33:32 -0000
*************** static void mmix_file_start (void);
*** 139,145 ****
  static void mmix_file_end (void);
  static bool mmix_rtx_costs (rtx, int, int, int *);
  static rtx mmix_struct_value_rtx (tree, int);
- static tree mmix_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  
  /* Target structure macros.  Listed by node.  See `Using and Porting GCC'
--- 139,144 ----
*************** static tree mmix_gimplify_va_arg_expr (t
*** 205,212 ****
  
  #undef TARGET_SETUP_INCOMING_VARARGS
  #define TARGET_SETUP_INCOMING_VARARGS mmix_setup_incoming_varargs
- #undef TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR mmix_gimplify_va_arg_expr
  
  struct gcc_target targetm = TARGET_INITIALIZER;
  
--- 204,209 ----
*************** mmix_function_arg_pass_by_reference (con
*** 601,611 ****
  {
    /* FIXME: Check: I'm not sure the must_pass_in_stack check is
       necessary.  */
!   return
!     targetm.calls.must_pass_in_stack (mode, type)
!     || (MMIX_FUNCTION_ARG_SIZE (mode, type) > 8
! 	&& !TARGET_LIBFUNC
! 	&& !argsp->lib);
  }
  
  /* Return nonzero if regno is a register number where a parameter is
--- 598,612 ----
  {
    /* FIXME: Check: I'm not sure the must_pass_in_stack check is
       necessary.  */
!   if (targetm.calls.must_pass_in_stack (mode, type))
!     return true;
! 
!   if (MMIX_FUNCTION_ARG_SIZE (mode, type) > 8
!       && !TARGET_LIBFUNC
!       && (!argsp || !argsp->lib))
!     return true;
! 
!   return false;
  }
  
  /* Return nonzero if regno is a register number where a parameter is
*************** mmix_setup_incoming_varargs (CUMULATIVE_
*** 846,866 ****
      internal_error ("MMIX Internal: Last named vararg would not fit in a register");
  }
  
- /* Gimplify VA_ARG_EXPR.  All we need to do is figure out if TYPE is
-    pass-by-reference and hand off to standard routines.  */
- 
- static tree
- mmix_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   CUMULATIVE_ARGS cum;
-   cum.lib = 0;
- 
-   if (mmix_function_arg_pass_by_reference (&cum, TYPE_MODE (type), type, 0))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /* TRAMPOLINE_SIZE.  */
  /* Four 4-byte insns plus two 8-byte values.  */
  int mmix_trampoline_size = 32;
--- 847,852 ----
Index: config/mn10300/mn10300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.70
diff -c -p -d -r1.70 mn10300.c
*** config/mn10300/mn10300.c	9 Jul 2004 09:50:10 -0000	1.70
--- config/mn10300/mn10300.c	13 Jul 2004 08:33:32 -0000
*************** static bool mn10300_rtx_costs (rtx, int,
*** 71,77 ****
  static void mn10300_file_start (void);
  static bool mn10300_return_in_memory (tree, tree);
  static rtx mn10300_builtin_saveregs (void);
- static tree mn10300_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  /* Initialize the GCC target structure.  */
  #undef TARGET_ASM_ALIGNED_HI_OP
--- 71,76 ----
*************** static tree mn10300_gimplify_va_arg_expr
*** 98,105 ****
  
  #undef TARGET_EXPAND_BUILTIN_SAVEREGS
  #define TARGET_EXPAND_BUILTIN_SAVEREGS mn10300_builtin_saveregs
- #undef TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR mn10300_gimplify_va_arg_expr
  
  static void mn10300_encode_section_info (tree, rtx, int);
  struct gcc_target targetm = TARGET_INITIALIZER;
--- 97,102 ----
*************** mn10300_va_start (tree valist, rtx nexta
*** 1459,1473 ****
    std_expand_builtin_va_start (valist, nextarg);
  }
  
- static tree
- mn10300_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (FUNCTION_ARG_PASS_BY_REFERENCE (dummy, TYPE_MODE (type), type, dummy))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /* Return an RTX to represent where a value with mode MODE will be returned
     from a function.  If the result is 0, the argument is pushed.  */
  
--- 1456,1461 ----
Index: config/pa/pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.261
diff -c -p -d -r1.261 pa.c
*** config/pa/pa.c	13 Jul 2004 07:45:03 -0000	1.261
--- config/pa/pa.c	13 Jul 2004 08:33:32 -0000
*************** hppa_va_start (tree valist, rtx nextarg)
*** 5956,5973 ****
  static tree
  hppa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
  {
-   bool indirect;
- 
-   indirect = FUNCTION_ARG_PASS_BY_REFERENCE (dummy, TYPE_MODE (type), type, 0);
- 
    if (TARGET_64BIT)
      {
        /* Args grow upward.  We can use the generic routines.  */
! 
!       if (indirect)
! 	return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
!       else
! 	return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
      }
    else /* !TARGET_64BIT */
      {
--- 5956,5965 ----
  static tree
  hppa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
  {
    if (TARGET_64BIT)
      {
        /* Args grow upward.  We can use the generic routines.  */
!       return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
      }
    else /* !TARGET_64BIT */
      {
*************** hppa_gimplify_va_arg_expr (tree valist, 
*** 5975,5981 ****
--- 5967,5975 ----
        tree valist_type;
        tree t, u;
        unsigned int size, ofs;
+       bool indirect;
  
+       indirect = pass_by_reference (NULL, TYPE_MODE (type), type, 0);
        if (indirect)
  	{
  	  type = ptr;
Index: config/v850/v850.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/v850.c,v
retrieving revision 1.91
diff -c -p -d -r1.91 v850.c
*** config/v850/v850.c	9 Jul 2004 10:10:51 -0000	1.91
--- config/v850/v850.c	13 Jul 2004 08:33:33 -0000
*************** static void v850_encode_section_info (tr
*** 67,73 ****
  static bool v850_return_in_memory    (tree, tree);
  static void v850_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
  					 tree, int *, int);
- static tree v850_gimplify_va_arg_expr (tree, tree, tree *, tree *);
  
  /* Information about the various small memory areas.  */
  struct small_memory_info small_memory[ (int)SMALL_MEMORY_max ] =
--- 67,72 ----
*************** static int v850_interrupt_p = FALSE;
*** 133,141 ****
  #undef TARGET_SETUP_INCOMING_VARARGS
  #define TARGET_SETUP_INCOMING_VARARGS v850_setup_incoming_varargs
  
- #undef TARGET_GIMPLIFY_VA_ARG_EXPR
- #define TARGET_GIMPLIFY_VA_ARG_EXPR v850_gimplify_va_arg_expr
- 
  struct gcc_target targetm = TARGET_INITIALIZER;
  
  /* Sometimes certain combinations of command options do not make
--- 132,137 ----
*************** construct_prepare_instruction (rtx op)
*** 3308,3324 ****
    return buff;
  }
  
- /* Implement `va_arg'.  */
- 
- static tree
- v850_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
- {
-   if (FUNCTION_ARG_PASS_BY_REFERENCE (dummy, TYPE_MODE (type), type, 0))
-     return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
-   else
-     return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
- }
- 
  /* Return an RTX indicating where the return address to the
     calling function can be found.  */
  
--- 3304,3309 ----


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