'bx lr' vs 'mov pc,lr'
Felipe Contreras
felipe.contreras at gmail.com
Mon Sep 14 08:59:52 EDT 2009
2009/9/14 Uwe Kleine-König <u.kleine-koenig at pengutronix.de>:
> On Mon, Sep 14, 2009 at 04:47:35AM +0300, Felipe Contreras wrote:
>> On Mon, Sep 14, 2009 at 3:20 AM, Jamie Lokier <jamie at shareable.org> wrote:
>> > Felipe Contreras wrote:
>> >> > Why do you want bx? bx isn't available on older CPUs.
>> >>
>> >> Isn't it faster? I don't know if it would make sense to try it on
>> >> newer CPUs.
>> >
>> > That's interesting. Do you know if it's faster?
>>
>> Nope, I'm assuming because of this:
>> http://newsgroups.derkeiler.com/Archive/Comp/comp.sys.arm/2006-04/msg00031.html
>
> For ARM9EJ-S the docs can be found at
>
> http://infocenter.arm.com/help/topic/com.arm.doc.ddi0222b/I1028171.html
>
> . bx takes 3 cycles, mov (with dest=pc) takes 4 cycles.
Couldn't we have a 'return' macro that uses the relevant one?
--
Felipe Contreras
More information about the linux-arm-kernel
mailing list