Add x86 missing feature detections for ndk_compat (#58)
One more step towards #47.
diff --git a/include/cpuinfo_x86.h b/include/cpuinfo_x86.h
index 13bcdf4..bb61293 100644
--- a/include/cpuinfo_x86.h
+++ b/include/cpuinfo_x86.h
@@ -20,6 +20,7 @@
CPU_FEATURES_START_CPP_NAMESPACE
// See https://en.wikipedia.org/wiki/CPUID for a list of x86 cpu features.
+// The field names are based on the short name provided in the wikipedia tables.
typedef struct {
int aes : 1;
int erms : 1;
@@ -55,6 +56,10 @@
int smx : 1;
int sgx : 1;
int cx16 : 1; // aka. CMPXCHG16B
+ int sha : 1;
+ int popcnt : 1;
+ int movbe : 1;
+ int rdrnd : 1;
// Make sure to update X86FeaturesEnum below if you add a field here.
} X86Features;
@@ -140,6 +145,10 @@
X86_SMX,
X86_SGX,
X86_CX16,
+ X86_SHA,
+ X86_POPCNT,
+ X86_MOVBE,
+ X86_RDRND,
X86_LAST_,
} X86FeaturesEnum;