Excessive limitation on gas for MIPS?

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Wed Mar 19 00:05:00 GMT 2003


Sean McNeil wrote:
> > It is wrong. HAVE_32BIT_GPRS checks if the CPU/the ABI allows to use
> > registers wider than 32 bits. The case you are observing should be
> > handled by the code immediately above the part you changed.
> > 
> > Could you provide the preprocessed assembly which triggers this case?
> 
> I am using the following switches to an older GCC:
> 
> -G0 -mips4 -mlong32 -EB -ansi -fno-builtin -O -Wall
> 
> The assembler end up getting called with:
> 
> -G0 -EB -mips4 -O2 -v -mabi=32
> 
> even though cc1 was called with:
> 
> -mfp64 -mgp64 -mexplicit-type-size -G0 -meb -quiet -dumpbase
  ^^^^^^^^^^^^^
The compiler generates code for 64 bit wide registers. The assembler
shouldn't be called with -mabi=32 in this case. Adjusting the spec file
should help.

> bcm1250MacEnd.c -mips4 -mlong32
> 
> It turns out that there is a spec in the compiler that passes -mabi=32
> when no abi was specified.  It is this that is causing trouble as the
> compiler is generating assembly like:
> 
> 	dli	$3,0x5ee400000040000
> 
> the assembler is only displaying the lower significant 32 bits in the
> message, by the way.
> 
> so,
> 
> 1) an abi of 32 implies 32-bit registers?  I shouldn't think so.

It does. o32 is the ABI which was invented for the old 32bit MIPS
CPUs.

> 2) Doesn't a "dli" instruction state "double load" or 64 bits?

Yes.

> 3) This behavior has changed from previous gas versions.

Yes, gas expands now 64 bit macros (as it should).

> Thanks for the input.  I am not on the binutils list, so I had to check
> the archive to see your response.

A 'Mail-Followup-To:' mail header would have helped.


Thiemo



More information about the Binutils mailing list