summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/asm-goto.c19
-rw-r--r--clang/test/CodeGen/asm.c12
-rw-r--r--clang/test/CodeGen/inline-asm-mixed-style.c10
3 files changed, 5 insertions, 36 deletions
diff --git a/clang/test/CodeGen/asm-goto.c b/clang/test/CodeGen/asm-goto.c
deleted file mode 100644
index 99e97f2a41e..00000000000
--- a/clang/test/CodeGen/asm-goto.c
+++ /dev/null
@@ -1,19 +0,0 @@
-// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple x86_64 -O0 -emit-llvm %s -o - | FileCheck %s
-
-int foo(int cond)
-{
- // CHECK: callbr void asm sideeffect
- // CHECK: to label %asm.fallthrough [label %label_true, label %loop], !srcloc !2
- // CHECK: asm.fallthrough:
- asm volatile goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop);
- asm volatile goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop);
- // CHECK: callbr void asm sideeffect
- // CHECK: to label %asm.fallthrough1 [label %label_true, label %loop], !srcloc !3
- // CHECK: asm.fallthrough1:
- return 0;
-loop:
- return 0;
-label_true:
- return 1;
-}
diff --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c
index 7de79639bfd..038d346e999 100644
--- a/clang/test/CodeGen/asm.c
+++ b/clang/test/CodeGen/asm.c
@@ -262,15 +262,3 @@ void t31(int len) {
// CHECK: @t31
// CHECK: call void asm sideeffect "", "=*%rm,=*rm,0,1,~{dirflag},~{fpsr},~{flags}"
}
-
-// CHECK: @t32
-int t32(int cond)
-{
- asm goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop);
- // CHECK: callbr void asm sideeffect "testl $0, $0; jne ${1:l};", "r,X,X,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* blockaddress(@t32, %label_true), i8* blockaddress(@t32, %loop)) #1
- return 0;
-loop:
- return 0;
-label_true:
- return 1;
-}
diff --git a/clang/test/CodeGen/inline-asm-mixed-style.c b/clang/test/CodeGen/inline-asm-mixed-style.c
index a9e111cd5dd..6b830d9fa7a 100644
--- a/clang/test/CodeGen/inline-asm-mixed-style.c
+++ b/clang/test/CodeGen/inline-asm-mixed-style.c
@@ -1,3 +1,4 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -fsyntax-only -verify %s -DCHECK_ASM_GOTO
// RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -O0 -emit-llvm -S %s -o - | FileCheck %s
// REQUIRES: x86-registered-target
@@ -19,11 +20,10 @@ void f() {
// CHECK: movl %ebx, %eax
// CHECK: movl %ecx, %edx
- __asm volatile goto ("movl %ecx, %edx");
- // CHECK: movl %ecx, %edx
+#ifdef CHECK_ASM_GOTO
+ __asm volatile goto ("movl %ecx, %edx"); // expected-error {{'asm goto' constructs are not supported yet}}
__asm mov eax, ebx
- __asm goto ("movl %ecx, %edx");
- // CHECK: movl %ebx, %eax
- // CHECK: movl %ecx, %edx
+ __asm goto ("movl %ecx, %edx"); // expected-error {{'asm goto' constructs are not supported yet}}
+#endif
}
OpenPOWER on IntegriCloud