]> granicus.if.org Git - yasm/commitdiff
x86_find_match(): Fix error reporting for operand 3 mismatches.
authorPeter Johnson <peter@tortall.net>
Thu, 11 Oct 2007 07:29:41 +0000 (07:29 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 11 Oct 2007 07:29:41 +0000 (07:29 -0000)
svn path=/trunk/yasm/; revision=2003

modules/arch/x86/x86id.c

index f16b3a10abc565b60c58719020103fb93c3dbe01..13dcff60fd5d87827d64c8be1beb310fecbf0fe5 100644 (file)
@@ -839,13 +839,13 @@ x86_find_match(x86_id_insn *id_insn, yasm_insn_operand **ops,
                 if (op->type == YASM_INSN__OPERAND_REG && op->size == 0) {
                     /* Register size must exactly match */
                     if ((bypass == 4 && i == 0) || (bypass == 5 && i == 1)
-                        || (bypass == 6 && i == 3))
+                        || (bypass == 6 && i == 2))
                         ;
                     else if (yasm_x86__get_reg_size(op->data.reg) != size)
                         mismatch = 1;
                 } else {
                     if ((bypass == 1 && i == 0) || (bypass == 2 && i == 1)
-                        || (bypass == 3 && i == 3))
+                        || (bypass == 3 && i == 2))
                         ;
                     else if (info_ops[i].relaxed) {
                         /* Relaxed checking */