From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NndoH-0001xx-0o for qemu-devel@nongnu.org; Fri, 05 Mar 2010 15:07:45 -0500 Received: from [199.232.76.173] (port=44748 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NndoG-0001xW-Fc for qemu-devel@nongnu.org; Fri, 05 Mar 2010 15:07:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NndoE-0005Z0-VL for qemu-devel@nongnu.org; Fri, 05 Mar 2010 15:07:44 -0500 Received: from hall.aurel32.net ([88.191.82.174]:51366) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NndoE-0005Yd-KX for qemu-devel@nongnu.org; Fri, 05 Mar 2010 15:07:42 -0500 Date: Fri, 5 Mar 2010 21:07:31 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 3/3] tcg: declare internal helpers as const and pure Message-ID: <20100305200731.GW10291@volta.aurel32.net> References: <1267739110-26400-1-git-send-email-aurelien@aurel32.net> <1267739110-26400-4-git-send-email-aurelien@aurel32.net> <201003051115.45657.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <201003051115.45657.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Andrzej Zaborowski , qemu-devel@nongnu.org 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". > tcg/README also needs updating, specifically: > > "* Helpers: > > Using the tcg_gen_helper_x_y it is possible to call any function > taking i32, i64 or pointer types. Before calling an helper, all > globals are stored at their canonical location and it is assumed that > the function can modify them. In the future, function modifiers will > be allowed to tell that the helper does not read or write some globals. > " > Fully agreed, but it is not a change introduce by this patch series. I'll submit a patch later. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net