r329738 - [X86] Add test case for llvm change r329734

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 10 11:43:44 PDT 2018


Author: ctopper
Date: Tue Apr 10 11:43:44 2018
New Revision: 329738

URL: http://llvm.org/viewvc/llvm-project?rev=329738&view=rev
Log:
[X86] Add test case for llvm change r329734

This test ensures the popfd instruction in MS inline assembly can properly find a clobber name for the dirflag register. Previously the register was named 'DF', but it needs to be named 'dirflag' to match the name in the GCC register name list.

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=329738&r1=329737&r2=329738&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Tue Apr 10 11:43:44 2018
@@ -754,6 +754,13 @@ void mxcsr() {
 // CHECK-LABEL: define void @mxcsr
 // CHECK: call void asm sideeffect inteldialect "fxrstor $0", "=*m,~{dirflag},~{fpsr},~{flags}"
 
+// Make sure we can find the register for the dirflag for popfd
+void dirflag() {
+  __asm popfd
+}
+// CHECK-LABEL: define void @dirflag
+// CHECK: call void asm sideeffect inteldialect "popfd", "~{dirflag},~{flags},~{esp},~{dirflag},~{fpsr},~{flags}"
+
 typedef union _LARGE_INTEGER {
   struct {
     unsigned int LowPart;




More information about the cfe-commits mailing list