linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: 'bx lr' vs 'mov pc,lr'
Date: Mon, 14 Sep 2009 00:01:03 +0100	[thread overview]
Message-ID: <20090913230103.GD30169@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <94a0d4530909131556j49824b84ubddc13237f2d0bdd@mail.gmail.com>

On Mon, Sep 14, 2009 at 01:56:16AM +0300, Felipe Contreras wrote:
> On Mon, Sep 14, 2009 at 1:15 AM, Daniel Silverstone
> <dsilvers@simtec.co.uk> wrote:
> > On Mon, Sep 14, 2009 at 12:55:24AM +0300, Felipe Contreras wrote:
> >> I noticed that in 'arch/arm/lib/delay.S' we are using 'mov pc, lr'
> >> instead of 'bx lr'. Why? It looks like 'mov pc, lr' is used all over
> >> the place, but I can't find out what's the reason.
> >
> > I'd guess at the reason being that not all ARM processors whose ports use
> > arch/arm/lib/delay.S support the bx instruction, whereas the 'mov pc, lr'
> > instruction is universally supported.
> 
> Are there really processors that don't support 'bx'? Can you give some examples?

Any ARMv3 CPU and any ARMv4 which doesn't support Thumb.  Eg, StrongARM.

  reply	other threads:[~2009-09-13 23:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13 21:55 'bx lr' vs 'mov pc,lr' Felipe Contreras
2009-09-13 22:15 ` Daniel Silverstone
2009-09-13 22:56   ` Felipe Contreras
2009-09-13 23:01     ` Russell King - ARM Linux [this message]
2009-09-14  0:11       ` Felipe Contreras
2009-09-13 22:58 ` Russell King - ARM Linux
2009-09-14  0:11   ` Felipe Contreras
2009-09-14  0:20     ` Jamie Lokier
2009-09-14  1:47       ` Felipe Contreras
2009-09-14  7:35         ` Uwe Kleine-König
2009-09-14 12:59           ` Felipe Contreras

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=20090913230103.GD30169@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).