From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56095 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwW13-0004hW-I3 for qemu-devel@nongnu.org; Mon, 07 Mar 2011 03:42:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwW11-00062B-Pm for qemu-devel@nongnu.org; Mon, 07 Mar 2011 03:42:09 -0500 Received: from hall.aurel32.net ([88.191.126.93]:38007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwW11-000623-L9 for qemu-devel@nongnu.org; Mon, 07 Mar 2011 03:42:07 -0500 Date: Mon, 7 Mar 2011 09:42:04 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 0/3] tcg: Support debugging leakage of temporaries Message-ID: <20110307084204.GD10503@volta.aurel32.net> References: <1298474376-20495-1-git-send-email-peter.maydell@linaro.org> <20110306181852.GF32068@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Sun, Mar 06, 2011 at 09:52:56PM +0000, Peter Maydell wrote: > On 6 March 2011 18:18, Aurelien Jarno wrote: > > On Wed, Feb 23, 2011 at 03:19:33PM +0000, Peter Maydell wrote: > >> This patchset removes the ad-hoc debug code in target-arm for > >> identifying cases where we leaked TCG temporary variables, in > >> favour of an implementation in tcg itself. > > > I am basically fine with this patch series modulo the small comment you > > made about patch 1. > > Thanks; I've sent a v2 which fixes that nit. > > > My only concern is that, given ARM code is quite > > sensitive to this kind of issue (there is no real rule if the caller or > > the callee should free the temp), that we forget to enable TCG debug to > > validate a patch. On the other hand I fully agree that this kind of > > check should not be done in "production" use. > > In the long term it would be good if we could make the ARM translate.c > less brittle like this. Can we at least define a rule for where we're > trying to get to so we can move in the right direction for new code? > > My suggestion would be that we should say that for gen_* functions > the callee should always have to free temps passed in as arguments. > This matches the convention for tcg_gen_$OP() and gen_helper_$WHATEVER(). > I don't mind whatever convention, but my understanding is that this doesn't match tcg_gen_$OP() and gen_helper_$WHATEVER(), which never free temps passed in arguments. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net