mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-11 11:26:47 +02:00
dsp: add sse4.1 detection
bit 19 in ecx no targets or code https://software.intel.com/en-us/articles/using-cpuid-to-detect-the-presence-of-sse-41-and-sse-42-instruction-sets Change-Id: Ie61b004dd5b6a3639b30bd9d2a09e6d7359b8040
This commit is contained in:
parent
b8d706c8c2
commit
cabf4bd2bc
@ -87,6 +87,9 @@ static int x86CPUInfo(CPUFeature feature) {
|
|||||||
if (feature == kSSE3) {
|
if (feature == kSSE3) {
|
||||||
return 0 != (cpu_info[2] & 0x00000001);
|
return 0 != (cpu_info[2] & 0x00000001);
|
||||||
}
|
}
|
||||||
|
if (feature == kSSE4_1) {
|
||||||
|
return 0 != (cpu_info[2] & 0x00080000);
|
||||||
|
}
|
||||||
if (feature == kAVX) {
|
if (feature == kAVX) {
|
||||||
// bits 27 (OSXSAVE) & 28 (256-bit AVX)
|
// bits 27 (OSXSAVE) & 28 (256-bit AVX)
|
||||||
if ((cpu_info[2] & 0x18000000) == 0x18000000) {
|
if ((cpu_info[2] & 0x18000000) == 0x18000000) {
|
||||||
|
@ -102,6 +102,7 @@ extern "C" {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
kSSE2,
|
kSSE2,
|
||||||
kSSE3,
|
kSSE3,
|
||||||
|
kSSE4_1,
|
||||||
kAVX,
|
kAVX,
|
||||||
kAVX2,
|
kAVX2,
|
||||||
kNEON,
|
kNEON,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user