diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-31 11:27:53 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-31 11:27:53 +0100 |
commit | edccf32f7f36a8bc759b9482737e0c3efcb3a005 (patch) | |
tree | f5e10ad5c6c8349d0975d4267efefb6f98ccfeff /Zend | |
parent | 333d607d47ca6eec96637c1c8686591dec6f5a0b (diff) | |
download | php-git-edccf32f7f36a8bc759b9482737e0c3efcb3a005.tar.gz |
Remove configure checks for supported instruction sets
These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.
This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_portability.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 1e549d300b..3331b9ed10 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -532,21 +532,21 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */ #endif #if (defined(__i386__) || defined(__x86_64__)) -# if PHP_HAVE_SSSE3_INSTRUCTIONS && defined(HAVE_TMMINTRIN_H) -# define PHP_HAVE_SSSE3 +# if defined(HAVE_TMMINTRIN_H) +# define PHP_HAVE_SSSE3 # endif -# if PHP_HAVE_SSE4_2_INSTRUCTIONS && defined(HAVE_NMMINTRIN_H) -# define PHP_HAVE_SSE4_2 +# if defined(HAVE_NMMINTRIN_H) +# define PHP_HAVE_SSE4_2 # endif /* * AVX2 support was added in gcc 4.7, but AVX2 intrinsics don't work in * __attribute__((target("avx2"))) functions until gcc 4.9. */ -# if PHP_HAVE_AVX2_INSTRUCTIONS && defined(HAVE_IMMINTRIN_H) && \ +# if defined(HAVE_IMMINTRIN_H) && \ (defined(__llvm__) || defined(__clang__) || (defined(__GNUC__) && ZEND_GCC_VERSION >= 4009)) -# define PHP_HAVE_AVX2 +# define PHP_HAVE_AVX2 # endif #endif |