From: Michael Kuperstein Date: Thu, 30 Jul 2015 10:10:47 +0000 (+0000) Subject: [X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4354e02b6b9cc0d7b5bc389f66199aeccf13acfc;p=clang [X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm This contains the test-case for r243630. Patch by: marina.yatsina@intel.com Differential Revision: http://reviews.llvm.org/D11513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243632 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c index d98b498a36..4f04a8bb50 100644 --- a/test/CodeGen/ms-inline-asm.c +++ b/test/CodeGen/ms-inline-asm.c @@ -508,6 +508,14 @@ void t41(unsigned short a) { // CHECK: "*m,*m,*m,*m,*m,*m,~{dirflag},~{fpsr},~{flags}"(i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}) } +void t42() { +// CHECK-LABEL: define void @t42 + int flags; + __asm mov flags, eax +// CHECK: mov dword ptr $0, eax +// CHECK: "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %flags) +} + void call_clobber() { __asm call t41 // CHECK-LABEL: define void @call_clobber