'bx lr' vs 'mov pc,lr'

Felipe Contreras felipe.contreras at gmail.com
Sun Sep 13 18:56:16 EDT 2009


On Mon, Sep 14, 2009 at 1:15 AM, Daniel Silverstone
<dsilvers at 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?

-- 
Felipe Contreras



More information about the linux-arm-kernel mailing list