OSDN Git Service

Fix cmpxchg8b translation (Bernhard Kauer).
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 24 Dec 2007 13:29:55 +0000 (13:29 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 24 Dec 2007 13:29:55 +0000 (13:29 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3843 c046a42c-6fe2-441c-8c8c-71466251a162

target-i386/translate.c

index 579831e..9723e76 100644 (file)
@@ -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)