From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsJ23-00034v-0K for qemu-devel@nongnu.org; Fri, 10 Apr 2009 11:52:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsJ1y-00032x-H6 for qemu-devel@nongnu.org; Fri, 10 Apr 2009 11:52:42 -0400 Received: from [199.232.76.173] (port=58528 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsJ1y-00032t-8U for qemu-devel@nongnu.org; Fri, 10 Apr 2009 11:52:38 -0400 Received: from mx20.gnu.org ([199.232.41.8]:23171) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LsJ1x-0002GP-K7 for qemu-devel@nongnu.org; Fri, 10 Apr 2009 11:52:37 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsJ1w-0006Mu-2w for qemu-devel@nongnu.org; Fri, 10 Apr 2009 11:52:36 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on startup Date: Fri, 10 Apr 2009 16:52:31 +0100 References: <20090410085406.GA15094@volta.aurel32.net> <200904101620.10589.paul@codesourcery.com> <49DF664E.2080607@aurel32.net> In-Reply-To: <49DF664E.2080607@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904101652.31884.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno > I am trying to fix the following comment from Fabrice (tcg.c) > > /* XXX: for load/store we could do that only for the slow path > (i.e. when a memory callback is called) */ > > The idea is not to do register allocation/spilling in tcg-target.c, but > to save registers containing TCG globals to memory in the slow path only > and without touching the TCGTemp structure. That's why it has to be done > in tcg-target.c Hmm, you don't actually have to allocate a slot, just you need to stash the values somewhere while you're making the slow call, then restore them afterwards. The bits that do need writing back to home locations (i.e. visible guest cpu state) already have memory locations. Paul