This is the mail archive of the
mailing list for the GCC project.
Re: [ARM] Why MI thunks are always implemented in ARM code?
2008/5/23 Paul Brook <email@example.com>:
> Recent gcc is capable of generating pure Thumb thunks (and always does so for
I noticed that in top-of-trunk but I am working thumb, not thumb2.
> 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
I thought the MI thunks are emitted with the thunkee. The
unconditional branch in thumb has 2K range and it should be sufficient
in many situations. Currently, g++ emits MI thunks right before the
I am hacking a prototype to do this in the linker as a relaxation pass
but recognizing the thunk code seems very hacky to me. The good thing
about the linker is that it can guarantee the branch target is in
thumb mode and in with the 2K range.