From 07ea28b41830f946de3841b0ac61a3413679feb9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 30 May 2018 18:06:23 -0700 Subject: tcg: Pass tb and index to tcg_gen_exit_tb separately Do the cast to uintptr_t within the helper, so that the compiler can type check the pointer argument. We can also do some more sanity checking of the index argument. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- tcg/tcg.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tcg/tcg.h') diff --git a/tcg/tcg.h b/tcg/tcg.h index 08f8bbf..509f4d6 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -1239,9 +1239,10 @@ static inline unsigned get_mmuidx(TCGMemOpIdx oi) * to this default (which just calls the prologue.code emitted by * tcg_target_qemu_prologue()). */ -#define TB_EXIT_MASK 3 -#define TB_EXIT_IDX0 0 -#define TB_EXIT_IDX1 1 +#define TB_EXIT_MASK 3 +#define TB_EXIT_IDX0 0 +#define TB_EXIT_IDX1 1 +#define TB_EXIT_IDXMAX 1 #define TB_EXIT_REQUESTED 3 #ifdef HAVE_TCG_QEMU_TB_EXEC -- cgit v1.1