diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index c561e0fdf2d..e1370eecf88 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -494,21 +494,21 @@ extern "C++" { #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 diff --git a/build/php.m4 b/build/php.m4 index 0ccd919344b..e3548e7cfa2 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2669,30 +2669,6 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [ [$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports]) ]) -dnl -dnl PHP_CHECK_CPU_SUPPORTS -dnl -AC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [ - AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT]) - AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS]) - have_ext_instructions=0 - if test $have_builtin_cpu_supports = 1; then - AC_MSG_CHECKING([for $1 instructions supports]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -int main() { - return __builtin_cpu_supports("$1")? 0 : 1; -} - ]])], [ - have_ext_instructions=1 - AC_MSG_RESULT([yes]) - ], [ - AC_MSG_RESULT([no]) - ], [AC_MSG_RESULT([no])]) - fi - AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]), - [$have_ext_instructions], [Whether the compiler supports $1 instructions]) -]) - dnl dnl PHP_PATCH_CONFIG_HEADERS([FILE]) dnl diff --git a/configure.ac b/configure.ac index 50cfd0d4190..1a17aa904da 100644 --- a/configure.ac +++ b/configure.ac @@ -499,12 +499,6 @@ PHP_CHECK_BUILTIN_CPU_INIT dnl Check __builtin_cpu_supports PHP_CHECK_BUILTIN_CPU_SUPPORTS -dnl Check instructions. -PHP_CHECK_CPU_SUPPORTS([ssse3]) -PHP_CHECK_CPU_SUPPORTS([sse4.2]) -PHP_CHECK_CPU_SUPPORTS([avx]) -PHP_CHECK_CPU_SUPPORTS([avx2]) - dnl Check for structure members. AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include ]) AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])