r309508 - [x86][inline-asm]Allow a pack of Control Regs to be properly picked
Coby Tayree via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 30 03:19:10 PDT 2017
Author: coby
Date: Sun Jul 30 03:19:10 2017
New Revision: 309508
URL: http://llvm.org/viewvc/llvm-project?rev=309508&view=rev
Log:
[x86][inline-asm]Allow a pack of Control Regs to be properly picked
Allows the incorporation of legit (x86) Control Regs within inline asm stataements
Differential Revision: https://reviews.llvm.org/D35903
Modified:
cfe/trunk/lib/Basic/Targets/X86.cpp
cfe/trunk/test/CodeGen/ms-inline-asm.c
Modified: cfe/trunk/lib/Basic/Targets/X86.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/X86.cpp?rev=309508&r1=309507&r2=309508&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/X86.cpp Sun Jul 30 03:19:10 2017
@@ -58,6 +58,7 @@ static const char *const GCCRegNames[] =
"zmm18", "zmm19", "zmm20", "zmm21", "zmm22", "zmm23", "zmm24", "zmm25",
"zmm26", "zmm27", "zmm28", "zmm29", "zmm30", "zmm31", "k0", "k1",
"k2", "k3", "k4", "k5", "k6", "k7",
+ "cr0", "cr2", "cr3", "cr4", "cr8",
};
const TargetInfo::AddlRegName AddlRegNames[] = {
Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=309508&r1=309507&r2=309508&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Sun Jul 30 03:19:10 2017
@@ -627,6 +627,17 @@ void t43() {
// CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
}
+void t44() {
+ // CHECK-LABEL: define void @t44
+ __asm {
+ mov cr0, eax
+ mov cr2, ebx
+ mov cr3, ecx
+ mov cr4, edx
+ }
+ // 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 dot_operator(){
// CHECK-LABEL: define void @dot_operator
__asm { mov eax, 3[ebx]A.b}
More information about the cfe-commits
mailing list