[Patch] [MIPS] Add -mips16e option to gas

Richard Sandiford rdsandiford@googlemail.com
Sun May 23 18:01:00 GMT 2010


Catherine Moore <clm@codesourcery.com> writes:
> This patch adds the -mips16e option to gas enabling backwards 
> compatibility with the SDE toolchain.

I think it's confusing to make -mips16e a simple synonym for -mips16.
-mips4 -mips16e should either generate a diagnostic or allow MIPS16e
extensions.  The diagnostic is more in keeping with things like
-mdsp, -mdspr2, -msmartmips and -mmt.

If you have -mips16e, you should have ".set mips16e" as well.
You can model the ".set mips16" and ".set mips16e" relationship
on ".set dsp" and ".set dspr2".  (That relationship might not
be perfect, but let's be consistent.)

FWIW, we did discuss this with MTI a few years back and "agreed"
(as I remember it ;-)) that the -mips16e option wasn't really
worthwhile, and that FSF compatibility wasn't necessary.
-mips16 is effectively a mode selection that flips between 16-bit
and 32-bit instruction encodings, and as such there isn't any
need for a separate option to say that the MIPS16 encoding on
certain architectures supports more instructions than on other
architectures.  There's no non-MIPS32 or non-MIPS64 archicture
that supports the full MIPS16e encoding and no MIPS32 or MIPS64
architecture that supports only the "old" MIPS16 encoding.
Adding -mips16e risks confusing people about what -mips16
actually means.

Richard



More information about the Binutils mailing list