diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
| commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
| tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/CodeGen/inline-asm-mixed-style.c | |
| parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/inline-asm-mixed-style.c')
| -rw-r--r-- | test/CodeGen/inline-asm-mixed-style.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/inline-asm-mixed-style.c b/test/CodeGen/inline-asm-mixed-style.c new file mode 100644 index 000000000000..6b830d9fa7a9 --- /dev/null +++ b/test/CodeGen/inline-asm-mixed-style.c @@ -0,0 +1,29 @@ +// 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 + +void f() { + __asm mov eax, ebx + __asm mov ebx, ecx + __asm__("movl %ecx, %edx"); + // CHECK: movl %ebx, %eax + // CHECK: movl %ecx, %ebx + // CHECK: movl %ecx, %edx + + __asm mov eax, ebx + __asm volatile ("movl %ecx, %edx"); + // CHECK: movl %ebx, %eax + // CHECK: movl %ecx, %edx + + __asm mov eax, ebx + __asm const ("movl %ecx, %edx"); // expected-warning {{ignored const qualifier on asm}} + // CHECK: movl %ebx, %eax + // 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"); // expected-error {{'asm goto' constructs are not supported yet}} +#endif +} |
