This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: accept 64-bit constant addresses in mips n32
On Apr 8, 2003, Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de> wrote:
> The one who really knows what he is doing encloses it in a
> .set mips3 / .set mips0 pair.
And why should this affect the width of a pointer in the current ABI?
>> It's a trick from mips64 linux (the kernel) folks: they build the
>> kernel with -mabi=64, but assemble it as -n32 (-Wa,-n32),
> Actually they are using o32 for this purpose currently.
Indeed. It's my copy that uses n32.
> This technique shrinks 64bit values to sign extended 32bit
Which the assembler seems to already attempt to do. Oh, wait! Yeah,
I remember now: it does so for references to symbols as well, not only
for literal addresses.
> IMHO the proper way is to add an --assume-sign-extended-addresses switch
> to gas, and handle the macro expansions in load_assress and for DLA
> accordingly. This will leave other load/stores working properly, without
> specialcasing.
Sounds like a reasonable idea. I'm afraid I won't have time to
implement it. I'm just looking into some odd ends in this project.
>> That said, Chris came up with a follow-up patch, that addresses some
>> of your concerns and fixes a merge bug I unintentionally introduced,
>> but Eric still hasn't reviewed it.
> I still don't like it. It loosens an ABI restriction by default, instead
> of choosing the proper (n64) ABI and restrict it for better optimizations.
Agreed. Chris suggested the default might be to disallow such
constructs, FWIW. I'll leave the decision to you, folks. I really
don't care too much either way.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer