util: Move u_debug to utils
[mesa.git] / src / gallium / auxiliary / util / u_cpu_detect.h
index 4b3dc39c3428d610956cd631ef851fdc975b5fa8..efc910d147304fc5e678c4e376abfce5eccf4ee2 100644 (file)
 #ifndef _UTIL_CPU_DETECT_H
 #define _UTIL_CPU_DETECT_H
 
+
 #include "pipe/p_compiler.h"
+#include "pipe/p_config.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-enum util_cpu_arch {
-   UTIL_CPU_ARCH_UNKNOWN = 0,
-   UTIL_CPU_ARCH_MIPS,
-   UTIL_CPU_ARCH_ALPHA,
-   UTIL_CPU_ARCH_SPARC,
-   UTIL_CPU_ARCH_X86,
-   UTIL_CPU_ARCH_POWERPC
-};
 
 struct util_cpu_caps {
-   enum util_cpu_arch arch;
-   unsigned nr_cpus;
+   int nr_cpus;
 
    /* Feature flags */
    int x86_cpu_type;
    unsigned cacheline;
+   unsigned cores_per_L3;
 
-   unsigned little_endian:1;
-
+   unsigned has_intel:1;
    unsigned has_tsc:1;
    unsigned has_mmx:1;
    unsigned has_mmx2:1;
@@ -64,9 +62,29 @@ struct util_cpu_caps {
    unsigned has_sse3:1;
    unsigned has_ssse3:1;
    unsigned has_sse4_1:1;
+   unsigned has_sse4_2:1;
+   unsigned has_popcnt:1;
+   unsigned has_avx:1;
+   unsigned has_avx2:1;
+   unsigned has_f16c:1;
+   unsigned has_fma:1;
    unsigned has_3dnow:1;
    unsigned has_3dnow_ext:1;
+   unsigned has_xop:1;
    unsigned has_altivec:1;
+   unsigned has_vsx:1;
+   unsigned has_daz:1;
+   unsigned has_neon:1;
+
+   unsigned has_avx512f:1;
+   unsigned has_avx512dq:1;
+   unsigned has_avx512ifma:1;
+   unsigned has_avx512pf:1;
+   unsigned has_avx512er:1;
+   unsigned has_avx512cd:1;
+   unsigned has_avx512bw:1;
+   unsigned has_avx512vl:1;
+   unsigned has_avx512vbmi:1;
 };
 
 extern struct util_cpu_caps
@@ -75,4 +93,9 @@ util_cpu_caps;
 void util_cpu_detect(void);
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _UTIL_CPU_DETECT_H */