aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2011-10-03 08:14:29 +0000
committerCraig Topper <craig.topper@gmail.com>2011-10-03 08:14:29 +0000
commit04c5be9f12fbb802ae48791399e999f29c0fb5c9 (patch)
tree1985bc9168192178f7c8af002e03b41a9f023977 /lib
parent04b0b34b3aa3be028295e2aeccdfd054c449e310 (diff)
Treat VEX.vvvv as a 3-bit field outside of 64-bit mode. Prevents access to registers xmm8-xmm15 outside 64-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/Disassembler/X86DisassemblerDecoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
index 1d5ad4c052..a1eb57c78f 100644
--- a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
+++ b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
@@ -1491,6 +1491,9 @@ static int readVVVV(struct InternalInstruction* insn) {
else
return -1;
+ if (insn->mode != MODE_64BIT)
+ insn->vvvv &= 0x7;
+
return 0;
}