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

Reply via email to