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:
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user