summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-08-18 19:03:59 +0000
committerdim <dim@FreeBSD.org>2015-08-18 19:03:59 +0000
commite46ef01b21774ac0eb2e5b0b1d30b99d484b73a3 (patch)
treec960e1a0197e941e7aa2df8210ab3603b2cb8a05 /contrib/llvm/tools/clang/lib/Headers/fma4intrin.h
parent51e716cb71375836e40df804bbce03319e01649c (diff)
downloadFreeBSD-src-e46ef01b21774ac0eb2e5b0b1d30b99d484b73a3.zip
FreeBSD-src-e46ef01b21774ac0eb2e5b0b1d30b99d484b73a3.tar.gz
Import r243925 from the upstream clang release_37 branch:
Reverting r239883 and r240720: ------------------------------------------------------------------------ r239883 | echristo | 2015-06-17 00:09:32 -0700 (Wed, 17 Jun 2015) | 16 lines 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. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r240720 | silvas | 2015-06-25 16:22:11 -0700 (Thu, 25 Jun 2015) | 6 lines Remove `requires` for x86 CPU features. Ever since the target attributes change, we don't need to guard these headers with `requires`. Actually it's a bit worse, because if we do then they are included textually under the covers, causing declarations to appear in submodules they aren't supposed to be in. ------------------------------------------------------------------------ This reverts the changes to the intrinsics headers in trunk, which could result in some ports' configure scripts misdetecting SSE (and higher) support.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Headers/fma4intrin.h')
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/fma4intrin.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h b/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h
index f117887..d6405cf 100644
--- a/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h
+++ b/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h
@@ -28,10 +28,14 @@
#ifndef __FMA4INTRIN_H
#define __FMA4INTRIN_H
+#ifndef __FMA4__
+# error "FMA4 instruction set is not enabled"
+#else
+
#include <pmmintrin.h>
/* Define the default attributes for the functions in this file. */
-#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fma4")))
+#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
static __inline__ __m128 __DEFAULT_FN_ATTRS
_mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
@@ -227,4 +231,6 @@ _mm256_msubadd_pd(__m256d __A, __m256d __B, __m256d __C)
#undef __DEFAULT_FN_ATTRS
+#endif /* __FMA4__ */
+
#endif /* __FMA4INTRIN_H */
OpenPOWER on IntegriCloud