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]
Other format: [Raw text]

Re: [patch] adjust libgloss addresses for 64-bit


>>>>> "Thiemo" == Thiemo Seufer <ths@networkno.de> writes:

 >> Of course it is zero-extended.  Otherwise it would be a different
 >> one; actually in the CKSEG0 space rather than XKUSEG.  If you want
 >> the former, what's wrong with 0xffffffff80000000? -- please keep
 >> in mind we are talking about 64-bit addressing.

 Thiemo> But people used to use "la $2, 0x80000000" in order to get a
 Thiemo> sign-extended address. Loading two different addresses with
 Thiemo> the same code is at least surprising. I see la in 64bit mode
 Thiemo> as backward compatibility legacy, and this suggests not to
 Thiemo> change its behaviour.

Agreed.  Addresses are signed values on MIPS.  Dxx opcodes are 64 bit
operations; xx opcodes (when Dxx also exists) are 32 bit operations. 

So DLI loads a 64 bit int and LI a 32 bit int.  DLA loads a 64 bit
address and LA a 32 bit address.  So the operand of LA should be a
construct that is a valid 32 bit address (and 0x80000000 is one such)
and it should be expanded into instructions that produce a valid
representation of that address in a register (i.e., with sign
extension if the registers are 64 bits).

	  paul


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