This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ARM/THUMB long calls stubs
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andy Green <andy dot green at oxsemi dot com>
- Cc: Richard dot Earnshaw at arm dot com, Nick Clifton <nickc at redhat dot com>, rearnshaw at arm dot com, gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Aug 2002 17:14:17 +0100
- Subject: Re: ARM/THUMB long calls stubs
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
>
> By way of a suggestion, how about the _call_via.. functions be made
> inline? Is there an option to do this? (Could somebody very quickly
> write a patch to allow this ;-) ??
>
The whole point of the _call_via instructions is to get the current PC in
r14 without losing the Thumb bit. This can only be do with a BL
instruction, so we must call something. If it weren't for the fact that
mov lr, pc lost the thumb bit we could just write
mov lr, pc
bx Rn
R.
PS In V5 we can do
blx Rn
and the problem is solved.