From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnVXB-0002wW-Br for qemu-devel@nongnu.org; Fri, 05 Mar 2010 06:17:33 -0500 Received: from [199.232.76.173] (port=49883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnVXA-0002wL-I9 for qemu-devel@nongnu.org; Fri, 05 Mar 2010 06:17:32 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NnVXA-00045u-0T for qemu-devel@nongnu.org; Fri, 05 Mar 2010 06:17:32 -0500 Received: from mx20.gnu.org ([199.232.41.8]:13149) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NnVX9-00045c-QH for qemu-devel@nongnu.org; Fri, 05 Mar 2010 06:17:31 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NnVWi-0000Un-BM for qemu-devel@nongnu.org; Fri, 05 Mar 2010 06:17:04 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 3/3] tcg: declare internal helpers as const and pure Date: Fri, 5 Mar 2010 11:15:45 +0000 References: <1267739110-26400-1-git-send-email-aurelien@aurel32.net> <1267739110-26400-4-git-send-email-aurelien@aurel32.net> In-Reply-To: <1267739110-26400-4-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003051115.45657.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 > 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. 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. " Paul