While the use of zend_cpu_supports_*() is only strictly necessary
inside ifunc resolvers, where the cpu state has not been initialized
yet, we should prefer the compiler builtins in all cases.
static int zend_jit_setup(void)
{
- if (!zend_cpu_supports(ZEND_CPU_FEATURE_SSE2)) {
+ if (!zend_cpu_supports_sse2()) {
zend_error(E_CORE_ERROR, "CPU doesn't support SSE2");
return FAILURE;
}
allowed_opt_flags = 0;
- if (zend_cpu_supports(ZEND_CPU_FEATURE_AVX)) {
+ if (zend_cpu_supports_avx()) {
allowed_opt_flags |= ZEND_JIT_CPU_AVX;
}
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(crc32_x86_intrin)
{
- if (zend_cpu_supports(ZEND_CPU_FEATURE_SSE42) && zend_cpu_supports(ZEND_CPU_FEATURE_PCLMULQDQ)) {
+ if (zend_cpu_supports_sse42() && zend_cpu_supports_pclmul()) {
crc32_x86_simd_ptr = crc32_sse42_pclmul_update;
}
return SUCCESS;
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(string_intrin)
{
- if (zend_cpu_supports(ZEND_CPU_FEATURE_SSE42)) {
+ if (zend_cpu_supports_sse42()) {
php_addslashes_ptr = php_addslashes_sse42;
php_stripslashes_ptr = php_stripslashes_sse42;
} else {