This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM/THUMB long calls stubs


Hi Richard,

> 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

Doh! I forgot about that.  So my recent suggested patch is not going
to work because the return address will be incorrect.  Darn.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]