diff options
author | Eric Christopher <echristo@gmail.com> | 2017-07-25 19:17:32 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2017-07-25 19:17:32 +0000 |
commit | cf94152f274c65a583dfc5cf1787fbbef752e004 (patch) | |
tree | 5e1c9f2e8add9d8faad15d2016e68774fa9e0aeb /clang/test | |
parent | 578363ac08da813a59cd19f3d41bd8e5af019d84 (diff) | |
download | bcm5719-llvm-cf94152f274c65a583dfc5cf1787fbbef752e004.tar.gz bcm5719-llvm-cf94152f274c65a583dfc5cf1787fbbef752e004.zip |
Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements." as it is causing msan failures.
This reverts commits r308985 and r308965
llvm-svn: 309004
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/ms-inline-asm.c | 14 | ||||
-rw-r--r-- | clang/test/CodeGen/x86-ms-inline-asm-enum_feature.cpp | 60 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/ms-inline-asm-return.cpp | 4 |
3 files changed, 9 insertions, 69 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index b5c0490ec17..d26a660c9b0 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -42,7 +42,7 @@ void t5(void) { void t6(void) { __asm int 0x2c // CHECK: t6 -// CHECK: call void asm sideeffect inteldialect "int $$44", "~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "int $$0x2c", "~{dirflag},~{fpsr},~{flags}"() } void t7() { @@ -61,7 +61,7 @@ void t7() { mov eax, ebx } // CHECK: t7 -// CHECK: call void asm sideeffect inteldialect "int $$44", "~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "int $$0x2cU", "~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "mov eax, ebx", "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -94,7 +94,7 @@ void t9() { // CHECK: t9 // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: push ebx -// CHECK-SAME: mov ebx, $$7 +// CHECK-SAME: mov ebx, $$0x07 // CHECK-SAME: pop ebx // CHECK-SAME: "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() } @@ -265,7 +265,7 @@ void t21() { // CHECK: t21 // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: push ebx -// CHECK-SAME: mov ebx, $$7 +// CHECK-SAME: mov ebx, $$07H // CHECK-SAME: pop ebx // CHECK-SAME: "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() } @@ -312,13 +312,13 @@ void t24() { void t25() { // CHECK: t25 __asm mov eax, 0ffffffffh -// CHECK: mov eax, $$4294967295 +// CHECK: mov eax, $$0ffffffffh __asm mov eax, 0fhU // CHECK: mov eax, $$15 __asm mov eax, 0a2h -// CHECK: mov eax, $$162 +// CHECK: mov eax, $$0a2h __asm mov eax, 10100010b -// CHECK: mov eax, $$162 +// CHECK: mov eax, $$10100010b __asm mov eax, 10100010BU // CHECK: mov eax, $$162 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() diff --git a/clang/test/CodeGen/x86-ms-inline-asm-enum_feature.cpp b/clang/test/CodeGen/x86-ms-inline-asm-enum_feature.cpp deleted file mode 100644 index 8f8b1fed792..00000000000 --- a/clang/test/CodeGen/x86-ms-inline-asm-enum_feature.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// REQUIRES: x86-registered-target -// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fasm-blocks -emit-llvm -o - | FileCheck %s -namespace x { -enum { A = 12 }; -struct y_t { - enum { A = 17 }; - int r; -} y; -} -// CHECK-LABEL: x86_enum_only -void x86_enum_only(){ - const int a = 0; - // CHECK-NOT: mov eax, [$$0] - // Other constant type folding is currently unwanted. - __asm mov eax, [a] - } - -// CHECK-LABEL: x86_enum_namespaces -void x86_enum_namespaces() { - enum { A = 1 }; - // CHECK: call void asm - // CHECK-SAME: mov eax, $$12 - __asm mov eax, x::A - // CHECK-SAME: mov eax, $$17 - __asm mov eax, x::y_t::A - // CHECK-NEXT: call void asm - // CHECK-SAME: mov eax, $$1 - __asm {mov eax, A} -} - -// CHECK-LABEL: x86_enum_arithmethic -void x86_enum_arithmethic() { - enum { A = 1, B }; - // CHECK: call void asm - // CHECK-SAME: mov eax, $$21 - __asm mov eax, (A + 9) * 2 + A - // CHECK-SAME: mov eax, $$4 - __asm mov eax, A << 2 - // CHECK-SAME: mov eax, $$2 - __asm mov eax, B & 3 - // CHECK-SAME: mov eax, $$5 - __asm mov eax, 3 + (B & 3) - // CHECK-SAME: mov eax, $$8 - __asm mov eax, 2 << A * B -} - -// CHECK-LABEL: x86_enum_mem -void x86_enum_mem() { - int arr[4]; - enum { A = 4, B }; - // CHECK: call void asm - // CHECK-SAME: mov eax, [($$12 + $$9) + $$4 * $$5 + $$3 + $$3 + eax] - __asm { mov eax, [(x::A + 9) + A * B + 3 + 3 + eax] } - // CHECK-NEXT: call void asm - // CHECK-SAME: mov eax, dword ptr $$4$0 - __asm { mov eax, dword ptr [arr + A] } - // CHECK-NEXT: call void asm - // CHECK-SAME: mov eax, dword ptr $$8$0 - __asm { mov eax, dword ptr A[arr + A] } -} diff --git a/clang/test/CodeGenCXX/ms-inline-asm-return.cpp b/clang/test/CodeGenCXX/ms-inline-asm-return.cpp index 837f1b437a4..51671c0bcda 100644 --- a/clang/test/CodeGenCXX/ms-inline-asm-return.cpp +++ b/clang/test/CodeGenCXX/ms-inline-asm-return.cpp @@ -70,7 +70,7 @@ FourChars f_s4() { } } // CHECK-LABEL: define i32 @f_s4() -// CHECK: %[[r:[^ ]*]] = call i32 asm sideeffect inteldialect "mov eax, $$16843009", "={eax},~{eax},{{.*}}" +// CHECK: %[[r:[^ ]*]] = call i32 asm sideeffect inteldialect "mov eax, $$0x01010101", "={eax},~{eax},{{.*}}" // CHECK: store i32 %[[r]], i32* %{{.*}} // CHECK: %[[r_i32:[^ ]*]] = load i32, i32* %{{.*}} // CHECK: ret i32 %[[r_i32]] @@ -85,7 +85,7 @@ EightChars f_s8() { } } // CHECK-LABEL: define i64 @f_s8() -// CHECK: %[[r:[^ ]*]] = call i64 asm sideeffect inteldialect "mov eax, $$16843009\0A\09mov edx, $$85", "=A,~{eax},{{.*}}" +// CHECK: %[[r:[^ ]*]] = call i64 asm sideeffect inteldialect "mov eax, $$01010101h\0A\09mov edx, $$01010101b", "=A,~{eax},{{.*}}" // CHECK: store i64 %[[r]], i64* %{{.*}} // CHECK: %[[r_i64:[^ ]*]] = load i64, i64* %{{.*}} // CHECK: ret i64 %[[r_i64]] |