[ARM] architecture specific subdirectories & optimised memchr [V5]
Joseph S. Myers
joseph@codesourcery.com
Mon Dec 5 22:11:00 GMT 2011
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
More information about the Libc-ports
mailing list