From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKEt0-0005gC-8o for qemu-devel@nongnu.org; Wed, 11 May 2011 15:15:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKEsz-0000fD-1o for qemu-devel@nongnu.org; Wed, 11 May 2011 15:15:54 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:57785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKEsy-0000f9-UX for qemu-devel@nongnu.org; Wed, 11 May 2011 15:15:53 -0400 Received: by qwj8 with SMTP id 8so487212qwj.4 for ; Wed, 11 May 2011 12:15:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87hb9184jk.fsf@ginnungagap.bsc.es> References: <201105102228.37340.paul@codesourcery.com> <87hb9184jk.fsf@ginnungagap.bsc.es> From: Blue Swirl Date: Wed, 11 May 2011 22:15:32 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] TCG: AREG0 removal planning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, May 11, 2011 at 9:39 PM, Llu=C3=ADs wrote: > Blue Swirl writes: > >> On Wed, May 11, 2011 at 12:28 AM, Paul Brook wro= te: >>> In practice generated code probably accesses CPUState often enough that= a >>> dedicated register isn't a bad idea. =C2=A0My guess is that eliminating= it from C >>> code gets us almost all of the useful benefit. =C2=A0Removing it from t= he code >>> generator (i.e. TCG_AREG0) may be more pain that it's worth. > >> I don't think moving the helpers from op_helper.c to helper.c will be >> a performance win if AREG0 is not eliminated. The code gets to use one >> register more, but AREG0 needs to be moved to a function argument >> register in most cases and AREG0 has to be restored. I think the >> benefit should come from generated code getting one more available >> register. > > So, it all boils down to the amount of register spilling that can be > avoided in TCG-generated code when eliminating the reserved register for > AREG0. Am I right? For the generated code, yes.