Merge remote-tracking branch 'unicorn-engine/master' into msvc_native

This commit is contained in:
xorstream
2017-01-20 22:37:51 +11:00
32 changed files with 7 additions and 1189 deletions

View File

@ -67,9 +67,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
struct hook *hook;
/* This must be volatile so it is not trashed by longjmp() */
volatile bool have_tb_lock = false;
if (cpu->halted) {
if (!cpu_has_work(cpu)) {
return EXCP_HALTED;
@ -209,8 +206,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
cpu->exception_index = EXCP_INTERRUPT;
cpu_loop_exit(cpu);
}
spin_lock(&tcg_ctx->tb_ctx.tb_lock);
have_tb_lock = true;
tb = tb_find_fast(env); // qq
if (!tb) { // invalid TB due to invalid code?
uc->invalid_error = UC_ERR_FETCH_UNMAPPED;
@ -233,8 +228,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
tb_add_jump((TranslationBlock *)(next_tb & ~TB_EXIT_MASK),
next_tb & TB_EXIT_MASK, tb);
}
have_tb_lock = false;
spin_unlock(&tcg_ctx->tb_ctx.tb_lock);
/* cpu_interrupt might be called while translating the
TB, but before it is linked into a potentially
@ -276,10 +269,6 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
#ifdef TARGET_I386
x86_cpu = X86_CPU(uc, cpu);
#endif
if (have_tb_lock) {
spin_unlock(&tcg_ctx->tb_ctx.tb_lock);
have_tb_lock = false;
}
}
} /* for(;;) */