This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] MIPS: mips16e machine patterns - zeb/zeh seb/seh
On Sat, 2005-06-11 at 08:20 +0100, Richard Sandiford wrote:
> Daniel Jacobowitz <email@example.com> writes:
> > On Fri, Jun 10, 2005 at 10:43:30AM -0700, Eric Christopher wrote:
> >> > That's because to be MIPS32/32R2/64/64R2 ASE compliant, the full MIPS16e
> >> > set is required, not a subset (MIPS16). I've simply made that if the
> >> > user gave -mips16 option for mips_isa>=32, they really mean -mips16e.
> >> > As in Ian's previous reply, -march=mips32 -mips16 will imply -mips16e.
> >> Gah. No.
> >> The compiler should not "infer" or "guess" what the user meant. Richard
> >> and I spent a lot of time removing that kind of code from the compiler,
> >> I don't want to put more in there.
> >> If they say -mips16 they get -mips16. If they say -mips16e they get -
> >> mips16e.
> > This I don't get. Why not think of it this way (which I thought was
> > what Richard was suggesting):
> > A MIPS processor with MIPS16 support has two modes, 16-bit and 32-bit
> > instructions.
> > When you say -mips16 you get all of the instructions in the selected
> > processor's 16-bit mode. If -march implies a processor which
> > supports MIPS16e, then enable MIPS16e.
> To clear up any confusion, this was indeed what I was suggesting,
> but I didn't word it as well.
> I just think that -mips16* flags should be _either_ a 16-bit mode
> selector _or_ an ISA flag. David's third option is a bit of a hybrid.
> At the moment, -mips16 could be interpreted either way, because gcc
> only knows about one 16-bit ISA.
ok that puts us back to Richard's choice (b), I can live with that. :)
So that means we abandant the -mips16e switch, and let the -march decide
on what 16bit variant it wants to generate. Eg.
-march=mip32 -mips16 => MIPS32 ISA and MIPS16e ASE.
-march=mips3 -mips16 => MIPS3 ISA and MIPS16 ASE.
So the GENERATE_MIPS16E macro will just be MIPS16 && mips_isa >= 32 for
if later someone whats to add full MIPS16e to a non MIPS32/64 ISA, we'll
extend the GENERATE_MIPS16E macro to include mips_arch == PROCESSOR_XXX.
Is that ok with everyone?