From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IQnFq-0005dU-VB for qemu-devel@nongnu.org; Thu, 30 Aug 2007 12:52:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IQnFp-0005bN-68 for qemu-devel@nongnu.org; Thu, 30 Aug 2007 12:52:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IQnFp-0005bF-2y for qemu-devel@nongnu.org; Thu, 30 Aug 2007 12:52:25 -0400 Received: from cantor2.suse.de ([195.135.220.15] helo=mx2.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IQnFo-0007Xz-8t for qemu-devel@nongnu.org; Thu, 30 Aug 2007 12:52:24 -0400 Date: Thu, 30 Aug 2007 18:52:19 +0200 (CEST) From: Michael Matz Subject: Re: [Qemu-devel] [patch] make qemu work with GCC 4 In-Reply-To: Message-ID: References: <200708291606.14173.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Alexander Graf Hi, On Wed, 29 Aug 2007, Michael Matz wrote: > > > I solved that by placing one of the T[012] operands into memory > > > for HOST_I386, thereby freeing one reg. Here's some justification > > > of why that doesn't really cost performance: with three free regs > > > GCC is already spilling like mad in the snippets, we just trade one > > > of those memory accesses (to stack) with one other mem access to > > > the cpu_state structure, which will be in cache. > > > > Do you have any evidence to support this claim? > > Not really, only an apple and orange comparison. A 10000 iteration > tests/sha1 run in the same Linux image, with -no-kqemu, on host and target > i386: time ./sha1 > > with qemu-0.8.2 (compiled by gcc 3.3-hammer): 7.92 seconds > with qemu-0.9.0-cvs (gcc4.1 compiled, with the patch): 8.15 seconds > > I'll try to get a better comparison. So, I've now compared our 0.9.0 package, once without patch compiled by 3.3-hammer, and once with patch and compiled by gcc 4.2: gcc33 compiled: 7.81 seconds (i.e. a bit faster than 0.8.2 was) gcc42 compiled: 8.07 seconds I.e. 3% slower. Ciao, Michael.