TF flag support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@144 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
631271d716
commit
cabb4d616d
@ -440,6 +440,7 @@ void cpu_x86_dump_state(CPUX86State *env, FILE *f, int flags);
|
|||||||
#define GEN_FLAG_ST_SHIFT 4
|
#define GEN_FLAG_ST_SHIFT 4
|
||||||
#define GEN_FLAG_CPL_SHIFT 7
|
#define GEN_FLAG_CPL_SHIFT 7
|
||||||
#define GEN_FLAG_IOPL_SHIFT 9
|
#define GEN_FLAG_IOPL_SHIFT 9
|
||||||
|
#define GEN_FLAG_TF_SHIFT 11
|
||||||
|
|
||||||
int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size,
|
int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size,
|
||||||
int *gen_code_size_ptr,
|
int *gen_code_size_ptr,
|
||||||
|
@ -371,6 +371,7 @@ int cpu_x86_exec(CPUX86State *env1)
|
|||||||
flags |= (3 << GEN_FLAG_CPL_SHIFT);
|
flags |= (3 << GEN_FLAG_CPL_SHIFT);
|
||||||
}
|
}
|
||||||
flags |= (env->eflags & IOPL_MASK) >> (12 - GEN_FLAG_IOPL_SHIFT);
|
flags |= (env->eflags & IOPL_MASK) >> (12 - GEN_FLAG_IOPL_SHIFT);
|
||||||
|
flags |= (env->eflags & TF_MASK) << (GEN_FLAG_TF_SHIFT - 8);
|
||||||
cs_base = env->seg_cache[R_CS].base;
|
cs_base = env->seg_cache[R_CS].base;
|
||||||
pc = cs_base + env->eip;
|
pc = cs_base + env->eip;
|
||||||
tb = tb_find(&ptb, (unsigned long)pc, (unsigned long)cs_base,
|
tb = tb_find(&ptb, (unsigned long)pc, (unsigned long)cs_base,
|
||||||
|
Loading…
Reference in New Issue
Block a user