From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpauth04.mail.atl.earthlink.net (smtpauth04.mail.atl.earthlink.net [209.86.89.64]) by ozlabs.org (Postfix) with ESMTP id CCEE167F79 for ; Tue, 9 Aug 2005 12:40:22 +1000 (EST) In-Reply-To: <20050809005050.GF3187@smtp.west.cox.net> References: <20050803131848.GA10954@janus> <1123148649.30257.59.camel@gaston> <20050809005050.GF3187@smtp.west.cox.net> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Hollis Blanchard Date: Mon, 8 Aug 2005 21:20:33 -0500 To: Tom Rini Cc: Linux PPC Dev Subject: Re: bug in arch/ppc/boot/common/util.S: cmplwi cr0,r3,r4 ? List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Aug 8, 2005, at 7:50 PM, Tom Rini wrote: > On Thu, Aug 04, 2005 at 11:44:08AM +0200, Benjamin Herrenschmidt wrote: >> On Wed, 2005-08-03 at 15:18 +0200, Frank van Maarseveen wrote: >>> I think "cmplwi" expects an immediate vale as last operand >>> around line 255 of arch/ppc/boot/common/util.S: >>> >>> addi r4,r4,_etext@l # r8 = &_etext >>> 1: dcbf r0,r3 # Flush the data cache >>> icbi r0,r3 # Invalidate the instruction cache >>> addi r3,r3,0x10 # Increment by one cache line >>> cmplwi cr0,r3,r4 # Are we at the end yet? >>> ^^ >>> blt 1b # No, keep flushing and invalidating >>> >>> I guess it should have been: >>> >>> cmplw cr0,r3,r4 # Are we at the end yet? >> >> Yup, looks like a real bug to me, Tom ? > > Sounds correct to me. I wonder why the assembler hasn't barfed, or is > is translating the ascii values of r4. include/asm-ppc/ppc_asm.h: #define r4 4 Unfortunately -mregnames is quite stupid, so that wouldn't have helped us here either. -Hollis