]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86: Remove the unused __x86_prefetchw
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 11 Jul 2020 16:04:34 +0000 (09:04 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 11 Jul 2020 16:34:03 +0000 (09:34 -0700)
Since

commit c867597bff2562180a18da4b8dba89d24e8b65c4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jun 8 13:57:50 2016 -0700

    X86-64: Remove previous default/SSE2/AVX2 memcpy/memmove

removed the only usage of __x86_prefetchw, we can remove the unused
__x86_prefetchw.

sysdeps/i386/Makefile
sysdeps/i386/cacheinfo.c [deleted file]
sysdeps/x86/Makefile
sysdeps/x86/cacheinfo.c
sysdeps/x86_64/Makefile

index b9b1367f601acd18a106363069a8c256b11a7c17..a2e8c0b12822be0bad293570a72b3bdddf23972c 100644 (file)
@@ -13,10 +13,6 @@ ifeq ($(subdir),math)
 CFLAGS-e_gamma_r.c += -DMATH_SET_BOTH_ROUNDING_MODES
 endif
 
-ifeq ($(subdir),string)
-sysdep_routines += cacheinfo
-endif
-
 ifeq ($(subdir),gmon)
 sysdep_routines += i386-mcount
 endif
diff --git a/sysdeps/i386/cacheinfo.c b/sysdeps/i386/cacheinfo.c
deleted file mode 100644 (file)
index f15fe07..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#define DISABLE_PREFETCHW
-
-#include <sysdeps/x86/cacheinfo.c>
index beab426f6701c13bc1af93c8186fb7ff73f43ffa..a6736aef2554737fa56b1c5d898ee7075e9b87c8 100644 (file)
@@ -14,6 +14,10 @@ gen-as-const-headers += jmp_buf-ssp.sym
 sysdep_routines += __longjmp_cancel
 endif
 
+ifeq ($(subdir),string)
+sysdep_routines += cacheinfo
+endif
+
 ifneq ($(enable-cet),no)
 ifeq ($(subdir),elf)
 sysdep-dl-routines += dl-cet
index 136809a6d8e4acb7bdd00f93f88ecba169ce49d4..5366a37ea0369efac6bb2429fa95fe148c133efc 100644 (file)
@@ -536,11 +536,6 @@ long int __x86_rep_movsb_threshold attribute_hidden = 2048;
 /* Threshold to use Enhanced REP STOSB.  */
 long int __x86_rep_stosb_threshold attribute_hidden = 2048;
 
-#ifndef DISABLE_PREFETCHW
-/* PREFETCHW support flag for use in memory and string routines.  */
-int __x86_prefetchw attribute_hidden;
-#endif
-
 
 static void
 get_common_cache_info (long int *shared_ptr, unsigned int *threads_ptr,
@@ -831,17 +826,6 @@ init_cacheinfo (void)
          /* Account for exclusive L2 and L3 caches.  */
          shared += core;
        }
-
-#ifndef DISABLE_PREFETCHW
-      if (max_cpuid_ex >= 0x80000001)
-       {
-         unsigned int eax;
-         __cpuid (0x80000001, eax, ebx, ecx, edx);
-         /*  PREFETCHW     || 3DNow!  */
-         if ((ecx & 0x100) || (edx & 0x80000000))
-           __x86_prefetchw = -1;
-       }
-#endif
     }
 
   if (cpu_features->data_cache_size != 0)
index d51cf03ac92ebcc2c899f79877ae041b5d816c80..e3bb45d78811d70f42bfebb8002dbced5bd8437a 100644 (file)
@@ -18,7 +18,7 @@ tests += tst-mallocalign1
 endif
 
 ifeq ($(subdir),string)
-sysdep_routines += cacheinfo strcasecmp_l-nonascii strncase_l-nonascii
+sysdep_routines += strcasecmp_l-nonascii strncase_l-nonascii
 gen-as-const-headers += locale-defines.sym
 endif