From patchwork Tue Mar 6 17:34:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 26215 Received: (qmail 94651 invoked by alias); 6 Mar 2018 17:34:33 -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 94639 invoked by uid 89); 6 Mar 2018 17:34:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy= X-HELO: homiemail-a82.g.dreamhost.com Subject: Re: [PATCH] aarch64: Optimized memcmp for medium to large sizes To: Szabolcs Nagy , libc-alpha@sourceware.org Cc: nd@arm.com References: <20180202045056.3121-1-siddhesh@sourceware.org> <5b1e0e00-1fee-d2a1-76e1-c9fefdb890b7@arm.com> From: Siddhesh Poyarekar Message-ID: <414c23c1-87b8-7fc4-d4a3-c44eff2660c0@sourceware.org> Date: Tue, 6 Mar 2018 23:04:25 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5b1e0e00-1fee-d2a1-76e1-c9fefdb890b7@arm.com> On Tuesday 06 March 2018 10:47 PM, Szabolcs Nagy wrote: > this broke the build for me: > > /B/elf/librtld.os: In function `memcmp': > /S/string/../sysdeps/aarch64/memcmp.S:78: undefined reference to `.Lloop8' > collect2: error: ld returned 1 exit status > make[2]: *** [/B/elf/ld.so] Error 1 > make[2]: Leaving directory `/S/elf' Sorry, I took the lazy way out and failed to smoke test the loop8 name fixup and missed one instance. I've pushed this obvious fix after actually building it this time. Siddhesh From 4e54d918630ea53e29dd70d3bdffcb00d29ed3d4 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Tue, 6 Mar 2018 22:56:35 +0530 Subject: [PATCH] aarch64: Fix branch target to loop16 I goofed up when changing the loop8 name to loop16 and missed on out the branch instance. Fixed and actually build tested this time. * sysdeps/aarch64/memcmp.S (more16): Fix branch target loop16. --- ChangeLog | 2 ++ sysdeps/aarch64/memcmp.S | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23609b80d7..a24ed86474 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2018-03-06 Siddhesh Poyarekar + * sysdeps/aarch64/memcmp.S (more16): Fix loop16 branch target. + * sysdeps/aarch64/memcmp.S: Widen comparison to 16 bytes at a time. diff --git a/sysdeps/aarch64/memcmp.S b/sysdeps/aarch64/memcmp.S index 8325d047e7..743bc078bb 100644 --- a/sysdeps/aarch64/memcmp.S +++ b/sysdeps/aarch64/memcmp.S @@ -75,7 +75,7 @@ L(more16): /* We overlap loads between 0-32 bytes at either side of SRC1 when we try to align, so limit it only to strings larger than 128 bytes. */ cmp limit, 96 - b.ls L(loop8) + b.ls L(loop16) /* Align src1 and adjust src2 with bytes not yet done. */ and tmp1, src1, 15 -- 2.14.3