From patchwork Sat Jul 11 16:09:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 40038 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8569D3857C42; Sat, 11 Jul 2020 16:09:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8569D3857C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1594483750; bh=IDCyntFAlZViaWap6O6lxteZugZseGjK5zIysdkYPi4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OrXRJeFcOmsZXo5YJU1hz2PCht2MaMd5cG/eKLTICQx4c81LpZc5A1C1jgvGhZMc0 rcdn6RvrmvgkP5lHZAqRF4iqvOCXC/rKUWvmNDds1FgPGg37MpjuaW6Eb9S43fi9KB d7d9k8JSCnA39GoK1U6nwJVpgfy5gAF/yp7fWEc0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 446AD3857C40 for ; Sat, 11 Jul 2020 16:09:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 446AD3857C40 Received: by mail-pf1-x42e.google.com with SMTP id 207so3907933pfu.3 for ; Sat, 11 Jul 2020 09:09:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=IDCyntFAlZViaWap6O6lxteZugZseGjK5zIysdkYPi4=; b=SEl2Adjy9tNN0UW4rUdaI1HrP+2XUZ0HUbmwLgV6ZjKg1lHPICJxXeFR3pUJRcNA1q 4tGYGArZxFL+rYr+ggBFJcwmLCB3t36c0SiTqenkNrQZXENjx6wkD5j3vyU92h/NQh4l 7zTN7xaYUIob8s4CqS5gYCDQogJKu9tfNIWCklL6yEZ30Q3kIOnxhQB5ldniq/uG8zyR 6CPsBdMBgdiZXtKwemUQiYED2L+HyIsOmNPyVVkGMDEnGydgFMJi3NeY7gDLfS3Cq+R1 huEue8/8zDxSbPzaIj/T0TdGU2uDY4e9iLfX65Rc4ALvAihrWwF0rs6GqR6UYPJ9mtyk +LyQ== X-Gm-Message-State: AOAM532NPNN9B1viUqby3IMPzrAeh4Tks0LUSSZwHLokO9RNKXSZBq7p Kw+hK7ygU1kNlw+M+pe+3Ocaglwrh9k= X-Google-Smtp-Source: ABdhPJz+eRvlisW4mXWSiblcE/9yjvoeksONmvQa7kZnQemPIUAAxMNM0snaFgcfw+6Tl+QhMzPShA== X-Received: by 2002:a65:4349:: with SMTP id k9mr37741787pgq.404.1594483747225; Sat, 11 Jul 2020 09:09:07 -0700 (PDT) Received: from gnu-gram-1.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id y10sm9230663pfn.121.2020.07.11.09.09.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2020 09:09:06 -0700 (PDT) Received: from gnu-gram-1.localdomain (localhost [IPv6:::1]) by gnu-gram-1.localdomain (Postfix) with ESMTP id BF05DE0043 for ; Sat, 11 Jul 2020 09:09:05 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] x86: Remove the unused __x86_prefetchw Date: Sat, 11 Jul 2020 09:09:05 -0700 Message-Id: <20200711160905.583344-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" I am checking in this patch shortly. H.J. --- Since commit c867597bff2562180a18da4b8dba89d24e8b65c4 Author: H.J. Lu 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 | 4 ---- sysdeps/i386/cacheinfo.c | 3 --- sysdeps/x86/Makefile | 4 ++++ sysdeps/x86/cacheinfo.c | 16 ---------------- sysdeps/x86_64/Makefile | 2 +- 5 files changed, 5 insertions(+), 24 deletions(-) delete mode 100644 sysdeps/i386/cacheinfo.c diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index b9b1367f60..a2e8c0b128 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -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 index f15fe0779a..0000000000 --- a/sysdeps/i386/cacheinfo.c +++ /dev/null @@ -1,3 +0,0 @@ -#define DISABLE_PREFETCHW - -#include diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile index beab426f67..a6736aef25 100644 --- a/sysdeps/x86/Makefile +++ b/sysdeps/x86/Makefile @@ -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 diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c index 136809a6d8..5366a37ea0 100644 --- a/sysdeps/x86/cacheinfo.c +++ b/sysdeps/x86/cacheinfo.c @@ -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) diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index d51cf03ac9..e3bb45d788 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -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