From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8176 invoked by alias); 6 Dec 2011 10:27:12 -0000 Received: (qmail 8156 invoked by uid 22791); 6 Dec 2011 10:27:10 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_CB,TW_DR X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Dec 2011 10:26:57 +0000 Received: by bkbzt12 with SMTP id zt12so6069190bkb.0 for ; Tue, 06 Dec 2011 02:26:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.3.37 with SMTP id 5mr16695568wiz.43.1323167216142; Tue, 06 Dec 2011 02:26:56 -0800 (PST) Received: by 10.216.69.7 with HTTP; Tue, 6 Dec 2011 02:26:56 -0800 (PST) In-Reply-To: References: <20111202173217.GA27139@davesworkthinkpad> Date: Tue, 06 Dec 2011 10:27:00 -0000 Message-ID: Subject: Re: [ARM] architecture specific subdirectories & optimised memchr [V5] From: David Gilbert To: "Joseph S. Myers" Cc: libc-ports@sourceware.org, patches@linaro.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00012.txt.bz2 On 5 December 2011 22:11, Joseph S. Myers wrote: > On Fri, 2 Dec 2011, Dr. David Alan Gilbert wrote: > >> + =A0 =A0 @ Work up to an aligned point >> +5: >> + =A0 =A0 ldrb =A0 =A0r3, [r0],#1 >> + =A0 =A0 subs =A0 =A0r2, r2, #1 >> + =A0 =A0 cmp =A0 =A0 r3, r1 >> + =A0 =A0 beq =A0 =A0 50f =A0 =A0 =A0 =A0 =A0 =A0 @ If it matches exit f= ound >> + =A0 =A0 tst =A0 =A0 r0, #7 >> + =A0 =A0 cbz =A0 =A0 r2, 40f =A0 =A0 =A0 =A0 @ If we run off the end, e= xit 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. =A0That is, as far as I can see > that cbz instruction could safely be removed. =A0Otherwise the patch looks > OK (if the cbz instruction is indeed unneeded, test and post a version > without that instruction and I'll commmit it). Hmm interesting - I think you're right; I'd tweeked the alignments and minimum lengths at various times and this had stayed in. I'll just run a test through. Dave