ms-inline-asm: Add a test to ensure that call doesn't clobber eax.

Note that it's not clear whether this is the right behavior, please see
the review for the discussion.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4577

llvm-svn: 214401
This commit is contained in:
Ehsan Akhgari 2014-07-31 13:43:17 +00:00
parent ed9fabd255
commit 9f507382dd
1 changed files with 6 additions and 0 deletions

View File

@ -504,3 +504,9 @@ void t41(unsigned short a) {
// CHECK: mov ss, word ptr $5
// CHECK: "*m,*m,*m,*m,*m,*m,~{dirflag},~{fpsr},~{flags}"(i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}})
}
void call_clobber() {
__asm call t41
// CHECK-LABEL: define void @call_clobber
// CHECK: call void asm sideeffect inteldialect "call $0", "r,~{dirflag},~{fpsr},~{flags}"(void (i16)* @t41)
}