diff options
author | Eric Christopher <echristo@gmail.com> | 2015-06-17 07:09:32 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-06-17 07:09:32 +0000 |
commit | 9fc7fb274e5341b14c71487cf413343439581d50 (patch) | |
tree | ddcf2cfc2d8360d41de6d401ea0f7cb127e69961 /clang/lib/Headers/ammintrin.h | |
parent | 4d185168e9dbc4da5c6849062815b4338f3aeb99 (diff) | |
download | bcm5719-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/ammintrin.h')
-rw-r--r-- | clang/lib/Headers/ammintrin.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/Headers/ammintrin.h b/clang/lib/Headers/ammintrin.h index 9a5ff1ac0e7..3f382057667 100644 --- a/clang/lib/Headers/ammintrin.h +++ b/clang/lib/Headers/ammintrin.h @@ -24,14 +24,10 @@ #ifndef __AMMINTRIN_H #define __AMMINTRIN_H -#ifndef __SSE4A__ -#error "SSE4A instruction set not enabled" -#else - #include <pmmintrin.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__("sse4a"))) /// \brief Extracts the specified bits from the lower 64 bits of the 128-bit /// integer vector operand at the index idx and of the length len. @@ -210,6 +206,4 @@ _mm_stream_ss(float *__p, __m128 __a) #undef DEFAULT_FN_ATTRS -#endif /* __SSE4A__ */ - #endif /* __AMMINTRIN_H */ |