Fix VEX decoding in i386 mode. Fixes PR11008.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140515 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2011-09-26 05:12:43 +00:00
parent c291e2f578
commit 100d86ada5
2 changed files with 291 additions and 2 deletions
@@ -391,7 +391,7 @@ static int readPrefixes(struct InternalInstruction* insn) {
return -1;
}
if (insn->mode == MODE_64BIT || byte1 & 0x8) {
if (insn->mode == MODE_64BIT || (byte1 & 0xc0) == 0xc0) {
insn->vexSize = 3;
insn->necessaryPrefixLocation = insn->readerCursor - 1;
}
@@ -433,7 +433,7 @@ static int readPrefixes(struct InternalInstruction* insn) {
return -1;
}
if (insn->mode == MODE_64BIT || byte1 & 0x8) {
if (insn->mode == MODE_64BIT || (byte1 & 0xc0) == 0xc0) {
insn->vexSize = 2;
}
else {