This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] [MIPS] Improve interlinking error message
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: Catherine Moore <clm at codesourcery dot com>, binutils at sourceware dot org
- Date: Wed, 4 Aug 2010 21:21:40 +0100 (BST)
- Subject: Re: [PATCH] [MIPS] Improve interlinking error message
- References: <4C584722.5030607@codesourcery.com> <874ofaqija.fsf@firetop.home>
On Wed, 4 Aug 2010, Richard Sandiford wrote:
> > This patch improves the error message that is displayed if an assembly
> > language routine tries to use an invalid jump instruction to change modes.
>
> Thanks for doing this. I agree the current message is poor, and your
> patch is definitely an improvement.
>
> As an alternative, what do you think about:
>
> Jumps between ISA modes must be performed by JAL or JALX.
>
> or:
>
> Direct jumps between ISA modes are not allowed.
I've had this proposal too:
"Cannot make a required mode change with a jump instruction that is not
JAL or JALX"
perhaps with some tweaking, though I'm not sure if that's not too verbose.
Note that in the microMIPS mode this will trigger with JALS too (there's
no corresponding JALXS), so your latter proposal seems inaccurate to me
(and we don't want to change it again in a couple of weeks' time, do we?).
> In either case you could add:
>
> ; consider recompiling with interlinking enabled
>
> or (if we don't mind the MIPS16 reference):
>
> ; consider recompiling with -minterlink-mips16
That might be a bit misleading if triggered by handcoded assembly as
originally considered here, but sounds like the lesser evil to me. We
probably want to replace -minterlink-mips16 with an option that's less
confusing in the context of the microMIPS ASE. The current option can
stay as a compatibility alias, but we may want to avoid references.
Maciej