Skip to content
Snippets Groups Projects
Commit 7243b0f0 authored by Chad Rosier's avatar Chad Rosier
Browse files

[ms-inline-asm] Add test cases for the align/emit directives.

Part of rdar://13200215



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175009 91177308-0d34-0410-b5e6-96231b3b80d8
parent ddf117e1
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment