From patchwork Mon Jul 27 12:46:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Bilka X-Patchwork-Id: 7865 X-Patchwork-Delegate: tuliom@linux.vnet.ibm.com Received: (qmail 88308 invoked by alias); 27 Jul 2015 12:46:49 -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 88226 invoked by uid 89); 27 Jul 2015 12:46:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, SPF_NEUTRAL autolearn=no version=3.3.2 X-HELO: popelka.ms.mff.cuni.cz Date: Mon, 27 Jul 2015 14:46:37 +0200 From: =?utf-8?B?T25kxZllaiBCw61sa2E=?= To: libc-alpha@sourceware.org Subject: [PATCH][powerpc] Fix stpcpy performance for power8 Message-ID: <20150727124637.GA12017@domone> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Hi, I decided to read powerpc code that according to statements only people with good intuition could understand so I was curious what these experts do to get good performance. Here its most elementary problem, it wasn't turned on. Fixing that is obvious, add implementation to ifunc. * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Fix ifunc. diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c index a5e1c03..3a25cf8 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c +++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c @@ -24,10 +24,13 @@ extern __typeof (__stpcpy) __stpcpy_ppc attribute_hidden; extern __typeof (__stpcpy) __stpcpy_power7 attribute_hidden; +extern __typeof (__stpcpy) __stpcpy_power8 attribute_hidden; libc_ifunc (__stpcpy, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __stpcpy_power7 + (hwcap2 & PPC_FEATURE2_ARCH_2_07) + ? __stpcpy_power8 : + (hwcap & PPC_FEATURE_HAS_VSX) + ? __stpcpy_power7 : __stpcpy_ppc); weak_alias (__stpcpy, stpcpy)