[U-Boot] armv5te: make 'ret lr' produce iinterworking 'bx lr'

Tom Rini trini at konsulko.com
Fri Mar 3 15:35:59 UTC 2017


On Mon, Feb 27, 2017 at 08:19:07PM +0100, Albert ARIBAUD wrote:

> Current ARM assembler helper for the 'return to caller' pseudo-instruction
> turns 'ret lr' into 'mov pc, lr' for ARMv5TE. This causes the core to remain
> in its current ARM state even when the routine doing the 'ret' was called
> from Thumb-1 state, triggering an undefined instruction exception.
> 
> This causes early run-time failures in all boards compiled using the Thumb-1
> instruction set (for instance the Open-RD family).
> 
> ARMv5TE supports 'bx lr' which properly implements interworking and thus
> correctly returns to Thumb-1 state from ARM state.
> 
> This change makes 'ret lr' turn into 'bx lr' for ARMv5TE.
> 
> Signed-off-by: Albert ARIBAUD <albert.u.boot at aribaud.net>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170303/19706441/attachment.sig>


More information about the U-Boot mailing list