r243632 - [X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm

Michael Kuperstein michael.m.kuperstein at intel.com
Thu Jul 30 03:10:47 PDT 2015


Author: mkuper
Date: Thu Jul 30 05:10:47 2015
New Revision: 243632

URL: http://llvm.org/viewvc/llvm-project?rev=243632&view=rev
Log:
[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 at intel.com
Differential Revision: http://reviews.llvm.org/D11513

Modified:
    cfe/trunk/test/CodeGen/ms-inline-asm.c

Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=243632&r1=243631&r2=243632&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Thu Jul 30 05:10:47 2015
@@ -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





More information about the cfe-commits mailing list