From: Ehsan Akhgari Date: Thu, 31 Jul 2014 13:43:17 +0000 (+0000) Subject: ms-inline-asm: Add a test to ensure that call doesn't clobber eax. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f507382dd3fb7ed3c8cafb05b2fd0f89102eb7e;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index 0378c19..06c0db8 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -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) +}