Emitting THUNKS for Thumb code
Richard Earnshaw
rearnsha@arm.com
Wed Jun 26 08:08:00 GMT 2002
I'm trying to solve a problem I've come across with the generation of
thunks for Thumb code. The ASM_OUTPUT_MI_THUNK code is currently written
to work only in ARM mode, but the thumb equivalent would be so long that
it is more efficient to switch into ARM mode, execute the thunk and then
branch back again.
However, I'm running into a problem. In order to do this efficiently I
need to mark the label at the start of the thunk as being an ARM code
label. The following patch achieves this, but has the nasty consequence
that the arm back-end needs to include cp/cp-tree.h so that I can access
the language-specific tree fields (since we have two ways of generating
thunks, one using ASM_OUTPUT_MI_THUNK and one using a normal call-return
sequence). This seems to be the wrong approach to me, but I can't think
of anything else.
Does anyone have a better solution to this?
R.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thunk.patch
Type: text/x-patch
Size: 6033 bytes
Desc: thunk.patch
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20020626/209d9941/attachment.bin>
More information about the Gcc
mailing list