From patchwork Thu Jan 14 16:18:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 10382 Received: (qmail 116646 invoked by alias); 14 Jan 2016 16:18:08 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 116632 invoked by uid 89); 14 Jan 2016 16:18:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=0530, 15414, 154, 14, sk:index_f X-HELO: mail-qg0-f41.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bwtGX2OtcIbiXNg3N8z9KFESqe/D8OlWdZ/DuoRR1hY=; b=balxPAHMSfRRFx0M+htBVH8mt51yNspoKhTnhFHL6S6WPNd4tG+QqN+GPoDH/9/DSS rRUZpk+hcuC7BpmYPUFokOfHjSOuSWMEwf5tNCxK1KjeNDADF9WsZNjvXskMOMIOO313 qpRMKIg9AX/IK7Q5HmEEyJ30uAZEa4mTo1JDRSsePFupPrVTpBSHeYRDjm2usk/VHX19 kVxh570DCg+IXbboE8GgOXfXZa5y8/BdcUaF5g5kQ2DYKAPx9Mk9D0EseoKUYPMPo2qg fIhBaBF5Jd2SXnf0Eigb9tNlmSRw9Bvj1IgkHfPKGTaqEEdADi4Y7QivUaH1/6zpcxj2 WU/w== X-Gm-Message-State: ALoCoQlw/GKltEHXCwnFSvYLZ0L02GaLnpfxolstrRyGdCA4/dBIdJwYa44qA2MRgtckThXmJFanHSrv2ebrKW3lFoQO5dvepw== MIME-Version: 1.0 X-Received: by 10.140.27.139 with SMTP id 11mr6656424qgx.62.1452788284017; Thu, 14 Jan 2016 08:18:04 -0800 (PST) In-Reply-To: <5697C7CC.1080305@linaro.org> References: <5695C851.6020700@redhat.com> <56967E30.2010203@redhat.com> <5697C7CC.1080305@linaro.org> Date: Thu, 14 Jan 2016 08:18:03 -0800 Message-ID: Subject: Re: [PATCH][X86_64] Set bit_Fast_Unaligned_Load for Excavator family CPU's From: "H.J. Lu" To: Adhemerval Zanella Cc: "Pawar, Amit" , "Carlos O'Donell" , "libc-alpha@sourceware.org" On Thu, Jan 14, 2016 at 8:07 AM, Adhemerval Zanella wrote: > OK from my part (you still need x86 maintainers ack to push it upstream). I cleaned it up. This is what I checked in. Thanks. > On 14-01-2016 12:52, Pawar, Amit wrote: >> (a) Ask Adhemerval for an exception to provide this IFUNC tweak for AMD CPUs. >> Done. >> >> (b) Once granted an exception, add your patch to the list of blockers here: >> https://sourceware.org/glibc/wiki/Release/2.23#Release_blockers.3F >> Sure. >> >> Again, please post your new patch as quickly as possible. >> I have filed a bug for this. https://sourceware.org/bugzilla/show_bug.cgi?id=19467 >> PFA patch and if OK please commit it in from my side. >> >> Thanks >> Amit >> From d7890e6947114785755ae5b1cf5310491092ee0b Mon Sep 17 00:00:00 2001 From: Amit Pawar Date: Thu, 14 Jan 2016 20:06:02 +0530 Subject: [PATCH] Set index_Fast_Unaligned_Load for Excavator family CPUs GLIBC benchtest testcases shows SSE2_Unaligned based implementations are performing faster compare to SSE2 based implementations for routines: strcmp, strcat, strncat, stpcpy, stpncpy, strcpy, strncpy and strstr. Flag index_Fast_Unaligned_Load is set for Excavator family 0x15h CPU's. This makes SSE2_Unaligned based implementations as default for these routines. [BZ #19467] * sysdeps/x86/cpu-features.c (init_cpu_features): Set index_Fast_Unaligned_Load flag for Excavator family CPUs. --- ChangeLog | 6 ++++++ sysdeps/x86/cpu-features.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 424f731..054998f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-01-14 Amit Pawar + + [BZ #19467] + * sysdeps/x86/cpu-features.c (init_cpu_features): Set + index_Fast_Unaligned_Load flag for Excavator family CPUs. + 2016-01-02 Marcin Kościelnicki * sysdeps/s390/nptl/tls.h (struct tcbhead_t): Add __private_ss field. diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index e6bd4c9..218ff2b 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -154,6 +154,14 @@ init_cpu_features (struct cpu_features *cpu_features) cpu_features->cpuid[COMMON_CPUID_INDEX_80000001].ebx, cpu_features->cpuid[COMMON_CPUID_INDEX_80000001].ecx, cpu_features->cpuid[COMMON_CPUID_INDEX_80000001].edx); + + if (family == 0x15) + { + /* "Excavator" */ + if (model >= 0x60 && model <= 0x7f) + cpu_features->feature[index_Fast_Unaligned_Load] + |= bit_Fast_Unaligned_Load; + } } else kind = arch_kind_other; -- 2.5.0