Skip to content

Commit

Permalink
tcg: TCG targets may define tcg_qemu_tb_exec
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil authored and Stefan Weil committed Oct 31, 2011
1 parent ff74c5a commit ce285b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions tcg/ppc/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
9 changes: 4 additions & 5 deletions tcg/tcg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ce285b1

Please sign in to comment.