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]

[3.3/mainline] Fix x86-64 varargs


Hi,
I've bootstrapped/regtested and installed the attached fix.  In the case
where temporary space is needed we used to produce invalid instruction
as we overwrite address variable via stack slot address.

Honza

Sat Jun 21 13:37:26 CEST 2003  Jan Hubicka  <jh@suse.cz>
	* i386.c (ix86_va_arg): Fix allocation of temporary slot.
*** i386.c	Wed Jun 11 17:23:18 2003
--- /aux/hubicka/hammer/gcc/gcc/config/i386/i386.c	Tue Jun 17 21:44:49 2003
*************** ix86_va_arg (valist, type)
*** 2884,2893 ****
  	{
  	  int i;
  	  rtx mem;
  
  	  /* Never use the memory itself, as it has the alias set.  */
! 	  addr_rtx = XEXP (assign_temp (type, 0, 1, 0), 0);
! 	  mem = gen_rtx_MEM (BLKmode, addr_rtx);
  	  set_mem_alias_set (mem, get_varargs_alias_set ());
  	  set_mem_align (mem, BITS_PER_UNIT);
  
--- 2972,2983 ----
  	{
  	  int i;
  	  rtx mem;
+ 	  rtx x;
  
  	  /* Never use the memory itself, as it has the alias set.  */
! 	  x = XEXP (assign_temp (type, 0, 1, 0), 0);
! 	  mem = gen_rtx_MEM (BLKmode, x);
! 	  force_operand (x, addr_rtx);
  	  set_mem_alias_set (mem, get_varargs_alias_set ());
  	  set_mem_align (mem, BITS_PER_UNIT);
  


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