summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-04-10 18:43:44 +0000
committerCraig Topper <craig.topper@intel.com>2018-04-10 18:43:44 +0000
commit298e1712d827a05b2cbb2936a9fc67745fa68c13 (patch)
treeb02929ccff7fb1be83575f723e2d8dd2f1fdbff3
parentdde3dc27ee71f12eb145ce54158779ab4ddc38ed (diff)
downloadbcm5719-llvm-298e1712d827a05b2cbb2936a9fc67745fa68c13.tar.gz
bcm5719-llvm-298e1712d827a05b2cbb2936a9fc67745fa68c13.zip
[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. llvm-svn: 329738
-rw-r--r--clang/test/CodeGen/ms-inline-asm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index 5c3e3ff2a84..edcbaa8aa45 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -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;
OpenPOWER on IntegriCloud