[PATCH] [MIPS] Improve interlinking error message

Maciej W. Rozycki macro@codesourcery.com
Wed Aug 4 20:53:00 GMT 2010


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



More information about the Binutils mailing list