[ms-inline asm] Test case for r166632.

llvm-svn: 166633
This commit is contained in:
Chad Rosier 2012-10-24 22:22:12 +00:00
parent 5dcb4664f2
commit 602d09d0aa
1 changed files with 16 additions and 0 deletions

View File

@ -163,3 +163,19 @@ void t17() {
// CHECK: call void asm sideeffect inteldialect ".byte 0x43", "~{dirflag},~{fpsr},~{flags}"() nounwind
// CHECK: call void asm sideeffect inteldialect ".byte 0x4B", "~{dirflag},~{fpsr},~{flags}"() nounwind
}
struct t18_type { int a, b; };
int t18() {
struct t18_type foo;
foo.a = 1;
foo.b = 2;
__asm {
lea ebx, foo
mov eax, [ebx].0
mov [ebx].4, ecx
}
return foo.b;
// CHECK: t18
// CHECK: call void asm sideeffect inteldialect "lea ebx, foo\0A\09mov eax, [ebx].0\0A\09mov [ebx].4, ecx", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
}