From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoPUC-0002PM-6x for qemu-devel@nongnu.org; Sun, 07 Mar 2010 18:02:12 -0500 Received: from [199.232.76.173] (port=50957 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoPUB-0002P7-RE for qemu-devel@nongnu.org; Sun, 07 Mar 2010 18:02:11 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NoPUA-0005N7-Vl for qemu-devel@nongnu.org; Sun, 07 Mar 2010 18:02:11 -0500 Received: from mx20.gnu.org ([199.232.41.8]:42622) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NoP9k-0002Ca-HS for qemu-devel@nongnu.org; Sun, 07 Mar 2010 17:41:04 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NoP9H-0002Hg-Sy for qemu-devel@nongnu.org; Sun, 07 Mar 2010 17:40:36 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 3/3] tcg: declare internal helpers as const and pure Date: Sun, 7 Mar 2010 22:39:12 +0000 References: <1267739110-26400-1-git-send-email-aurelien@aurel32.net> <201003051115.45657.paul@codesourcery.com> <20100305200731.GW10291@volta.aurel32.net> In-Reply-To: <20100305200731.GW10291@volta.aurel32.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003072239.13056.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Andrzej Zaborowski , Aurelien Jarno > On Fri, Mar 05, 2010 at 11:15:45AM +0000, Paul Brook wrote: > > > TCG internal helpers only access to the values passed in arguments, and > > > do not modify the CPU internal state. Thus they can be declared as > > > const and pure. > > > > I think this needs an explanatory comment. It's not immediately obvious > > that tcg_gen_helperN and tcg_gen_helper{32,64} have significantly > > different semantics. > > What do you mean exactly? Mentioning explicitly tcg_gen_helper{32,64} > instead of "TCG internal helpers". I think the difference between tcg_gen_helperN and tcg_gen_helper{32,64} is sufficiently subtle that it deserves documenting. It's not obvious that the latter may only be used for cont/pure helpers. My guess is that the FIXME you're removing was added precisely because there was uncertainty whether this assumption was reasonable, and under which circumstances they are used. Paul