diff --git a/include/boost/predef/hardware/simd/ppc.h b/include/boost/predef/hardware/simd/ppc.h index e664dce..4815d7a 100644 --- a/include/boost/predef/hardware/simd/ppc.h +++ b/include/boost/predef/hardware/simd/ppc.h @@ -6,11 +6,6 @@ Distributed under the Boost Software License, Version 1.0. http://www.boost.org/LICENSE_1_0.txt) */ -// From the newest to the oldest -#include -#include -#include - #ifndef BOOST_PREDEF_HARDWARE_SIMD_PPC_H #define BOOST_PREDEF_HARDWARE_SIMD_PPC_H @@ -19,26 +14,50 @@ http://www.boost.org/LICENSE_1_0.txt) /*` [heading `BOOST_HW_SIMD_PPC`] - The SIMD extension for x86 (if detected). - Version number depends on the detected extension. - - BOOST_HW_SIMD_PPC is defined by the first detected extension. They are - checked from the newest to the oldest. (QPX -> VSX -> VMX) + The SIMD extension for PowerPC (if detected). + Version number depends on the most recent detected extension. [table [[__predef_symbol__] [__predef_version__]] - [[`BOOST_HW_SIMD_PPC`] [__predef_detection__]] - [[`BOOST_HW_SIMD_PPC`] [V.R.P]] + + [[`__VECTOR4DOUBLE__`] [__predef_detection__]] + + [[`__ALTIVEC__`] [__predef_detection__]] + [[`__VEC__`] [__predef_detection__]] + + [[`__VSX__`] [__predef_detection__]] + + + [[`__VECTOR4DOUBLE__`] [BOOST_HW_SIMD_PPC_QPX_VERSION]] + + [[`__ALTIVEC__`] [BOOST_HW_SIMD_PPC_VMX_VERSION]] + [[`__VEC__`] [BOOST_HW_SIMD_PPC_VMX_VERSION]] + + [[`__VSX__`] [BOOST_HW_SIMD_PPC_VSX_VERSION]] ] */ -#if defined(BOOST_HW_SIMD_PPC) -# define BOOST_HW_SIMD_PPC_AVAILABLE -#else -# define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE -# define BOOST_HW_SIMD_PPC_NAME "PowerPC SIMD" +#define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#undef BOOST_HW_SIMD_PPC +#if !defined(BOOST_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__) +# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_QPX_VERSION #endif +#if !defined(BOOST_HW_SIMD_PPC) && defined(__VSX__) +# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VSX_VERSION +#endif +#if !defined(BOOST_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__)) +# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VMX_VERSION +#endif + +#if !defined(BOOST_HW_SIMD_PPC) +# define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE +#else +# define BOOST_HW_SIMD_PPC_AVAILABLE +#endif + +#define BOOST_HW_SIMD_PPC_NAME "PPC SIMD" #endif diff --git a/include/boost/predef/hardware/simd/ppc/qpx.h b/include/boost/predef/hardware/simd/ppc/qpx.h deleted file mode 100644 index ff65141..0000000 --- a/include/boost/predef/hardware/simd/ppc/qpx.h +++ /dev/null @@ -1,45 +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_PPC_QPX_H -#define BOOST_PREDEF_HARDWARE_SIMD_PPC_QPX_H - -#include - -/*` - [heading `BOOST_HW_SIMD_PPC_QPX`] - - QPX powerpc extension. - Version number is: 2.0.0. - - [table - [[__predef_symbol__] [__predef_version__]] - - [[`__VECTOR4DOUBLE__`] [__predef_detection__]] - ] - */ - -#define BOOST_HW_SIMD_PPC_QPX BOOST_VERSION_NUMBER_NOT_AVAILABLE - -#if defined(__VECTOR4DOUBLE__) -# undef BOOST_HW_SIMD_PPC_QPX -# define BOOST_HW_SIMD_PPC_QPX BOOST_VERSION_NUMBER(2, 0, 0) -# define BOOST_HW_SIMD_PPC_QPX_AVAILABLE -#endif - -#define BOOST_HW_SIMD_PPC_QPX_NAME "PowerPC SIMD QPX" - -#if !defined(BOOST_HW_SIMD_PPC) && defined(BOOST_HW_SIMD_PPC_QPX_AVAILABLE) -# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_QPX -# define BOOST_HW_SIMD_PPC_NAME BOOST_HW_SIMD_PPC_QPX_NAME -#endif - -#endif - -#include -BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC_QPX, BOOST_HW_SIMD_PPC_QPX_NAME) diff --git a/include/boost/predef/hardware/simd/ppc/versions.h b/include/boost/predef/hardware/simd/ppc/versions.h new file mode 100644 index 0000000..3570e7a --- /dev/null +++ b/include/boost/predef/hardware/simd/ppc/versions.h @@ -0,0 +1,47 @@ +/* +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_PPC_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_H + +#include + +/*` + [heading `BOOST_HW_SIMD_PPC_*_VERSION`] + + [note Those defines represent Power PC SIMD extensions versions. You can + compare them with the predef BOOST_HW_SIMD_PPC.] + */ + +// --------------------------------- + +/*` + [heading `BOOST_HW_SIMD_PPC_VMX`] + + [@https://en.wikipedia.org/wiki/AltiVec#VMX128 VMX] powerpc extension. + Version number is: 1.0.0. + */ +#define BOOST_HW_SIMD_PPC_VMX_VERSION BOOST_VERSION_NUMBER(1, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_PPC_VSX`] + + [@https://en.wikipedia.org/wiki/AltiVec#VSX VSX] powerpc extension. + Version number is: 1.1.0. + */ +#define BOOST_HW_SIMD_PPC_VSX_VERSION BOOST_VERSION_NUMBER(1, 1, 0) + +/*` + [heading `BOOST_HW_SIMD_PPC_QPX`] + + QPX powerpc extension. + Version number is: 2.0.0. + */ +#define BOOST_HW_SIMD_PPC_QPX_VERSION BOOST_VERSION_NUMBER(2, 0, 0) + +#endif diff --git a/include/boost/predef/hardware/simd/ppc/vmx.h b/include/boost/predef/hardware/simd/ppc/vmx.h deleted file mode 100644 index 176cc24..0000000 --- a/include/boost/predef/hardware/simd/ppc/vmx.h +++ /dev/null @@ -1,46 +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_PPC_VMX_H -#define BOOST_PREDEF_HARDWARE_SIMD_PPC_VMX_H - -#include - -/*` - [heading `BOOST_HW_SIMD_PPC_VMX`] - - [@https://en.wikipedia.org/wiki/AltiVec#VMX128 VMX] powerpc extension. - Version number is: 1.0.0. - - [table - [[__predef_symbol__] [__predef_version__]] - - [[`__ALTIVEC__`] [__predef_detection__]] - [[`__VEC__`] [__predef_detection__]] - ] - */ - -#define BOOST_HW_SIMD_PPC_VMX BOOST_VERSION_NUMBER_NOT_AVAILABLE - -#if defined(__ALTIVEC__) || defined(__VEC__) -# undef BOOST_HW_SIMD_PPC_VMX -# define BOOST_HW_SIMD_PPC_VMX BOOST_VERSION_NUMBER(1, 0, 0) -# define BOOST_HW_SIMD_PPC_VMX_AVAILABLE -#endif - -#define BOOST_HW_SIMD_PPC_VMX_NAME "PowerPC SIMD VMX" - -#if !defined(BOOST_HW_SIMD_PPC) && defined(BOOST_HW_SIMD_PPC_VMX_AVAILABLE) -# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VMX -# define BOOST_HW_SIMD_PPC_NAME BOOST_HW_SIMD_PPC_VMX_NAME -#endif - -#endif - -#include -BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC_VMX, BOOST_HW_SIMD_PPC_VMX_NAME) diff --git a/include/boost/predef/hardware/simd/ppc/vsx.h b/include/boost/predef/hardware/simd/ppc/vsx.h deleted file mode 100644 index c708ab5..0000000 --- a/include/boost/predef/hardware/simd/ppc/vsx.h +++ /dev/null @@ -1,45 +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_PPC_VSX_H -#define BOOST_PREDEF_HARDWARE_SIMD_PPC_VSX_H - -#include - -/*` - [heading `BOOST_HW_SIMD_PPC_VSX`] - - [@https://en.wikipedia.org/wiki/AltiVec#VSX VSX] powerpc extension. - Version number is: 1.1.0. - - [table - [[__predef_symbol__] [__predef_version__]] - - [[`__VSX__`] [__predef_detection__]] - ] - */ - -#define BOOST_HW_SIMD_PPC_VSX BOOST_VERSION_NUMBER_NOT_AVAILABLE - -#if defined(__VSX__) -# undef BOOST_HW_SIMD_PPC_VSX -# define BOOST_HW_SIMD_PPC_VSX BOOST_VERSION_NUMBER(1, 1, 0) -# define BOOST_HW_SIMD_PPC_VSX_AVAILABLE -#endif - -#define BOOST_HW_SIMD_PPC_VSX_NAME "PowerPC SIMD VSX" - -#if !defined(BOOST_HW_SIMD_PPC) && defined(BOOST_HW_SIMD_PPC_VSX_AVAILABLE) -# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VSX -# define BOOST_HW_SIMD_PPC_NAME BOOST_HW_SIMD_PPC_VSX_NAME -#endif - -#endif - -#include -BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC_VSX, BOOST_HW_SIMD_PPC_VSX_NAME)