Does -march=r5000 imply HAVE_64BIT_GPRS?

H . J . Lu hjl@lucon.org
Tue Aug 14 08:25:00 GMT 2001


On Tue, Aug 14, 2001 at 09:50:20AM +0100, Richard Sandiford wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > The current gas sets HAVE_64BIT_GPRS when -march=r5000 is used with
> > 
> > /*  Return true if ISA supports 64 bit gp register instructions.  */
> > #define ISA_HAS_64BIT_REGS(ISA) (    \
> >    (ISA) == ISA_MIPS3                \
> >    || (ISA) == ISA_MIPS4             \
> >    || (ISA) == ISA_MIPS5             \
> >    || (ISA) == ISA_MIPS64            \
> >    )
> > 
> > since -march=r5000 sets ISA to ISA_MIPS4. It is a departure from the
> > old behavior.
> 
> OK.  What was the old behaviour?  It sounds natural enough on the face of
> it to set the ISA to ISA_MIPS4 if you select a MIPS IV part.  I thought
> the idea was that if you wanted a different ISA (MIPS II, say), you'd
> specify -mips2 as well as -march=r5000.

It doesn't work. Try  -march=r5000 -mips2 and run

# gcc -march=r5000 -mips2 -c foo.s
# readelf -h foo.o

I got
....
  Flags:                             0x30000102, pic, mips4 UNKNOWN
  						     ^^^^^^^
....

> 
> > That means you cannot use -march=r5000/-mcpu=r5000 only for 32bit
> > applications. Is that intentional?
> 
> Have you tried -mfp32 and -mgp32?
> 

Same.


H.J.



More information about the Binutils mailing list