From cc9c5cdcf564f3a0aea25a1aff713dc4646e0fb2 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Wed, 8 Jul 2015 14:13:28 +0200 Subject: [PATCH] x86: Add SSE(1) predef --- include/boost/predef/hardware/simd/x86/sse.h | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/include/boost/predef/hardware/simd/x86/sse.h b/include/boost/predef/hardware/simd/x86/sse.h index 6db6a1f..bb4f103 100644 --- a/include/boost/predef/hardware/simd/x86/sse.h +++ b/include/boost/predef/hardware/simd/x86/sse.h @@ -9,4 +9,43 @@ http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE_H #define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE_H +#include + +/*` + [heading `BOOST_HW_SIMD_X86_SSE`] + + [@https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions SSE] x86 extension. + Version number is: 1.0.0. + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__SSE__`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + [[`_M_IX86_FP >= 1`] [__predef_detection__]] + ] + */ + +#define BOOST_HW_SIMD_X86_SSE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1 +# undef BOOST_HW_SIMD_X86_SSE +# define BOOST_HW_SIMD_X86_SSE BOOST_VERSION_NUMBER(1, 0, 0) +# define BOOST_HW_SIMD_X86_SSE_AVAILABLE #endif + +#define BOOST_HW_SIMD_X86_SSE_NAME "SSE(1)" + +#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE_AVAILABLE) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE +# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE_NAME +#endif + +#if defined(BOOST_HW_SIMD_X86_SSE_AVAILABLE) +# include +#endif + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE, BOOST_HW_SIMD_X86_SSE_NAME)