From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IllP0-0001D6-B3 for qemu-devel@nongnu.org; Sat, 27 Oct 2007 09:08:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IllOy-0001CC-TC for qemu-devel@nongnu.org; Sat, 27 Oct 2007 09:08:34 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IllOy-0001C9-OA for qemu-devel@nongnu.org; Sat, 27 Oct 2007 09:08:32 -0400 Received: from relay01.mx.bawue.net ([193.7.176.67]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IllOy-0007Pd-AH for qemu-devel@nongnu.org; Sat, 27 Oct 2007 09:08:32 -0400 Date: Sat, 27 Oct 2007 14:08:15 +0100 From: Thiemo Seufer Subject: Re: [Qemu-devel] Mips 64 emulation not compiling Message-ID: <20071027130815.GJ29176@networkno.de> References: <1193222474.16781.236.camel@rapid> <20071027111939.GH29176@networkno.de> <1193487891.16781.280.camel@rapid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1193487891.16781.280.camel@rapid> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "J. Mayer" Cc: qemu-devel J. Mayer wrote: > > On Sat, 2007-10-27 at 12:19 +0100, Thiemo Seufer wrote: > > J. Mayer wrote: > > > The latest patches in clo makes gcc 3.4.6 fail to build the mips64 > > > targets on my amd64 host (looks like an register allocation clash in the > > > optimizer code). > > > > Your version is likely faster as well. > > > > > Furthermore, the clz micro-op for Mips seems very suspect to me, > > > according to the changes made in the clo implementation. > > > > It is correct, the sign-extension are zero in that case. > > OK, you know better than me... > > > > I did change the clz / clo implementation to use the same code as the > > > one used for the PowerPC implementation. It seems to me that the result > > > would be correct... And it compiles... > > > > > > Please take a look to the folowing patch: > > > > We have now clz/clo in several places, so I expanded your patch a > > bit. For now it is only used for the mips target. Comments? > > I fully aggree with the idea of sharing this code, if it's OK according > to all targets specifications. Please commit and I'll update PowerPC and > Alpha target to use them. > Oh, I did an optimisation for clz64 used on 32 bits host, avoiding use > of 64 bits logical operations: [snip: a lot more nifty things] > If you prefer, I can add those shared functions (ctz32, ctz64, cto32, > cto64, ctpop32, ctpop64) later, as they do not seem as widely used as > clxxx functions. For now I just committed the patch. Feel free to enhance it as you see fit. :-) Thiemo