-static struct {
- int feature;
- unsigned mask;
- int instruction; /* 0 = ecx, 1 = edx. */
-} features[] = {
- { CF_MMX, 1 << 23, 1 },
- { CF_SSE, 1 << 25, 1 },
- { CF_SSE2, 1 << 26, 1 },
- { CF_SSE3, 1 << 9, 0 },
- { CF_FPU, 1 << 0, 1 },
-
- { CF_TSC, 1 << 4, 1 },
- { CF_MSR, 1 << 5, 1 },
-
- { CF_SSSE3, 1 << 9, 0 },
- { CF_AVX, 1 << 28, 0 },
-
- /* Extended ones. */
- { CEF_x64, 1 << 30, 1 },
- { CEF_FPU, 1 << 0, 1 },
- { CEF_DE, 1 << 2, 1 },
- { CEF_SYSCALLRET, 1 << 11, 1 },
- { CEF_CMOV, 1 << 15, 1 },
-
- { CEF_SSE4a, 1 << 6, 0 },
- { CEF_FMA4, 1 << 16, 0 },
- { CEF_XOP, 1 << 11, 0 }
-};
-
-static int has_feature(int feature, uint32_t ecx, uint32_t edx)