From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNBNV-0003sQ-1e for qemu-devel@nongnu.org; Thu, 19 May 2011 18:07:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNBNT-00028P-VR for qemu-devel@nongnu.org; Thu, 19 May 2011 18:07:32 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:65404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNBNT-00028L-Sc for qemu-devel@nongnu.org; Thu, 19 May 2011 18:07:31 -0400 Received: by gyg4 with SMTP id 4so1279148gyg.4 for ; Thu, 19 May 2011 15:07:31 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DD594A0.6040204@twiddle.net> Date: Thu, 19 May 2011 15:07:28 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1305671572-5899-1-git-send-email-jcmvbkbc@gmail.com> <1305671572-5899-23-git-send-email-jcmvbkbc@gmail.com> In-Reply-To: <1305671572-5899-23-git-send-email-jcmvbkbc@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 22/26] target-xtensa: implement SIMCALL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: qemu-devel@nongnu.org On 05/17/2011 03:32 PM, Max Filippov wrote: > +DEF_HELPER_0(simcall, void) > DEF_HELPER_0(dump_state, void) > > #include "def-helper.h" > diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c > index 3a0fa01..b170dbe 100644 > --- a/target-xtensa/op_helper.c > +++ b/target-xtensa/op_helper.c > @@ -291,6 +291,11 @@ void HELPER(wsr_lend)(uint32_t v) > } > } > > +void HELPER(simcall)(void) > +{ > + simcall(env); > +} > + You can explicitly pass env as an argument to the helper and avoid this wrapper function. See e.g. the ARM port and its many non-op_helper.c functions. r~