compiling 2.5 kernel for ppc64

Alan Modra amodra at bigpond.net.au
Thu Mar 27 22:50:23 EST 2003


On Thu, Mar 27, 2003 at 09:07:55PM +1030, Alan Modra wrote:
>
> On Thu, Mar 27, 2003 at 01:29:02AM -0700, Gary Byers wrote:
> > This attempt failed; many files in the 2.5.66 source tree generated
> > spurious-looking errors to the effect that "`asm' operand requires
> > spurious reload".  (They seem spurious because - in the cases I
> > checked - there didn't seem to be any asm constructs anywhere
> > near/involved in the reported error.  I confess that I may not have
> > looked hard enough.)
>
> Look using gcc -E.  The following will fix your problem.
[snip]

Anton found this work-around a long time ago, and Linus refused
Anton's work-around, claiming it was a compiler bug.  At the time
I didn't bother delving into gcc to find out what was going on, but
your email piqued my curiousity.  Guess what?  Linus is right..

--- gcc-ppc64-33.orig/gcc/reload1.c	2003-03-27 22:11:53.000000000 +1030
+++ gcc-ppc64-33/gcc/reload1.c	2003-03-27 22:12:14.000000000 +1030
@@ -3930,6 +3930,7 @@ reload_as_needed (live_known)
 	      if (asm_noperands (PATTERN (insn)) >= 0)
 		for (p = NEXT_INSN (prev); p != next; p = NEXT_INSN (p))
 		  if (p != insn && INSN_P (p)
+		      && GET_CODE (PATTERN (p)) != USE
 		      && (recog_memoized (p) < 0
 			  || (extract_insn (p), ! constrain_operands (1))))
 		    {

--
Alan Modra
IBM OzLabs - Linux Technology Centre

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list