This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR gcc/7618: Support MI thunks in the MIPS backend
> > - The mips16 call sequence looks wrong. "la" and "dla" can only be used
> > for (PC-relative) references to constant pool labels. You can't use
> > them for loading arbitrary addresses.
> Yes, I know. It worked in my tests, but they were admittedly
> simplistic. The fix is simple: put the address to jump to in a little
> constant pool.
>
Right, but we're also trying to get away from having la or dla used at
all. One of the goals was to use .set nomacro for the entire file. :)
> > - Did you consider using an rtl implementation, like alpha or rs6000?
>
> I did, but then I decided to just let the assembler deal with all the
> complicated issues. An RTL implementation needs to use the sibcall
> instruction, but the MIPS sibcall instruction is only available in
> limited circumstances.
>
> This is what i worked out for the RTL implementation. This isn't
> correct, though. This is the point at which I gave up.
>
Hmm.. it's a good start though.
>
> I looked at PR 7618 because it is targeted for 3.4.0. If you do not
> want to implement the MI thunk code for the MIPS backend, even though
> it has been implemented for most or all other popular backends, then
> we should retarget the PR to a different release.
>
Probably. I'll maybe get a chance to play around a bit with the rtl
version in the next few days, or maybe Richard will. If we don't get it
within about a week or so we probably want to retarget.
Thanks.
-eric
--
Eric Christopher <echristo@redhat.com>