Commit graph

12 commits

Author SHA1 Message Date
Nikita Popov
5a361c3a54 Possible fix for bug #77357
Don't invoke CPUID with feature levels above the supported maximum.
In this case CPUID will return the highest supported basic information
leaf, which will have unrelated bits in the relevant positions.
2019-01-03 10:24:48 +01:00
Ryan Schmidt
4fb019994a Fix __zend_cpuid on i386 PIC without __cpuid_count
Closes https://bugs.php.net/bug.php?id=76654
2018-12-08 09:52:52 -06:00
Christoph M. Becker
7625f972db Fix #76825: Undefined symbols ___cpuid_count
Apparently, the presence of `cpuid.h` is not necessarily sufficient to
guarantee the availability of `__cpuid_count()`.  We therefore test for
the latter explicitly.
2018-11-05 18:24:39 +01:00
Xinchen Hui
3497b75b73 Fixed bug #76825 (Undefined symbols ___cpuid_count) 2018-09-04 17:26:46 +08:00
Anatol Belski
36857ab52b Fix clang compilation
By usage of -fmodules, all the intrinsic items are loaded automatically.
The headers included come however from Visual Studio, thus bringing some
conflicting declarations. On the other hand, -fmodules is needed to
mitigate linking issues with clang in VS compatibility mode.
2018-08-01 16:19:54 +02:00
Ondřej Surý
1a078117b5 Use __cpuid_count() from cpuid.h instead of custom assembly 2018-07-17 13:59:53 +00:00
Xinchen Hui
08428cf6a7 Fixed cpuinfo in LLVM GCC & Added AVX2 detection
Seems it only defines __builtin_cpu_supports but no __builtin_cpu_init
(Apple LLVM version 9.0.0 (clang-900.0.38))
2018-02-10 17:38:30 +08:00
Xinchen Hui
87b7180480 Fixed cpu feature check in reslover functions 2018-02-10 16:58:27 +08:00
Anatol Belski
74de5461eb The cpu setup is still needed when ifunc is supported 2018-01-16 11:55:19 +01:00
Anatol Belski
811326089f Separate the cpuinfo initialization part and call it at startup 2018-01-16 11:27:18 +01:00
Anatol Belski
560cc32e21 Fix __cpuidex usage 2018-01-16 10:56:46 +01:00
Xinchen Hui
3a3e0493d0 Added ZEND_API zend_cpu_supports 2018-01-16 14:53:00 +08:00