Lines Matching refs:cpuinfo
29 static zend_cpu_info cpuinfo = {0}; variable
34 static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo) { in __zend_cpuid() argument
35 __cpuid_count(func, subfunc, cpuinfo->eax, cpuinfo->ebx, cpuinfo->ecx, cpuinfo->edx); in __zend_cpuid()
38 static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo) { in __zend_cpuid() argument
46 : "=a"(cpuinfo->eax), "=r"(cpuinfo->ebx), "=c"(cpuinfo->ecx), "=d"(cpuinfo->edx) in __zend_cpuid()
52 : "=a"(cpuinfo->eax), "=b"(cpuinfo->ebx), "=c"(cpuinfo->ecx), "=d"(cpuinfo->edx) in __zend_cpuid()
60 static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo) { in __zend_cpuid() argument
65 cpuinfo->eax = regs[0]; in __zend_cpuid()
66 cpuinfo->ebx = regs[1]; in __zend_cpuid()
67 cpuinfo->ecx = regs[2]; in __zend_cpuid()
68 cpuinfo->edx = regs[3]; in __zend_cpuid()
71 static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo) { in __zend_cpuid() argument
72 cpuinfo->eax = 0; in __zend_cpuid()
94 if (!(cpuinfo.ecx & ZEND_CPU_FEATURE_AVX)) { in is_avx_supported()
98 if (!(cpuinfo.ecx & ZEND_CPU_FEATURE_OSXSAVE)) { in is_avx_supported()
116 if (!cpuinfo.initialized) { in zend_cpu_startup()
120 cpuinfo.initialized = 1; in zend_cpu_startup()
121 __zend_cpuid(0, 0, &cpuinfo); in zend_cpu_startup()
122 max_feature = cpuinfo.eax; in zend_cpu_startup()
127 __zend_cpuid(1, 0, &cpuinfo); in zend_cpu_startup()
132 cpuinfo.ebx = ebx.ebx; in zend_cpu_startup()
134 cpuinfo.ebx = 0; in zend_cpu_startup()
138 cpuinfo.edx &= ~ZEND_CPU_FEATURE_AVX; in zend_cpu_startup()
139 cpuinfo.ebx &= ~(ZEND_CPU_FEATURE_AVX2 & ~ZEND_CPU_EBX_MASK); in zend_cpu_startup()
145 ZEND_ASSERT(cpuinfo.initialized); in zend_cpu_supports()
147 return (cpuinfo.edx & (feature & ~ZEND_CPU_EDX_MASK)); in zend_cpu_supports()
149 return (cpuinfo.ebx & (feature & ~ZEND_CPU_EBX_MASK)); in zend_cpu_supports()
151 return (cpuinfo.ecx & feature); in zend_cpu_supports()