From: Chris Lattner Date: Wed, 22 Sep 2010 03:50:32 +0000 (+0000) Subject: fix rdar://8456361 - llvm-mc rejects 'rep movsd' X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61129252e44067ae112dc856c64c814344b7e7c9;p=oota-llvm.git fix rdar://8456361 - llvm-mc rejects 'rep movsd' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114526 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 81967183ed9..4c51ed674e3 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -1009,6 +1009,12 @@ ParseInstruction(StringRef Name, SMLoc NameLoc, NameLoc); } + // movsd -> movsl (when no operands are specified). + if (Name == "movsd" && Operands.size() == 1) { + delete Operands[0]; + Operands[0] = X86Operand::CreateToken("movsl", NameLoc); + } + return false; } diff --git a/test/MC/AsmParser/X86/x86_instructions.s b/test/MC/AsmParser/X86/x86_instructions.s index d0f6dbfc1a6..7f8a401c076 100644 --- a/test/MC/AsmParser/X86/x86_instructions.s +++ b/test/MC/AsmParser/X86/x86_instructions.s @@ -83,6 +83,11 @@ // CHECK: movsb rep;movsb +// rdar://8456361 +// CHECK: rep +// CHECK: movsl + rep movsd + // CHECK: rep // CHECK: lodsb rep;lodsb