From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOAWt-00070g-Ov for qemu-devel@nongnu.org; Mon, 23 Sep 2013 14:06:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOAWn-00052X-QB for qemu-devel@nongnu.org; Mon, 23 Sep 2013 14:06:39 -0400 Received: from mail-vc0-x236.google.com ([2607:f8b0:400c:c03::236]:46234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOAWn-00052L-LD for qemu-devel@nongnu.org; Mon, 23 Sep 2013 14:06:33 -0400 Received: by mail-vc0-f182.google.com with SMTP id hf12so2379354vcb.41 for ; Mon, 23 Sep 2013 11:06:33 -0700 (PDT) Sender: Richard Henderson Message-ID: <52408324.3020301@twiddle.net> Date: Mon, 23 Sep 2013 11:06:28 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1379625908-27964-1-git-send-email-rth@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 00/16] TCG indirect registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel , Aurelien Jarno On 09/23/2013 10:23 AM, Blue Swirl wrote: > On Fri, Sep 20, 2013 at 12:24 AM, Richard Henderson wrote: >> >> This is an attempt to improve performance of target-sparc >> by exposing the windowed registers as TCG globals, and all >> the optimization that we can do there. >> >> This is done via allowing tcg_global_mem_new to be used >> with any base pointer, not just off of a fixed register. >> Thus the sparc windowed registers are globals off cpu_regwptr. > > Nice and simple. > > Would it be possible to eliminate regwptr and perform the calculation > of the effective register set during compile time? We could get rid of > register shuffling (memcpy32) and register access would be much > simpler. The downside would be that code which is called from > different register window level would need to be recompiled. An interesting idea. Yes, it would be possible to grab some bits from TB->flags and encode the register window setting. I suppose it all depends on how much overhead there is from the recompilation as opposed to the indirection + memcpys. r~