1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 13:21:13 +02:00

Add x86 missing feature detections for ndk_compat (#58)

One more step towards #47.
This commit is contained in:
Guillaume Chatelet
2019-01-22 13:19:42 +01:00
committed by GitHub
parent 5911e96bbd
commit d395dfa026
4 changed files with 38 additions and 5 deletions

View File

@ -124,15 +124,15 @@ static void android_cpuInit(void) {
#elif defined(CPU_FEATURES_ARCH_X86)
X86Info info = GetX86Info();
if (info.features.ssse3) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSSE3;
if (info.features.popcnt) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_POPCNT;
if (info.features.movbe) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_MOVBE;
if (info.features.sse4_1) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSE4_1;
if (info.features.sse4_2) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSE4_2;
if (info.features.aes) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AES_NI;
if (info.features.avx) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AVX;
if (info.features.rdrnd) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_RDRAND;
if (info.features.avx2) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AVX2;
// if (info.features.) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_MOVBE;
// if (info.features.) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AES_NI;
// if (info.features.) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_RDRAND;
// if (info.features.) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_POPCNT;
// if (info.features.) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SHA_NI;
if (info.features.sha) g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SHA_NI;
#elif defined(CPU_FEATURES_ARCH_MIPS)
MipsInfo info = GetMipsInfo();
if (info.features.r6) g_cpuFeatures |= ANDROID_CPU_MIPS_FEATURE_R6;