This is the mail archive of the
mailing list for the GCC project.
Re: PR gcc/7618: Support MI thunks in the MIPS backend
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, echristo at redhat dot com
- Date: 14 Jan 2004 00:04:11 -0500
- Subject: Re: PR gcc/7618: Support MI thunks in the MIPS backend
- References: <email@example.com><firstname.lastname@example.org>
Richard Sandiford <email@example.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.