summaryrefslogtreecommitdiffstats
path: root/test/Headers
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-08-06 17:58:24 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-08-06 17:58:24 +0000
commitcfc8939a5f184eff60e37c53dd62e98878e8a9d4 (patch)
treeb5d6954ad7efca7f8d46a53a11f1482330817f34 /test/Headers
parent70a62d39b1fc3c6d2b5aa4b78ddf5e5edee7c4c4 (diff)
Headers: Add ARM support to intrin.h for MSVC compatibility
This fixes compiling with headers from the Windows SDK for ARM, where the YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST. The actual MSVC armintr.h contains a lot more definitions, but this is enough to build code that uses the Windows SDK but doesn't use ARM intrinsics directly. An alternative would to just keep the addition to intrin.h (to include armintr.h), but not actually ship armintr.h, instead having clang's intrin.h include armintr.h from MSVC's include directory. (That one works fine with clang, at least for building code that uses the Windows SDK.) Patch by Martin Storsjö! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r--test/Headers/ms-intrin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Headers/ms-intrin.cpp b/test/Headers/ms-intrin.cpp
index c697428553..25c5531c41 100644
--- a/test/Headers/ms-intrin.cpp
+++ b/test/Headers/ms-intrin.cpp
@@ -60,4 +60,8 @@ void f() {
__readcr3();
__writecr3(0);
#endif
+
+#ifdef _M_ARM
+ __dmb(_ARM_BARRIER_ISHST);
+#endif
}