This is the mail archive of the gcc@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] Why MI thunks are always implemented in ARM code?


On Saturday 24 May 2008, Doug Kwan (éæå) wrote:
> I saw that MI thunks are always issued in ARM mode. Is there a
> specific reason?

Recent gcc is capable of generating pure Thumb thunks (and always does so for 
Thumb-2).

> ÂI think I can replace a
> 20-byte ARM MI thunk with a 4 bytes THUMB equivalent when the thunkee
> is also in THUMB mode. ÂIs there any problem with this? 

Thumb branches have extremely limited range, and you can't clobber any low 
registers.  A combination of these two means that it's extremely hard to 
perform the tailcall or to add large offsets.
I'm fairly sure there's also no way to guarantee that the thunkee is Thumb 
code.

Paul


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