diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-08 22:27:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-08 22:27:05 +0000 |
commit | 90b54547d9fcc381f8ec92c32756ad4da43ed9aa (patch) | |
tree | c2697f9e4d5d5a17331090ecfc55a8b122b5996c /lib | |
parent | a7f08b4970daf995d8277f42846aa3145d808d38 (diff) | |
download | llvm-90b54547d9fcc381f8ec92c32756ad4da43ed9aa.tar.gz llvm-90b54547d9fcc381f8ec92c32756ad4da43ed9aa.tar.bz2 llvm-90b54547d9fcc381f8ec92c32756ad4da43ed9aa.tar.xz |
fix rdar://8407548, I missed the commuted form of xchg/test without a suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 9a43913b7c..7e9dacf776 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -850,7 +850,8 @@ ParseInstruction(StringRef Name, SMLoc NameLoc, // The assembler accepts "xchgX <reg>, <mem>" and "xchgX <mem>, <reg>" as // synonyms. Our tables only have the "<reg>, <mem>" form, so if we see the // other operand order, swap them. - if (Name == "xchgb" || Name == "xchgw" || Name == "xchgl" || Name == "xchgq") + if (Name == "xchgb" || Name == "xchgw" || Name == "xchgl" || Name == "xchgq"|| + Name == "xchg") if (Operands.size() == 3 && static_cast<X86Operand*>(Operands[1])->isMem() && static_cast<X86Operand*>(Operands[2])->isReg()) { @@ -860,7 +861,8 @@ ParseInstruction(StringRef Name, SMLoc NameLoc, // The assembler accepts "testX <reg>, <mem>" and "testX <mem>, <reg>" as // synonyms. Our tables only have the "<mem>, <reg>" form, so if we see the // other operand order, swap them. - if (Name == "testb" || Name == "testw" || Name == "testl" || Name == "testq") + if (Name == "testb" || Name == "testw" || Name == "testl" || Name == "testq"|| + Name == "test") if (Operands.size() == 3 && static_cast<X86Operand*>(Operands[1])->isReg() && static_cast<X86Operand*>(Operands[2])->isMem()) { |