diff options
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 4 | ||||
-rw-r--r-- | test/MC/AsmParser/X86/x86_64-suffix-matching.s | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 6b403c1..460410b 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -673,6 +673,8 @@ X86ATTAsmParser::MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*> bool MatchW = MatchInstructionImpl(Operands, Inst); Tmp[Base.size()] = 'l'; bool MatchL = MatchInstructionImpl(Operands, Inst); + Tmp[Base.size()] = 'q'; + bool MatchQ = MatchInstructionImpl(Operands, Inst); // Restore the old token. Op->setTokenValue(Base); @@ -680,7 +682,7 @@ X86ATTAsmParser::MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*> // If exactly one matched, then we treat that as a successful match (and the // instruction will already have been filled in correctly, since the failing // matches won't have modified it). - if (MatchB + MatchW + MatchL == 2) + if (MatchB + MatchW + MatchL + MatchQ == 3) return false; // Otherwise, the match failed. diff --git a/test/MC/AsmParser/X86/x86_64-suffix-matching.s b/test/MC/AsmParser/X86/x86_64-suffix-matching.s index c4f0be2..0ae6fe5 100644 --- a/test/MC/AsmParser/X86/x86_64-suffix-matching.s +++ b/test/MC/AsmParser/X86/x86_64-suffix-matching.s @@ -4,3 +4,7 @@ add $0, %eax // CHECK: addb $255, %al add $0xFF, %al +// CHECK: orq %rax, %rdx + or %rax, %rdx +// CHECK: shlq $3, %rax + shl $3, %rax |