diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
| commit | 56d91b49b13fe55c918afbda19f6165b5fbff87a (patch) | |
| tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeGen/ms-inline-asm.c | |
| parent | 41e20f564abdb05101d6b2b29c59459a966c22cc (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/ms-inline-asm.c')
| -rw-r--r-- | test/CodeGen/ms-inline-asm.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c new file mode 100644 index 000000000000..8c3e5f7c569b --- /dev/null +++ b/test/CodeGen/ms-inline-asm.c @@ -0,0 +1,40 @@ +// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O0 -fms-extensions -fenable-experimental-ms-inline-asm -w -emit-llvm -o - | FileCheck %s + +void t1() { +// CHECK: @t1 +// CHECK: call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: ret void + __asm {} +} + +void t2() { +// CHECK: @t2 +// CHECK: call void asm sideeffect "nop\0Anop\0Anop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: ret void + __asm nop + __asm nop + __asm nop +} + +void t3() { +// CHECK: @t3 +// CHECK: call void asm sideeffect "nop\0Anop\0Anop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: ret void + __asm nop __asm nop __asm nop +} + +void t4(void) { +// CHECK: @t4 +// CHECK: call void asm sideeffect "mov ebx, eax\0Amov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: ret void + __asm mov ebx, eax + __asm mov ecx, ebx +} + +void t5(void) { +// CHECK: @t5 +// CHECK: call void asm sideeffect "mov ebx, eax\0Amov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: ret void + __asm mov ebx, eax __asm mov ecx, ebx +} + |
