mirror of
https://github.com/boostorg/predef.git
synced 2025-07-30 19:57:14 +02:00
x86: Add SSE4a predef
This commit is contained in:
@ -9,4 +9,42 @@ http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4A_H
|
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4A_H
|
||||||
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4A_H
|
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4A_H
|
||||||
|
|
||||||
|
#include <boost/predef/version_number.h>
|
||||||
|
|
||||||
|
/*`
|
||||||
|
[heading `BOOST_HW_SIMD_X86_SSE4A`]
|
||||||
|
|
||||||
|
[@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension.
|
||||||
|
Version number is the default BOOST_VERSION_NUMBER_AVAILABLE.
|
||||||
|
|
||||||
|
This extension is only available on particular CPUs. It does imply
|
||||||
|
SSE3, but it is not implied by extensions newer than SSE3. For example,
|
||||||
|
SSE4.1 does not imply it.
|
||||||
|
|
||||||
|
[table
|
||||||
|
[[__predef_symbol__] [__predef_version__]]
|
||||||
|
|
||||||
|
[[`__SSE4A__`] [__predef_detection__]]
|
||||||
|
]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOOST_HW_SIMD_X86_SSE4A BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||||
|
|
||||||
|
#if defined(__SSE4A__)
|
||||||
|
# undef BOOST_HW_SIMD_X86_SSE4A
|
||||||
|
/* We do not give a valid version for this one, since it not always
|
||||||
|
* available if newer extension than SSE3 are enabled. */
|
||||||
|
# define BOOST_HW_SIMD_X86_SSE4A BOOST_VERSION_NUMBER_AVAILABLE
|
||||||
|
# define BOOST_HW_SIMD_X86_SSE4A_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BOOST_HW_SIMD_X86_SSE4A_NAME "SSE4a"
|
||||||
|
|
||||||
|
#if defined(BOOST_HW_SIMD_X86_SSE4A_AVAILABLE)
|
||||||
|
# include <ammintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/predef/detail/test.h>
|
||||||
|
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE4A, BOOST_HW_SIMD_X86_SSE4A_NAME)
|
||||||
|
Reference in New Issue
Block a user