aboutsummaryrefslogtreecommitdiff
path: root/translate-all.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-26 05:15:23 +0200
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:20:46 +0100
commit99df7dce8ae81e4a42dac98094ccca3a32dcf8f8 (patch)
tree5dab3291d05db83495f2ce14575ed6604a72762f /translate-all.c
parent93afeade09680c657e109bf192dbf70233e4ebbe (diff)
cpu: Move can_do_io field from CPU_COMMON to CPUState
Rename can_do_io() to cpu_can_do_io() and change argument to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'translate-all.c')
-rw-r--r--translate-all.c5
1 files changed, 3 insertions, 2 deletions
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");
}