From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl4z5-0002c8-HT for qemu-devel@nongnu.org; Fri, 26 Feb 2010 13:32:19 -0500 Received: from [199.232.76.173] (port=41016 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl4z5-0002bp-28 for qemu-devel@nongnu.org; Fri, 26 Feb 2010 13:32:19 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nl4z4-0005gl-EI for qemu-devel@nongnu.org; Fri, 26 Feb 2010 13:32:18 -0500 Received: from mx20.gnu.org ([199.232.41.8]:40662) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nl4z4-0005gh-7F for qemu-devel@nongnu.org; Fri, 26 Feb 2010 13:32:18 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nl4z2-0001og-P8 for qemu-devel@nongnu.org; Fri, 26 Feb 2010 13:32:17 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 0/2] simplify global register save/restore Date: Fri, 26 Feb 2010 18:32:01 +0000 References: <1265844362-29836-1-git-send-email-pbonzini@redhat.com> <201002261130.30888.paul@codesourcery.com> <4B87C724.1030507@redhat.com> In-Reply-To: <4B87C724.1030507@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201002261832.01836.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org > On 02/26/2010 12:30 PM, Paul Brook wrote: > >> Since b567b38 (target-arm: remove T0 and T1, 2009-10-16) the only global > >> register that is actually used is AREG0, so the complexity of > >> hostregs_helper.h is unwarranted. > >> > >> Let's just say that env should be the only global register. AREG1 and > >> AREG2 in principle could still be used to work around bad register > >> allocation in GCC, so I'm leaving them in dyngen-exec.h. > > > > I think AREG[12] should be removed too. If we aren't saving them then > > they can't be safely used. > > You could still use them for local register variables, but I can prepare > a patch to remove them (unless you do that yourself). I'm not sure what you mean by a "local register variable". If you're entirely within TCG then the AREG defines aren't used anyway. If you're communicating between TCG and C helpers then you need the cpu-exec.c save/restore. I suspect you're thinking of TCG_AREG[12] in tcg-target.h. We should probably remove those and allow the register allocator to reclaim those registers. Paul