1 // RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -fsyntax-only -verify %s -DCHECK_ASM_GOTO
2 // RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -O0 -emit-llvm -S %s -o - | FileCheck %s
3 // REQUIRES: x86-registered-target
4
f()5 void f() {
6 __asm mov eax, ebx
7 __asm mov ebx, ecx
8 __asm__("movl %ecx, %edx");
9 // CHECK: movl %ebx, %eax
10 // CHECK: movl %ecx, %ebx
11 // CHECK: movl %ecx, %edx
12
13 __asm mov eax, ebx
14 __asm volatile ("movl %ecx, %edx");
15 // CHECK: movl %ebx, %eax
16 // CHECK: movl %ecx, %edx
17
18 __asm mov eax, ebx
19 __asm const ("movl %ecx, %edx"); // expected-warning {{ignored const qualifier on asm}}
20 // CHECK: movl %ebx, %eax
21 // CHECK: movl %ecx, %edx
22
23 #ifdef CHECK_ASM_GOTO
24 __asm volatile goto ("movl %ecx, %edx"); // expected-error {{'asm goto' constructs are not supported yet}}
25
26 __asm mov eax, ebx
27 __asm goto ("movl %ecx, %edx"); // expected-error {{'asm goto' constructs are not supported yet}}
28 #endif
29 }
30