From patchwork Wed Jan 21 16:14:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 4750 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Received: (qmail 22259 invoked by alias); 21 Jan 2015 16:14:59 -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 22105 invoked by uid 89); 21 Jan 2015 16:14:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD, UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: e24smtp05.br.ibm.com Message-ID: <54BFD075.5040005@linux.vnet.ibm.com> Date: Wed, 21 Jan 2015 14:14:45 -0200 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "GNU C. Library" Subject: [PATCH 2/6] powerpc: Simplify bcopy default implementation References: <54BFCE9B.3030602@linux.vnet.ibm.com> In-Reply-To: <54BFCE9B.3030602@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15012116-0033-0000-0000-00000192ABA7 This patch simplify the default bcopy symbol for powerpc64 by just using memmove instead of implementing using the default bcopy. Since the symbol is deprecated, it trades speed by code size. Tested on powerpc64 and powerpc64le. --- * sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c (__bcopy_ppc): Rewrite to call __memmove_ppc instead of include default implementation. -- diff --git a/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c index 14ecb9f..eb182b2 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c +++ b/sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c @@ -18,8 +18,10 @@ #include -extern __typeof (bcopy) __bcopy_ppc attribute_hidden; +extern __typeof (bcopy) __bcopy_ppc attribute_hidden; +extern __typeof (memmove) __memmove_ppc attribute_hidden; -#define bcopy __bcopy_ppc - -#include +void __bcopy_ppc (const void *src, void *dest, size_t n) +{ + __memmove_ppc (dest, src, n); +}