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]

RFA: xstormy16: Fix used of poisoned macro


Hi Geoff,

  May I apply the patch below please ?  It fixes the xstormy16 port so
  that it no longer uses the poisoned BUILD_VA_LIST_TYPE macro, but
  instead provides a target function it.

Cheers
        Nick
        
gcc/ChangeLog
2003-11-14  Nick Clifton  <nickc@redhat.com>

	* config/stormy16/stormy16.h (BUILD_VA_LIST_TYPE): Delete.
	* config/stormy16/stormy16-protos.h (xstormy16_build_va_list):
	Remove prototype.
	* config/stormy16/stormy16.c (xstormy16_build_va_list): Rename
	to xstormy16_build_builtin_va_list and make static.
        (TARGET_BUILD_BUILTIN_VA_LIST): Define.

Index: gcc/config/stormy16/stormy16.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.h,v
retrieving revision 1.80
diff -c -3 -p -r1.80 stormy16.h
*** gcc/config/stormy16/stormy16.h	23 Aug 2003 18:03:06 -0000	1.80
--- gcc/config/stormy16/stormy16.h	14 Nov 2003 12:04:13 -0000
*************** enum reg_class
*** 496,506 ****
    if (! SECOND_TIME) \
      xstormy16_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
  
- /* Build up the stdarg/varargs va_list type tree, assigning it to NODE.  If not
-    defined, it is assumed that va_list is a void * pointer.  */
- #define BUILD_VA_LIST_TYPE(NODE) \
-   ((NODE) = xstormy16_build_va_list ())
- 
  /* Implement the stdarg/varargs va_start macro.  STDARG_P is nonzero if this
     is stdarg.h instead of varargs.h.  VALIST is the tree of the va_list
     variable to initialize.  NEXTARG is the machine independent notion of the
--- 496,501 ----

Index: gcc/config/stormy16/stormy16-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16-protos.h,v
retrieving revision 1.14
diff -c -3 -p -r1.14 stormy16-protos.h
*** gcc/config/stormy16/stormy16-protos.h	28 Sep 2003 09:51:52 -0000	1.14
--- gcc/config/stormy16/stormy16-protos.h	14 Nov 2003 12:04:10 -0000
*************** extern rtx xstormy16_function_arg
*** 39,45 ****
  #  endif
  extern void xstormy16_setup_incoming_varargs 
   (CUMULATIVE_ARGS, int, tree, int *);
- extern tree xstormy16_build_va_list (void);
  #endif
  
  #if defined (TREE_CODE) && defined (RTX_CODE)
--- 39,44 ----

Index: gcc/config/stormy16/stormy16.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.c,v
retrieving revision 1.50
diff -c -3 -p -r1.50 stormy16.c
*** gcc/config/stormy16/stormy16.c	28 Sep 2003 09:51:52 -0000	1.50
--- gcc/config/stormy16/stormy16.c	14 Nov 2003 12:04:12 -0000
*************** xstormy16_setup_incoming_varargs (CUMULA
*** 1251,1258 ****
     for arguments that have not been passed in registers.  
     To keep the layout nice, the pointer is first in the structure.  */
  
! tree
! xstormy16_build_va_list (void)
  {
    tree f_1, f_2, record, type_decl;
  
--- 1251,1258 ----
     for arguments that have not been passed in registers.  
     To keep the layout nice, the pointer is first in the structure.  */
  
! static tree
! xstormy16_build_builtin_va_list (void)
  {
    tree f_1, f_2, record, type_decl;
  
*************** xstormy16_expand_builtin(tree exp, rtx t
*** 2210,2214 ****
--- 2210,2217 ----
  #define TARGET_RTX_COSTS xstormy16_rtx_costs
  #undef TARGET_ADDRESS_COST
  #define TARGET_ADDRESS_COST xstormy16_address_cost
+ 
+ #undef TARGET_BUILD_BUILTIN_VA_LIST_TYPE
+ #define TARGET_BUILD_BUILTIN_VA_LIST_TYPE xstormy16_build_builtin_va_list
  
  struct gcc_target targetm = TARGET_INITIALIZER;


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