Commit cabb4d616d47300a65062eb07142738b1cd35563

Authored by bellard
1 parent 631271d7

TF flag support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@144 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 2 additions and 0 deletions
cpu-i386.h
... ... @@ -440,6 +440,7 @@ void cpu_x86_dump_state(CPUX86State *env, FILE *f, int flags);
440 440 #define GEN_FLAG_ST_SHIFT 4
441 441 #define GEN_FLAG_CPL_SHIFT 7
442 442 #define GEN_FLAG_IOPL_SHIFT 9
  443 +#define GEN_FLAG_TF_SHIFT 11
443 444  
444 445 int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size,
445 446 int *gen_code_size_ptr,
... ...
exec-i386.c
... ... @@ -371,6 +371,7 @@ int cpu_x86_exec(CPUX86State *env1)
371 371 flags |= (3 << GEN_FLAG_CPL_SHIFT);
372 372 }
373 373 flags |= (env->eflags & IOPL_MASK) >> (12 - GEN_FLAG_IOPL_SHIFT);
  374 + flags |= (env->eflags & TF_MASK) << (GEN_FLAG_TF_SHIFT - 8);
374 375 cs_base = env->seg_cache[R_CS].base;
375 376 pc = cs_base + env->eip;
376 377 tb = tb_find(&ptb, (unsigned long)pc, (unsigned long)cs_base,
... ...