From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29349 invoked by alias); 5 Dec 2011 22:11:35 -0000 Received: (qmail 29340 invoked by uid 22791); 5 Dec 2011 22:11:34 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_CB,TW_DR X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Dec 2011 22:11:20 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RXgkp-0005NE-9q from joseph_myers@mentor.com ; Mon, 05 Dec 2011 14:11:19 -0800 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 5 Dec 2011 22:11:17 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1RXgkm-0002zy-Kq; Mon, 05 Dec 2011 22:11:16 +0000 Date: Mon, 05 Dec 2011 22:11:00 -0000 From: "Joseph S. Myers" To: "Dr. David Alan Gilbert" cc: libc-ports@sourceware.org, patches@linaro.org Subject: Re: [ARM] architecture specific subdirectories & optimised memchr [V5] In-Reply-To: <20111202173217.GA27139@davesworkthinkpad> Message-ID: References: <20111202173217.GA27139@davesworkthinkpad> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00011.txt.bz2 On Fri, 2 Dec 2011, Dr. David Alan Gilbert wrote: > + @ Work up to an aligned point > +5: > + ldrb r3, [r0],#1 > + subs r2, r2, #1 > + cmp r3, r1 > + beq 50f @ If it matches exit found > + tst r0, #7 > + cbz r2, 40f @ If we run off the end, exit not found This loop is started with at least 16 bytes available and needs to skip at most 7 bytes to get to an aligned point, so I don't see a need for this test for running off the end in this loop. That is, as far as I can see that cbz instruction could safely be removed. Otherwise the patch looks OK (if the cbz instruction is indeed unneeded, test and post a version without that instruction and I'll commmit it). -- Joseph S. Myers joseph@codesourcery.com