aboutsummaryrefslogtreecommitdiff
path: root/target-i386/translate.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-19 20:31:37 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-19 20:31:37 +0000
commitab1f142ba0b667679ea2ed55598f22551c19dac4 (patch)
tree3c63b94c6029d449a3da15a0db428fcd27b372a3 /target-i386/translate.c
parent4120b61d000117bf016dead1443682c74838227f (diff)
downloadqemu-ab1f142ba0b667679ea2ed55598f22551c19dac4.zip
qemu-ab1f142ba0b667679ea2ed55598f22551c19dac4.tar.gz
qemu-ab1f142ba0b667679ea2ed55598f22551c19dac4.tar.bz2
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
Diffstat (limited to 'target-i386/translate.c')
-rw-r--r--target-i386/translate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 2407735..cec9a42 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -3732,6 +3732,9 @@ static uint8_t *disas_insn(DisasContext *s, uint8_t *pc_start)
/************************/
/* misc */
case 0x90: /* nop */
+ /* XXX: correct lock test for all insn */
+ if (prefixes & PREFIX_LOCK)
+ goto illegal_op;
break;
case 0x9b: /* fwait */
break;
@@ -4137,6 +4140,8 @@ static uint8_t *disas_insn(DisasContext *s, uint8_t *pc_start)
gen_op_unlock();
return s->pc;
illegal_op:
+ if (s->prefix & PREFIX_LOCK)
+ gen_op_unlock();
/* XXX: ensure that no lock was generated */
gen_exception(s, EXCP06_ILLOP, pc_start - s->cs_base);
return s->pc;