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]

Re: alpha memcpy-1 failure


On Sun, Aug 16, 1998 at 12:33:34AM -0600, Jeffrey A Law wrote:
> It's not real clear.  Various hunks of code treat it differently.  But
> principle of least suprise probably applies here I suspect.  So we should
> try to find out what code is not respecting UNSPEC_VOLATILE.
> 
> Can you track down who's cse-ing your code?

Twas indeed .jump2.  I think this is a more correct fix, as with a 
tiny bit of effort I think I could force the same problem at any
point in reload.


r~


	* reload.c (find_equiv_reg): Reject equivalences separated
	by a volatile instruction.

Index: reload.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload.c,v
retrieving revision 1.40
diff -u -p -r1.40 reload.c
--- reload.c	1998/07/09 10:06:18	1.40
+++ reload.c	1998/08/16 07:26:18
@@ -6198,12 +6198,17 @@ find_equiv_reg (goal, insn, class, other
 
       if (GET_RTX_CLASS (GET_CODE (p)) == 'i')
 	{
+	  pat = PATTERN (p);
+
+          /* Watch out for unspec_volatile, and volatile asms.  */
+          if (volatile_insn_p (pat))
+	    return 0;
+
 	  /* If this insn P stores in either GOAL or VALUE, return 0.
 	     If GOAL is a memory ref and this insn writes memory, return 0.
 	     If GOAL is a memory ref and its address is not constant,
 	     and this insn P changes a register used in GOAL, return 0.  */
 
-	  pat = PATTERN (p);
 	  if (GET_CODE (pat) == SET || GET_CODE (pat) == CLOBBER)
 	    {
 	      register rtx dest = SET_DEST (pat);


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