r175009 - [ms-inline-asm] Add test cases for the align/emit directives.
Chad Rosier
mcrosier at apple.com
Tue Feb 12 13:34:14 PST 2013
Author: mcrosier
Date: Tue Feb 12 15:34:14 2013
New Revision: 175009
URL: http://llvm.org/viewvc/llvm-project?rev=175009&view=rev
Log:
[ms-inline-asm] Add test cases for the align/emit directives.
Part of rdar://13200215
Modified:
cfe/trunk/test/CodeGen/ms-inline-asm.c
Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=175009&r1=175008&r2=175009&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Tue Feb 12 15:34:14 2013
@@ -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
+}
More information about the cfe-commits
mailing list