diff --git a/include/boost/predef/hardware/simd/arm.h b/include/boost/predef/hardware/simd/arm.h index e827938..a2b802a 100644 --- a/include/boost/predef/hardware/simd/arm.h +++ b/include/boost/predef/hardware/simd/arm.h @@ -6,37 +6,48 @@ Distributed under the Boost Software License, Version 1.0. http://www.boost.org/LICENSE_1_0.txt) */ -// From the newest to the oldest -#include - #ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_H #define BOOST_PREDEF_HARDWARE_SIMD_ARM_H #include +#include /*` [heading `BOOST_HW_SIMD_ARM`] The SIMD extension for ARM (if detected). - Version number depends on the detected extension. - - BOOST_HW_SIMD_ARM is defined by the first detected extension. + Version number depends on the most recent detected extension. [table [[__predef_symbol__] [__predef_version__]] - [[`BOOST_HW_SIMD_ARM`] [__predef_detection__]] - [[`BOOST_HW_SIMD_ARM`] [V.R.P]] + + [[__predef_detection__] [__predef_detection__]] + [[`__aarch64__`] [__predef_detection__]] + [[`_M_ARM`] [__predef_detection__]] + + + [[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] + [[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] + [[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] ] */ -#if defined(BOOST_HW_SIMD_ARM) -# define BOOST_HW_SIMD_ARM_AVAILABLE -#else -# define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE -# define BOOST_HW_SIMD_ARM_NAME "ARM SIMD" +#define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#undef BOOST_HW_SIMD_ARM +#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM)) +# define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION #endif +#if !defined(BOOST_HW_SIMD_ARM) +# define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE +#else +# define BOOST_HW_SIMD_ARM_AVAILABLE +#endif + +#define BOOST_HW_SIMD_ARM_NAME "ARM SIMD" + #endif #include diff --git a/include/boost/predef/hardware/simd/arm/neon.h b/include/boost/predef/hardware/simd/arm/neon.h deleted file mode 100644 index 4c96482..0000000 --- a/include/boost/predef/hardware/simd/arm/neon.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright Charly Chevalier 2015 -Copyright Joel Falcou 2015 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at -http://www.boost.org/LICENSE_1_0.txt) -*/ - -#ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_NEON_H -#define BOOST_PREDEF_HARDWARE_SIMD_ARM_NEON_H - -#include - -/*` - [heading `BOOST_HW_SIMD_ARM_NEON`] - - [@https://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_.28NEON.29 NEON] ARM extension. - Version number is: 1.0.0. - - [table - [[__predef_symbol__] [__predef_version__]] - - [[`__ARM_NEON__`] [__predef_detection__]] - [[`__aarch64__`] [__predef_detection__]] - [[`_M_ARM`] [__predef_detection__]] - ] - */ - -#define BOOST_HW_SIMD_ARM_NEON BOOST_VERSION_NUMBER_NOT_AVAILABLE - -#if defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) -# undef BOOST_HW_SIMD_ARM_NEON -# define BOOST_HW_SIMD_ARM_NEON BOOST_VERSION_NUMBER(1, 0, 0) -# define BOOST_HW_SIMD_ARM_NEON_AVAILABLE -#endif - -#define BOOST_HW_SIMD_ARM_NEON_NAME "ARM SIMD NEON" - -#if !defined(BOOST_HW_SIMD_ARM) && defined(BOOST_HW_SIMD_ARM_NEON_AVAILABLE) -# define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON -# define BOOST_HW_SIMD_ARM_NAME BOOST_HW_SIMD_ARM_NEON_NAME -#endif - -#endif - -#include -BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM_NEON, BOOST_HW_SIMD_ARM_NEON_NAME) diff --git a/include/boost/predef/hardware/simd/arm/versions.h b/include/boost/predef/hardware/simd/arm/versions.h new file mode 100644 index 0000000..ad15931 --- /dev/null +++ b/include/boost/predef/hardware/simd/arm/versions.h @@ -0,0 +1,31 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_H + +#include + +/*` + [heading `BOOST_HW_SIMD_ARM_*_VERSION`] + + [note Those defines represent ARM SIMD extensions versions. You can + compare them with the predef BOOST_HW_SIMD_ARM.] + */ + +// --------------------------------- + +/*` + [heading `BOOST_HW_SIMD_ARM_NEON`] + + [@https://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_.28NEON.29 NEON] ARM extension. + Version number is: 1.0.0. + */ +#define BOOST_HW_SIMD_ARM_NEON_VERSION BOOST_VERSION_NUMBER(1, 0, 0) + +#endif