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]

[patch] Fix vararg addressing for the v850


This patch corrects a problem with generating code for
varargs on the v850.  The incorrect stack address was
being generated.  I ran the gcc torture tests for the
v850-elf and I no longer have vararg-related failures.
Okay to install?

2001-07-25  Catherine Moore  <clm@redhat.com>

	* config/v850/v850.c (v850_va_arg):  Use addr
	instead of valist to build incr.

Index: v850.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/v850/v850.c,v
retrieving revision 1.46
diff -p -r1.46 v850.c
*** v850.c      2001/07/11 20:35:55     1.46
--- v850.c      2001/07/25 17:48:04
*************** v850_va_arg (valist, type)
*** 2778,2784 ****
      }
  
    addr = save_expr (valist);
!   incr = fold (build (PLUS_EXPR, ptr_type_node, valist,
                      build_int_2 (rsize, 0)));
  
    incr = build (MODIFY_EXPR, ptr_type_node, valist, incr);
--- 2778,2784 ----
      }
  
    addr = save_expr (valist);
!   incr = fold (build (PLUS_EXPR, ptr_type_node, addr,
                      build_int_2 (rsize, 0)));
  
    incr = build (MODIFY_EXPR, ptr_type_node, valist, incr);


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