summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-12 21:34:14 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-12 21:34:14 +0000
commit3ea602cd30ed6062a55100a29e2979f37f225545 (patch)
tree5886d2023e1e361f3f83f7b3098e2277413a3693 /clang/test
parentc7f552c33efdf246fa26415631e106432f3de0f3 (diff)
downloadbcm5719-llvm-3ea602cd30ed6062a55100a29e2979f37f225545.tar.gz
bcm5719-llvm-3ea602cd30ed6062a55100a29e2979f37f225545.zip
[ms-inline-asm] Add test cases for the align/emit directives.
Part of rdar://13200215 llvm-svn: 175009
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/ms-inline-asm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index dbc35980b22..af40129f456 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -161,10 +161,12 @@ void t17() {
__asm _emit 0x4A
__asm _emit 0x43
__asm _emit 0x4B
+ __asm _EMIT 0x4B
// CHECK: t17
// CHECK: call void asm sideeffect inteldialect ".byte 0x4A", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect ".byte 0x43", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect ".byte 0x4B", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect ".byte 0x4B", "~{dirflag},~{fpsr},~{flags}"() nounwind
}
struct t18_type { int a, b; };
@@ -294,12 +296,14 @@ void t26() {
__asm mov eax, 0
__asm __emit 0fh
__asm __emit 0a2h
+ __asm __EMIT 0a2h
__asm popad
// CHECK: t26
// CHECK: call void asm sideeffect inteldialect "pushad", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect "mov eax, $$0", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect ".byte 0fh", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect ".byte 0a2h", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect ".byte 0a2h", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect "popad", "~{dirflag},~{fpsr},~{flags}"() nounwind
}
@@ -308,3 +312,15 @@ void t27() {
// CHECK: t27
// CHECK: call void asm sideeffect inteldialect "mov eax, fs:[0h]", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
}
+
+void t28() {
+ __asm align 8
+ __asm align 16;
+ __asm align 128;
+ __asm ALIGN 256;
+// CHECK: t28
+// CHECK: call void asm sideeffect inteldialect ".align 3", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect ".align 4", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect ".align 7", "~{dirflag},~{fpsr},~{flags}"() nounwind
+// CHECK: call void asm sideeffect inteldialect ".align 8", "~{dirflag},~{fpsr},~{flags}"() nounwind
+}
OpenPOWER on IntegriCloud