summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/pmmintrin.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-06-17 07:09:32 +0000
committerEric Christopher <echristo@gmail.com>2015-06-17 07:09:32 +0000
commit9fc7fb274e5341b14c71487cf413343439581d50 (patch)
treeddcf2cfc2d8360d41de6d401ea0f7cb127e69961 /clang/lib/Headers/pmmintrin.h
parent4d185168e9dbc4da5c6849062815b4338f3aeb99 (diff)
downloadbcm5719-llvm-9fc7fb274e5341b14c71487cf413343439581d50.tar.gz
bcm5719-llvm-9fc7fb274e5341b14c71487cf413343439581d50.zip
Update the intel intrinsic headers to use the target attribute support.
This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. llvm-svn: 239883
Diffstat (limited to 'clang/lib/Headers/pmmintrin.h')
-rw-r--r--clang/lib/Headers/pmmintrin.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/Headers/pmmintrin.h b/clang/lib/Headers/pmmintrin.h
index 5ce7f33fdea..6e61539fb2c 100644
--- a/clang/lib/Headers/pmmintrin.h
+++ b/clang/lib/Headers/pmmintrin.h
@@ -24,14 +24,10 @@
#ifndef __PMMINTRIN_H
#define __PMMINTRIN_H
-#ifndef __SSE3__
-#error "SSE3 instruction set not enabled"
-#else
-
#include <emmintrin.h>
/* Define the default attributes for the functions in this file. */
-#define DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
+#define DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse3")))
static __inline__ __m128i DEFAULT_FN_ATTRS
_mm_lddqu_si128(__m128i const *__p)
@@ -117,6 +113,4 @@ _mm_mwait(unsigned __extensions, unsigned __hints)
#undef DEFAULT_FN_ATTRS
-#endif /* __SSE3__ */
-
#endif /* __PMMINTRIN_H */
OpenPOWER on IntegriCloud