1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

The cpu setup is still needed when ifunc is supported

This commit is contained in:
Anatol Belski
2018-01-16 11:55:19 +01:00
parent 1fd651650f
commit 74de5461eb
2 changed files with 6 additions and 0 deletions

View File

@@ -753,7 +753,9 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
extern zend_php_scanner_globals language_scanner_globals;
#endif
#ifndef HAVE_FUNC_ATTRIBUTE_IFUNC
zend_cpu_startup();
#endif
#ifdef ZEND_WIN32
php_win32_cp_set_by_id(65001);

View File

@@ -68,6 +68,10 @@ void zend_cpu_startup(void)
}
ZEND_API int zend_cpu_supports(zend_cpu_feature feature) {
#ifdef HAVE_FUNC_ATTRIBUTE_IFUNC
/* The resolver is invoked before zend_startup(). */
zend_cpu_startup();
#endif
if (feature & ZEND_CPU_EDX_MASK) {
return (cpuinfo.edx & (feature & ~ZEND_CPU_EDX_MASK));
} else {