aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmParser/X86AsmParser.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-15 19:08:18 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-15 19:08:18 +0000
commit127f5edfd98893d8910a9ae59b10696a824fed24 (patch)
treee2e8daad8604614ab373b70fe88233c7c141199e /lib/Target/X86/AsmParser/X86AsmParser.cpp
parent3da6f0392a7d936306c8c6c75e5dd7046b551496 (diff)
[ms-inline asm] If we parsed a statement and the opcode is valid, then it's an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmParser/X86AsmParser.cpp')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 683d694909..454664e3ed 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -1526,6 +1526,9 @@ MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
assert(Op->isToken() && "Leading operand should always be a mnemonic!");
ArrayRef<SMRange> EmptyRanges = ArrayRef<SMRange>();
+ // Clear the opcode.
+ Opcode = ~0x0;
+
// First, handle aliases that expand to multiple instructions.
// FIXME: This should be replaced with a real .td file alias mechanism.
// Also, MatchInstructionImpl should actually *do* the EmitInstruction