From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHiTJ-0005ew-WC for qemu-devel@nongnu.org; Wed, 04 May 2011 16:14:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHiTJ-0007BO-4g for qemu-devel@nongnu.org; Wed, 04 May 2011 16:14:57 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:64564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHiTI-0007BD-UZ for qemu-devel@nongnu.org; Wed, 04 May 2011 16:14:57 -0400 Received: by pwi6 with SMTP id 6so827585pwi.4 for ; Wed, 04 May 2011 13:14:55 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DC1B204.9040501@twiddle.net> Date: Wed, 04 May 2011 13:07:32 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1304470768-16924-1-git-send-email-jcmvbkbc@gmail.com> <1304470768-16924-20-git-send-email-jcmvbkbc@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 20/28] target-xtensa: implement windowed registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Max Filippov , qemu-devel@nongnu.org On 05/04/2011 12:35 PM, Blue Swirl wrote: > On Wed, May 4, 2011 at 3:59 AM, Max Filippov wrote: >> See ISA, 4.7.1 for details. >> >> Physical registers and currently visible window are separate fields in >> CPUEnv. Only current window is accessible to TCG. On operations that >> change window base helpers copy current window to and from physical >> registers. > > I'm not sure how the register windows work, but maybe you could use > the same trick used for Sparc. There is a pool of registers > (env->regbase[]), a register window pointer (env->regwptr, > cpu_regwptr) tracks which are the currently accessible ones. The > advantage is to avoid copying (not entirely for Sparc due to the > window overlap). Sparc loses out on some TCG optimizations because of that, although to be fair the most effective of these are still in Aurlien's trees. That said, I still would not recommend a new port to follow suit. r~