From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDIDS-0007Hp-4l for qemu-devel@nongnu.org; Thu, 29 Mar 2012 12:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDIDQ-0005Z0-DE for qemu-devel@nongnu.org; Thu, 29 Mar 2012 12:28:49 -0400 Received: from mail-qa0-f45.google.com ([209.85.216.45]:47052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDIDQ-0005Yg-6L for qemu-devel@nongnu.org; Thu, 29 Mar 2012 12:28:48 -0400 Received: by qaeb19 with SMTP id b19so312558qae.11 for ; Thu, 29 Mar 2012 09:28:46 -0700 (PDT) Sender: Richard Henderson Message-ID: <4F748DBA.2040700@twiddle.net> Date: Thu, 29 Mar 2012 12:28:42 -0400 From: Richard Henderson MIME-Version: 1.0 References: <201203261405.13760.paul@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/6] ARM: AREG0 conversion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Desnogues Cc: Peter Maydell , qemu-devel , Blue Swirl , Paul Brook , =?ISO-8859-1?Q?Llu=EDs_Vilan?= =?ISO-8859-1?Q?ova?= , Artyom Tarasenko On 03/29/2012 11:42 AM, Laurent Desnogues wrote: > That will indeed probably make the real problem, which is that > this patch increases the size of generated code, less obvious > on small benchmarks that don't put pressure on instruction > cache. But the fact is that generated code is larger and will > have to execute more instructions, so no matter what you do, > this will have an impact on speed. While this is true, the benefit of using a more standard calling convention on reliability and debug-ability is enormous. Consider the i686 host, where we currently obscond with EBP. While I'm not aware of any current problems with -O0 or spill failures under optimization, it's not inconceivable. Consider sparc-linux host, where we have *no* call-saved global register at all, and (currently) try very hard to use a call- clobbered global register, with occasionally disastrous results. See the patch set I posted recently where I give up on this entirely and make sparc use a TLS variable instead of a hard register at all. This regresses the Sparc host on speed for a progression in reliability. The conversion to explicit env arguments fixes essentially all of the speed regression since we then receive ENV in %o0 instead of having to read from TLS. r~