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]

SPARC: fix struct-layout-1 failures in 64-bit mode


As diagnosed by RTH, the SPARC back-end was expecting the 
instantiate_virtual_regs machinery to fix invalid addresses of stack slots.  
That's no longer true.

Tested on sparc64-sun-solaris2.9, applied to mainline.  It fixes:

FAIL: tmpdir-gcc.dg-struct-layout-1/t007 c_compat_y_tst.o compile
FAIL: tmpdir-gcc.dg-struct-layout-1/t020 c_compat_y_tst.o compile
FAIL: tmpdir-gcc.dg-struct-layout-1/t022 c_compat_y_tst.o compile
FAIL: tmpdir-gcc.dg-struct-layout-1/t023 c_compat_y_tst.o compile
FAIL: tmpdir-gcc.dg-struct-layout-1/t024 c_compat_y_tst.o compile


2005-05-22  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* config/sparc/sparc.c (sparc_emit_float_lib_cmp): Use
	emit_move_insn for moves to TFmode stack slots.


-- 
Eric Botcazou
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.370
diff -u -p -r1.370 sparc.c
--- config/sparc/sparc.c	12 May 2005 11:43:01 -0000	1.370
+++ config/sparc/sparc.c	21 May 2005 19:51:08 -0000
@@ -5805,7 +5905,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, 
       if (GET_CODE (x) != MEM)
 	{
 	  slot0 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
-	  emit_insn (gen_rtx_SET (VOIDmode, slot0, x));
+	  emit_move_insn (slot0, x);
 	}
       else
 	slot0 = x;
@@ -5813,7 +5913,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, 
       if (GET_CODE (y) != MEM)
 	{
 	  slot1 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
-	  emit_insn (gen_rtx_SET (VOIDmode, slot1, y));
+	  emit_move_insn (slot1, y);
 	}
       else
 	slot1 = y;

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