From 99df7dce8ae81e4a42dac98094ccca3a32dcf8f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 26 Aug 2013 05:15:23 +0200 Subject: cpu: Move can_do_io field from CPU_COMMON to CPUState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename can_do_io() to cpu_can_do_io() and change argument to CPUState. Signed-off-by: Andreas Färber --- translate-all.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'translate-all.c') diff --git a/translate-all.c b/translate-all.c index dc35caab8e..a1af5ef393 100644 --- a/translate-all.c +++ b/translate-all.c @@ -200,6 +200,7 @@ int cpu_gen_code(CPUArchState *env, TranslationBlock *tb, int *gen_code_size_ptr static int cpu_restore_state_from_tb(TranslationBlock *tb, CPUArchState *env, uintptr_t searched_pc) { + CPUState *cpu = ENV_GET_CPU(env); TCGContext *s = &tcg_ctx; int j; uintptr_t tc_ptr; @@ -218,7 +219,7 @@ static int cpu_restore_state_from_tb(TranslationBlock *tb, CPUArchState *env, /* Reset the cycle counter to the start of the block. */ env->icount_decr.u16.low += tb->icount; /* Clear the IO flag. */ - env->can_do_io = 0; + cpu->can_do_io = 0; } /* find opc index corresponding to search_pc */ @@ -1409,7 +1410,7 @@ static void tcg_handle_interrupt(CPUState *cpu, int mask) if (use_icount) { env->icount_decr.u16.high = 0xffff; - if (!can_do_io(env) + if (!cpu_can_do_io(cpu) && (mask & ~old_mask) != 0) { cpu_abort(env, "Raised interrupt while not in I/O function"); } -- cgit v1.2.1