PR gcc/7618: Support MI thunks in the MIPS backend

Ian Lance Taylor ian@wasabisystems.com
Wed Jan 14 05:04:00 GMT 2004


Richard Sandiford <rsandifo@redhat.com> writes:

> - As your patch demonstrates, there's not really any special
>   MIPS-specific tricks that we can pull.  It's really just a case
>   of using standard patterns.
> 
>   I was hoping that (at least after tree-ssa) it would be possible
>   to provide a target-independent implementation.

Actually, thinking about it further, I think a target-independent
implementation would be fairly difficult.  The thunk must not disturb
the stack, and must not disturb any registers which might hold
function parameters (except of course that it must modify the `this'
parameter), and must not disturb any registers which are call-saved.
At the same time it has to do simple arithmetic, and it has to form an
address and jump to it.  I think it would be difficult to write target
independent code which could meaningfully live within those
contraints--meaningfully in the sense that it wouldn't simply rely
upon a lot of target specific information.

Ian



More information about the Gcc-patches mailing list