]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commitdiff
tcg: TCG targets may define tcg_qemu_tb_exec
authorStefan Weil <sw@weilnetz.de>
Fri, 30 Sep 2011 19:23:06 +0000 (21:23 +0200)
committerStefan Weil <weil@mail.berlios.de>
Mon, 31 Oct 2011 20:52:16 +0000 (21:52 +0100)
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.

Cc: malc <av1474@comtv.ru>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
tcg/ppc/tcg-target.h
tcg/tcg.h

index 5c2d61294fde5b26bdeb216ec581e777038290d0..25a6ea4edc5d21635fb601a9632bb9f8a233644c 100644 (file)
@@ -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)
index 015f88ae69c8c59ea1ead0fb9cfdc13afbdc512f..ca480751754b67fa100b434e989d89417c17137f 100644 (file)
--- 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