From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGzuO-0001SW-Hh for qemu-devel@nongnu.org; Thu, 20 Oct 2011 17:12:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGzuN-00030m-2S for qemu-devel@nongnu.org; Thu, 20 Oct 2011 17:12:12 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:34940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGzuM-00030J-HJ for qemu-devel@nongnu.org; Thu, 20 Oct 2011 17:12:10 -0400 From: Stefan Weil Date: Thu, 20 Oct 2011 23:11:20 +0200 Message-Id: <1319145085-10561-2-git-send-email-sw@weilnetz.de> In-Reply-To: <1319145085-10561-1-git-send-email-sw@weilnetz.de> References: <1319145085-10561-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH v2 1/6] tcg: TCG targets may define tcg_qemu_tb_exec List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil Targets may use a non standard definition of tcg_tb_exec by defining this macro in their tcg_target.h. This is used here by ppc. It will be used by the TCG interpreter, too. Signed-off-by: Stefan Weil --- tcg/ppc/tcg-target.h | 4 ++++ tcg/tcg.h | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index 5c2d612..25a6ea4 100644 --- a/tcg/ppc/tcg-target.h +++ b/tcg/ppc/tcg-target.h @@ -96,3 +96,7 @@ enum { #define TCG_AREG0 TCG_REG_R27 #define TCG_TARGET_HAS_GUEST_BASE + +#define tcg_qemu_tb_exec(env, tb_ptr) \ + ((long REGPARM __attribute__ ((longcall)) \ + (*)(void *, void *))code_gen_prologue)(env, tb_ptr) diff --git a/tcg/tcg.h b/tcg/tcg.h index 983d59e..811e312 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -584,10 +584,9 @@ TCGv_i32 tcg_const_local_i32(int32_t val); TCGv_i64 tcg_const_local_i64(int64_t val); extern uint8_t code_gen_prologue[]; -#if defined(_ARCH_PPC) && !defined(_ARCH_PPC64) -#define tcg_qemu_tb_exec(env, tb_ptr) \ - ((long REGPARM __attribute__ ((longcall)) (*)(void *, void *))code_gen_prologue)(env, tb_ptr) -#else -#define tcg_qemu_tb_exec(env, tb_ptr) \ + +/* TCG targets may use a different definition of tcg_qemu_tb_exec. */ +#if !defined(tcg_qemu_tb_exec) +# define tcg_qemu_tb_exec(env, tb_ptr) \ ((long REGPARM (*)(void *, void *))code_gen_prologue)(env, tb_ptr) #endif -- 1.7.2.5