This is the mail archive of the gcc-patches@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: PR gcc/7618: Support MI thunks in the MIPS backend


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


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