summaryrefslogtreecommitdiffstats
path: root/target-i386
diff options
context:
space:
mode:
authorbalrog2007-12-24 14:29:55 +0100
committerbalrog2007-12-24 14:29:55 +0100
commit71c3558ed2d048c27585732fe4fd2aa17566f160 (patch)
treededfc26ff24e3b61dfe871caea8596177b141a5c /target-i386
parentFix number_of_entries for filename of length [13] (Tristan Gingold). (diff)
downloadqemu-71c3558ed2d048c27585732fe4fd2aa17566f160.tar.gz
qemu-71c3558ed2d048c27585732fe4fd2aa17566f160.tar.xz
qemu-71c3558ed2d048c27585732fe4fd2aa17566f160.zip
Fix cmpxchg8b translation (Bernhard Kauer).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3843 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 579831ef7a..9723e76092 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -3887,7 +3887,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
case 0x1c7: /* cmpxchg8b */
modrm = ldub_code(s->pc++);
mod = (modrm >> 6) & 3;
- if (mod == 3)
+ if ((mod == 3) || ((modrm & 0x38) != 0x8))
goto illegal_op;
gen_jmp_im(pc_start - s->cs_base);
if (s->cc_op != CC_OP_DYNAMIC)