This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [ARM] architecture specific subdirectories & optimised memchr [V5]
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: "Dr. David Alan Gilbert" <david dot gilbert at linaro dot org>
- Cc: libc-ports at sourceware dot org, patches at linaro dot org
- Date: Mon, 5 Dec 2011 22:11:16 +0000 (UTC)
- Subject: Re: [ARM] architecture specific subdirectories & optimised memchr [V5]
- References: <20111202173217.GA27139@davesworkthinkpad>
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