From cd42d5b23691ad73edfd6dbcfc935a960a9c5a65 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 26 Nov 2014 13:40:05 +0300 Subject: gen-icount: check cflags instead of use_icount global Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Signed-off-by: Paolo Bonzini --- include/exec/gen-icount.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/exec/gen-icount.h') diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index da53395de6..221aad0bfd 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -9,7 +9,7 @@ static TCGArg *icount_arg; static int icount_label; static int exitreq_label; -static inline void gen_tb_start(void) +static inline void gen_tb_start(TranslationBlock *tb) { TCGv_i32 count; TCGv_i32 flag; @@ -21,7 +21,7 @@ static inline void gen_tb_start(void) tcg_gen_brcondi_i32(TCG_COND_NE, flag, 0, exitreq_label); tcg_temp_free_i32(flag); - if (!use_icount) + if (!(tb->cflags & CF_USE_ICOUNT)) return; icount_label = gen_new_label(); @@ -43,7 +43,7 @@ static void gen_tb_end(TranslationBlock *tb, int num_insns) gen_set_label(exitreq_label); tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_REQUESTED); - if (use_icount) { + if (tb->cflags & CF_USE_ICOUNT) { *icount_arg = num_insns; gen_set_label(icount_label); tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_ICOUNT_EXPIRED); -- cgit v1.2.3