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: a couple of gas MIPS ABI issues.


cgd@broadcom.com wrote:
> ica2_ts@csv.ica.uni-stuttgart.de ("Thiemo Seufer") writes:
> > > 	* I'm concerned that ".set mipsN" changes the ABI at all.  i
> > > 	  mean, the sizes of addresse in your GOT, etc., aren't going
> > > 	  to change for the binary as a whole just because you said
> > > 	  ".set mipsN" right?
> > 
> > Please understand that .set mipsX is for experienced programmers
> > only. It makes no guarantees about the validity of the resulting
> > code. It can't be replaced by a differently compiled file because
> > the linker might complain about it.
> 
> So, I guess the point is, these do this so that HAVE_..BIT_.PRS will
> evaluate to the "right" thing despite the prevailing file ABI?

Despite the file's ABI, ISA and -m[fg]p32.

[snip]
> > > (It also looks to me like the setting of mips_fp32 and mips_gp32 in
> > > the .set mipsN code is entirely reduntant.  The code that checks those
> > > flags also checks the ISA reg size, since since .set mipsN also sets
> > > the ISA...
> > 
> > Why should it be redundant? .set mips3 should allow access to
> > 64bit registers, even if the assembler was invoked with -mgp32.
> 
> Not should be; is.
> 
> Every place you check mips_fp32 and mips_gp32, you also check the ISA.
> 
> AFAICT, there's no reason you need to set _both_ in the code which
> implements ".set mipsN", since only setting the ISA does have the
> correct effect, does it not?

It doesn't. Invoke gas with -march=r4000 -mgp32 -mfp32. A .set mips3
should allow IMHO 64bit GPRS, which in turn needs mips_gp32 == 0.


Thiemo


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