fix rdar://8456361 - llvm-mc rejects 'rep movsd'
authorChris Lattner <sabre@nondot.org>
Wed, 22 Sep 2010 03:50:32 +0000 (03:50 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 Sep 2010 03:50:32 +0000 (03:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/AsmParser/X86/x86_instructions.s

index 81967183ed94ac45b186431382949d91962c3e01..4c51ed674e3bc8536e50e0da6a3ad60b6d4eff5c 100644 (file)
@@ -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;
 }
 
index d0f6dbfc1a633292c69278b8d20068dfd0998777..7f8a401c076f7106caab3b2764e64399b365883f 100644 (file)
 // CHECK: movsb
         rep;movsb
 
+// rdar://8456361
+// CHECK: rep
+// CHECK: movsl
+        rep movsd
+
 // CHECK: rep
 // CHECK: lodsb
         rep;lodsb