Commit ab1f142ba0b667679ea2ed55598f22551c19dac4
1 parent
4120b61d
L4 fix for rep nop (should handle all cases)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@571 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
0 deletions
target-i386/translate.c
... | ... | @@ -3732,6 +3732,9 @@ static uint8_t *disas_insn(DisasContext *s, uint8_t *pc_start) |
3732 | 3732 | /************************/ |
3733 | 3733 | /* misc */ |
3734 | 3734 | case 0x90: /* nop */ |
3735 | + /* XXX: correct lock test for all insn */ | |
3736 | + if (prefixes & PREFIX_LOCK) | |
3737 | + goto illegal_op; | |
3735 | 3738 | break; |
3736 | 3739 | case 0x9b: /* fwait */ |
3737 | 3740 | break; |
... | ... | @@ -4137,6 +4140,8 @@ static uint8_t *disas_insn(DisasContext *s, uint8_t *pc_start) |
4137 | 4140 | gen_op_unlock(); |
4138 | 4141 | return s->pc; |
4139 | 4142 | illegal_op: |
4143 | + if (s->prefix & PREFIX_LOCK) | |
4144 | + gen_op_unlock(); | |
4140 | 4145 | /* XXX: ensure that no lock was generated */ |
4141 | 4146 | gen_exception(s, EXCP06_ILLOP, pc_start - s->cs_base); |
4142 | 4147 | return s->pc; | ... | ... |