AVX-512: Fix bug in checking high-16 registers
authorJin Kyu Song <jin.kyu.song@intel.com>
Thu, 29 Aug 2013 02:15:25 +0000 (19:15 -0700)
committerCyrill Gorcunov <gorcunov@gmail.com>
Thu, 29 Aug 2013 06:03:14 +0000 (10:03 +0400)
Register value needs to be checked. Previous patch compared with reg_enum.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
assemble.c

index d847d37..6ea8be6 100644 (file)
@@ -2144,7 +2144,7 @@ static enum match_result matches(const struct itemplate *itemp,
                  */
                 opsizemissing = true;
             }
-        } else if (instruction->oprs[i].basereg >= 16 &&
+        } else if (nasm_regvals[instruction->oprs[i].basereg] >= 16 &&
                    (itemp->flags & IF_INSMASK) != IF_AVX512) {
             return MERR_ENCMISMATCH;
         }