[PATCH] D26913: [X86][MS] Allow the invoking of a stand-alone 'movsd' instruction

coby via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 06:41:54 PST 2016


coby created this revision.
coby added a reviewer: myatsina.
coby added a subscriber: llvm-commits.
coby set the repository for this revision to rL LLVM.

small fixup which enables the issuing of the aforementioned instruction (w/o operands), on MS/Intel syntax.


Repository:
  rL LLVM

https://reviews.llvm.org/D26913

Files:
  lib/Target/X86/AsmParser/X86AsmParser.cpp
  test/MC/X86/intel-syntax.s


Index: lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -2536,7 +2536,7 @@
         (Name == "smov" || Name == "smovb" || Name == "smovw" ||
          Name == "smovl" || Name == "smovd" || Name == "smovq"))) &&
       (Operands.size() == 1 || Operands.size() == 3)) {
-    if (Name == "movsd" && Operands.size() == 1)
+    if (Name == "movsd" && Operands.size() == 1 && !isParsingIntelSyntax())
       Operands.back() = X86Operand::CreateToken("movsl", NameLoc);
     AddDefaultSrcDestOperands(TmpOperands, DefaultMemSIOperand(NameLoc),
                               DefaultMemDIOperand(NameLoc));
Index: test/MC/X86/intel-syntax.s
===================================================================
--- test/MC/X86/intel-syntax.s
+++ test/MC/X86/intel-syntax.s
@@ -77,6 +77,8 @@
     vpgatherdd XMM10, XMMWORD PTR [R15 + 2*XMM9], XMM8
 // CHECK: movsd -8, %xmm5
     movsd   XMM5, QWORD PTR [-8]
+// CHECK: movsl (%rsi), %es:(%rdi)
+    movsd
 // CHECK: movl %ecx, (%eax)
     mov [eax], ecx
 // CHECK: movl %ecx, (,%ebx,4)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26913.78714.patch
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161121/579f3d2b/attachment.bin>


More information about the llvm-commits mailing list