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]

minor Xtensa cleanup


This patch removes a global variable that is no longer needed, if indeed it ever was needed. I built and tested an xtensa-elf target with no problems. Committed on the mainline.


2004-03-18 Bob Wilson <bob.wilson@acm.org>


	* config/xtensa/xtensa.c (current_function_arg_words): Delete.
	(xtensa_builtin_saveregs): Use current_function_args_info.arg_words.
	(xtensa_va_start): Remove assignment to current_function_arg_words.


Index: xtensa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.c,v
retrieving revision 1.54
diff -u -p -r1.54 xtensa.c
--- xtensa.c	12 Mar 2004 10:03:32 -0000	1.54
+++ xtensa.c	18 Mar 2004 01:29:10 -0000
@@ -212,7 +212,6 @@ static bool xtensa_rtx_costs (rtx, int, 
 static tree xtensa_build_builtin_va_list (void);
 static bool xtensa_return_in_memory (tree, tree);
 
-static int current_function_arg_words;
 static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
   REG_ALLOC_ORDER;
 
@@ -2392,7 +2391,7 @@ static rtx
 xtensa_builtin_saveregs (void)
 {
   rtx gp_regs, dest;
-  int arg_words = current_function_arg_words;
+  int arg_words = current_function_args_info.arg_words;
   int gp_left = MAX_ARGS_IN_REGISTERS - arg_words;
 
   if (gp_left <= 0)
@@ -2438,7 +2437,6 @@ xtensa_va_start (tree valist, rtx nextar
   ndx = build (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx);
 
   /* Call __builtin_saveregs; save the result in __va_reg */
-  current_function_arg_words = arg_words;
   u = make_tree (ptr_type_node, expand_builtin_saveregs ());
   t = build (MODIFY_EXPR, ptr_type_node, reg, u);
   TREE_SIDE_EFFECTS (t) = 1;

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