Module: Mesa
Branch: main
Commit: 159c7973628c98a3c78fe287592b79d06421b7f7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=159c7973628c98a3c78fe287592b79d06421b7f7

Author: Jordan Justen <[email protected]>
Date:   Sun Apr  9 12:25:14 2023 -0700

util/u_cpu_detect: Drop unused has_tsc

This will allow us to add has_clflushopt without spilling into an new
unsigned.

Suggested-by: Kenneth Graunke <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22379>

---

 src/util/u_cpu_detect.c | 2 --
 src/util/u_cpu_detect.h | 3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c
index ee38d3ff907..395c93b21f5 100644
--- a/src/util/u_cpu_detect.c
+++ b/src/util/u_cpu_detect.c
@@ -853,7 +853,6 @@ _util_cpu_detect_once(void)
          }
 
          /* general feature flags */
-         util_cpu_caps.has_tsc    = (regs2[3] >>  4) & 1; /* 0x0000010 */
          util_cpu_caps.has_mmx    = (regs2[3] >> 23) & 1; /* 0x0800000 */
          util_cpu_caps.has_sse    = (regs2[3] >> 25) & 1; /* 0x2000000 */
          util_cpu_caps.has_sse2   = (regs2[3] >> 26) & 1; /* 0x4000000 */
@@ -958,7 +957,6 @@ _util_cpu_detect_once(void)
       printf("util_cpu_caps.x86_cpu_type = %u\n", util_cpu_caps.x86_cpu_type);
       printf("util_cpu_caps.cacheline = %u\n", util_cpu_caps.cacheline);
 
-      printf("util_cpu_caps.has_tsc = %u\n", util_cpu_caps.has_tsc);
       printf("util_cpu_caps.has_mmx = %u\n", util_cpu_caps.has_mmx);
       printf("util_cpu_caps.has_mmx2 = %u\n", util_cpu_caps.has_mmx2);
       printf("util_cpu_caps.has_sse = %u\n", util_cpu_caps.has_sse);
diff --git a/src/util/u_cpu_detect.h b/src/util/u_cpu_detect.h
index f9db16f82da..86ce91267c5 100644
--- a/src/util/u_cpu_detect.h
+++ b/src/util/u_cpu_detect.h
@@ -88,7 +88,6 @@ struct util_cpu_caps_t {
    unsigned cacheline;
 
    unsigned has_intel:1;
-   unsigned has_tsc:1;
    unsigned has_mmx:1;
    unsigned has_mmx2:1;
    unsigned has_sse:1;
@@ -121,6 +120,8 @@ struct util_cpu_caps_t {
    unsigned has_avx512vl:1;
    unsigned has_avx512vbmi:1;
 
+   unsigned unused:1;
+
    unsigned num_L3_caches;
    unsigned num_cpu_mask_bits;
    unsigned max_vector_bits;

Reply via email to