public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: "Dr. David Alan Gilbert" <david.gilbert@linaro.org>
Cc: libc-ports@sourceware.org, patches@linaro.org
Subject: Re: [ARM] architecture specific subdirectories & optimised memchr [V5]
Date: Mon, 05 Dec 2011 22:11:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1112052205560.11066@digraph.polyomino.org.uk> (raw)
In-Reply-To: <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

  reply	other threads:[~2011-12-05 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 17:32 Dr. David Alan Gilbert
2011-12-05 22:11 ` Joseph S. Myers [this message]
2011-12-06 10:27   ` David Gilbert
2011-12-08 10:03   ` [ARM] architecture specific subdirectories & optimised memchr [V6] Dr. David Alan Gilbert
2011-12-08 15:47     ` Joseph S. Myers
2011-12-08 15:49       ` David Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1112052205560.11066@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=david.gilbert@linaro.org \
    --cc=libc-ports@sourceware.org \
    --cc=patches@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).