diff options
Diffstat (limited to 'translate-i386.c')
-rw-r--r-- | translate-i386.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/translate-i386.c b/translate-i386.c index 5cbaa813ce..b7a7cdc207 100644 --- a/translate-i386.c +++ b/translate-i386.c @@ -1395,6 +1395,10 @@ long disas_insn(DisasContext *s, uint8_t *pc_start) s->aflag = aflag; s->dflag = dflag; + /* lock generation */ + if (prefixes & PREFIX_LOCK) + gen_op_lock(); + /* now check op code */ reswitch: switch(b) { @@ -3153,8 +3157,12 @@ long disas_insn(DisasContext *s, uint8_t *pc_start) default: goto illegal_op; } + /* lock generation */ + if (s->prefix & PREFIX_LOCK) + gen_op_unlock(); return (long)s->pc; illegal_op: + /* XXX: ensure that no lock was generated */ return -1; } @@ -3609,6 +3617,7 @@ int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size, pc += count; } fprintf(logfile, "\n"); + fflush(logfile); } #endif return 0; |