[PATCH] D36074: [x86][inline-asm]Allow a pack of Control Debug to be properly picked

coby via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 03:51:53 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL309672: [x86][inline-asm]Allow a pack of Control Debug to be properly picked (authored by coby).

Changed prior to commit:
  https://reviews.llvm.org/D36074?vs=108872&id=109073#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36074

Files:
  cfe/trunk/lib/Basic/Targets/X86.cpp
  cfe/trunk/test/CodeGen/ms-inline-asm.c


Index: cfe/trunk/test/CodeGen/ms-inline-asm.c
===================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c
@@ -638,6 +638,19 @@
   // CHECK: call void asm sideeffect inteldialect "mov cr0, eax\0A\09mov cr2, ebx\0A\09mov cr3, ecx\0A\09mov cr4, edx", "~{cr0},~{cr2},~{cr3},~{cr4},~{dirflag},~{fpsr},~{flags}"()
 }
 
+void t45() {
+  // CHECK-LABEL: define void @t45
+  __asm {
+    mov dr0, eax
+    mov dr1, ebx
+    mov dr2, ebx
+    mov dr3, ecx
+    mov dr6, edx
+    mov dr7, ecx
+  }
+  // CHECK: call void asm sideeffect inteldialect "mov dr0, eax\0A\09mov dr1, ebx\0A\09mov dr2, ebx\0A\09mov dr3, ecx\0A\09mov dr6, edx\0A\09mov dr7, ecx", "~{dr0},~{dr1},~{dr2},~{dr3},~{dr6},~{dr7},~{dirflag},~{fpsr},~{flags}"()
+}
+
 void dot_operator(){
 // CHECK-LABEL: define void @dot_operator
 	__asm { mov eax, 3[ebx]A.b}
Index: cfe/trunk/lib/Basic/Targets/X86.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp
+++ cfe/trunk/lib/Basic/Targets/X86.cpp
@@ -59,6 +59,7 @@
     "zmm26", "zmm27", "zmm28", "zmm29", "zmm30",   "zmm31", "k0",    "k1",
     "k2",    "k3",    "k4",    "k5",    "k6",      "k7",
     "cr0",   "cr2",   "cr3",   "cr4",   "cr8",
+    "dr0",   "dr1",   "dr2",   "dr3",   "dr6",     "dr7",
 };
 
 const TargetInfo::AddlRegName AddlRegNames[] = {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36074.109073.patch
Type: text/x-patch
Size: 1418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170801/16777890/attachment.bin>


More information about the cfe-commits mailing list