This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] adjust libgloss addresses for 64-bit
>>>>> "Maciej" == Maciej W Rozycki <macro@linux-mips.org> writes:
Maciej> On Fri, 15 Apr 2005, Paul Koning wrote:
>> 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).
Maciej> With, "li" vs "dli" the definition is rather obvious and
Maciej> unambiguous. It's not with "la" vs "dla". With the (n)64
Maciej> ABI what should the following macros expand to:
Maciej> la $2, 0x80000000 la $2, 0x80000000($3) la $2, foo +
Maciej> 0x80000000($3) la $2, foo + 0xc000000080000000($3)
Maciej> In particular, assuming the RHS operand is sign-extended,
Maciej> should "sll $2, $3, 0" be performed as a part of the three
Maciej> latters? What about "foo"? Or the 64-bit offset?
In all cases, I would say the argument (offset argument in the case
where a register is also used -- didn't realize that case even
existed...) should be a 32 bit value. So the first to cases are fine,
with sign extended values. The third and fourth are fine if the
expression reduces to a 32 bit value.
paul