This is the mail archive of the 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]

Further frob_di_df_2 fix

This patch is effectively a continuation to the series in bug 27287.

On powerpc-none-linux-gnuspe --enable-e500_double,
gcc.c-torture/compile/20000405-1.c fails at -O, with frob_di_df_2
using %L with a memory operand whose address is of the form reg+reg.
Since reg+reg addresses cannot be further offset, this yields an ICE.

This patch uses a different instruction sequence in that case to avoid
the need to offset the reg+reg address further.  Tested with no
regressions with a cross to powerpc-none-linux-gnuspe.  OK to commit
to mainline, 4.2, 4.1?

2006-11-15  Joseph Myers  <>

	* config/rs6000/ (frob_di_df_2): Handle non-offsettable
	memory operand.

Index: gcc/config/rs6000/
--- gcc/config/rs6000/	(revision 118836)
+++ gcc/config/rs6000/	(working copy)
@@ -2223,6 +2223,11 @@
     case 0:
       return \"evmergehi %0,%1,%1\;mr %L0,%1\";
     case 1:
+      /* If the address is not offsettable we need to load the whole
+	 doubleword into a 64-bit register and then copy the high word
+	 to form the correct output layout.  */
+      if (!offsettable_nonstrict_memref_p (operands[1]))
+	return \"evldd%X1 %L0,%y1\;evmergehi %0,%L0,%L0\";
       /* If the low-address word is used in the address, we must load
 	it last.  Otherwise, load it first.  Note that we cannot have
 	auto-increment in that case since the address register is

Joseph S. Myers

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