[PATCH] arm: add buildsys support for arm926ej-s

Khem Raj raj.khem at gmail.com
Wed Jan 5 09:24:41 UTC 2011


On Wed, Jan 5, 2011 at 12:48 AM, Yann E. MORIN
<yann.morin.1998 at anciens.enib.fr> wrote:
> And by the way... One for you, Khem:
>
> For ARM we currently have a "use BX" option that when turned on uses BX to
> return from functions. From what I understand, BX is "Branch and eXchange",
> and is used to switch ARM <-> Thumb (based on low-order bits in the adress).
> So I believe this is usefull only when doing interworking, right?

on ARMv4t its available in ARM mode and can be used to do indirect
branches even if you dont have interworking enabled so to speak arm
only code.

>
> If the target is Arm-only mode, or Thumb-only mode, then there is no reason
> to use BX at all (although in Thumb-only, this might be the only way). Care
> to comment?
>
> I was thinking in changing this as thus:
>  [ ] Use BX (if available)
>      help
>        If available on your target processor, use BX to return from functions.
>        Say 'y' if you need to use interworking. Say 'n' if not.
>        It is safe to say 'y' even if you're not doing interworking.
>

this look nice approarch

> And then detect availability of BX at build time, as per:
>  http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html
>

yes ideally it would be nicer to detect this automatically as far as possible

> On the other hand, if BX is only used in case we're interworking, then
> we could/should rename the option to something like:
>  [ ] Build interworking-safe functions.
>      help
>        Build a library whose functions are safe to call from interworking
>        context. This will use BX to return from functions (if your target
>        processor has it).
>

its only meant for asm functions in uclibc. for C, gcc takes care

> And in the code, detect if BX is available, and #error out if not and the
> user asked interworking.
>
> Any comments?
>
> Regards,
> Yann E. MORIN.
>
>


More information about the uClibc mailing list