x86: Add SSE4.2 predef

This commit is contained in:
Charly Chevalier
2015-07-08 16:53:17 +02:00
parent a01ebb6605
commit e29bfedc3e

View File

@ -9,4 +9,41 @@ http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4_2_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4_2_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE4_2`]
[@https://en.wikipedia.org/wiki/SSE4##SSE4.2 SSE4_2] x86 extension.
Version number is: 4.1.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE4_2__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE4_2 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE4_2__)
# undef BOOST_HW_SIMD_X86_SSE4_2
# define BOOST_HW_SIMD_X86_SSE4_2 BOOST_VERSION_NUMBER(4, 2, 0)
# define BOOST_HW_SIMD_X86_SSE4_2_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE4_2_NAME "SSE4.2"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE4_2_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_2
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE4_2_NAME
#endif
#if defined(BOOST_HW_SIMD_X86_SSE4_2_AVAILABLE)
# include <nmmintrin.h>
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE4_2, BOOST_HW_SIMD_X86_SSE4_2_NAME)