File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -577,7 +577,7 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */
577
577
# define ZEND_INTRIN_SSSE3_FUNC_DECL (func )
578
578
#endif
579
579
580
- #ifdef __SSE4_2__
580
+ #if defined( HAVE_SSE4_2_DEF ) || (defined( ZEND_WIN32 ) && defined( __SSE4_2__ ))
581
581
/* Instructions compiled directly. */
582
582
# define ZEND_INTRIN_SSE4_2_NATIVE 1
583
583
#elif (defined(HAVE_FUNC_ATTRIBUTE_TARGET ) && defined(PHP_HAVE_SSE4_2 )) || defined(ZEND_WIN32 )
Original file line number Diff line number Diff line change @@ -565,6 +565,24 @@ PHP_CHECK_CPU_SUPPORTS([sse4.2])
565
565
PHP_CHECK_CPU_SUPPORTS([ avx] )
566
566
PHP_CHECK_CPU_SUPPORTS([ avx2] )
567
567
568
+ dnl The ABI of php_addslashes in PHP 7.3 is dependent on __SSE4_2__,
569
+ dnl which depends on target attributes. Use this check to make sure that
570
+ dnl SSE 4.2 availability during the PHP compilation is used, independently
571
+ dnl of whether extensions are compiled with SSE 4.2 support.
572
+ AC_MSG_CHECKING ( [ whether __SSE4_2__ is defined] )
573
+ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ [
574
+ int main() {
575
+ #if defined(__SSE4_2__)
576
+ return 0;
577
+ #else
578
+ return 1;
579
+ #endif
580
+ }
581
+ ] ] ) ] , [
582
+ AC_MSG_RESULT ( [ yes] )
583
+ AC_DEFINE ( HAVE_SSE4_2_DEF , 1 , [ Define if __SSE4_2__ has been defined] )
584
+ ] , [ AC_MSG_RESULT ( [ no] ) ] , [ AC_MSG_RESULT ( [ no] ) ] )
585
+
568
586
dnl Check for members of the stat structure
569
587
AC_CHECK_MEMBERS ( [ struct stat.st_blksize, struct stat.st_rdev] )
570
588
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exist
You can’t perform that action at this time.
0 commit comments