This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Fix the MIPS ISA ELF setting (Re: RedHat 7.1/mips update)


"H . J . Lu" <hjl@lucon.org> writes:
> -mabi=32 is disabled in gcc, including the current CVS:
> 
>   /* ??? This doesn't work yet, so don't let people try to use it.  */
>   if (mips_abi == ABI_32)
>     error ("The -mabi=32 support does not work yet.");

The check's still in the 3.0 branch, but it's been removed from mainline.

> > If it doesn't work, it's AFAICS a bug. -mgp32 -mfp32 might be useful
> > as a replacement for -mabi=32 then.
> 
> The problem is I don't know for sure what gcc will do with -march=xxxx
> where xxxx suports 64bit instructions. -mips2 seems a way to say I want 
> 32bit instructions.

-march=xxxx -mgp32 -mfp32 should work.  The -mgp32 and -mgp64 flags
directly control the target flag that enables or disables 64-bit integer
instructions.  -mfp32 and -mfp64 directly control whether doubles are
stored in single FPRs or in FPR pairs.

GCC knows that the selection of a 64-bit target isn't enough of an
excuse to use 64-bit instructions.  It should always check these flags
as well.

I was recently working on a MIPS IV target that was being used with the
-mgp32 and -mfp32 options.  I had to fix a couple of places where the
check had been forgotten (the fixes went into mainline, but not the 3.0
branch).  Mostly things just worked.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]