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]

[patch] rfa fix alignment of fp register saves


I can't get this to trip with current mainline - likely because of the
rewrite of the varargs bits.  I could get this to trip with a locally
modified 3.4 version. This caused an ICE as we tried to save (reg:DF
fp_reg) to memory, and then creating an SI mode subreg after determining
that it was an unaligned access - obviously illegal.

This makes it an obvious commit, but I thought I'd bring it up since
we're in stage 3. I'd like to apply it to 3.4 as well if that's
possible.

OK?

-eric

-- 
Eric Christopher <echristo@redhat.com>

2004-10-21  Eric Christopher  <echristo@redhat.com>

	* config/rs6000/rs6000.c (setup_incoming_varargs): Align DFmode
	saves.

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/cvsfiles/gnupro/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.12
diff -u -p -w -r1.12 rs6000.c
--- gcc/config/rs6000/rs6000.c	16 Sep 2004 21:43:02 -0000	1.12
+++ gcc/config/rs6000/rs6000.c	22 Oct 2004 05:29:52 -0000
@@ -4780,6 +4780,7 @@ setup_incoming_varargs (CUMULATIVE_ARGS 
 	{
 	  mem = gen_rtx_MEM (DFmode, plus_constant (save_area, off));
           set_mem_alias_set (mem, set);
+	  set_mem_align (mem, GET_MODE_ALIGNMENT (DFmode));
 	  emit_move_insn (mem, gen_rtx_REG (DFmode, fregno));
 	  fregno++;
 	  off += 8;



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