This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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


On Fri, 15 Apr 2005, Thiemo Seufer wrote:

> > Here's another shot at this. The problem that we encounter is that for
> > 64-bit addresses "la" (or dla for that matter) does not sign extend the
> > constant passed in the case of:
> > 
> > la $2,0x80000000
> > 
> > leaving us with a zero-extended value in a register which is
> > unpredictable as far as the standard (and at least one chip out there)

 Hmm, 0x80000000 should be a valid XKUSEG address...

> > is concerned. One option would be to modify the assembler to
> > automatically sign-extend when in the presence of constants that are
> > smaller than a single register.
> 
> I think la should load a proper address for 32bit address space, even
> when used in code with 64bit addresses. That's the most useful
> behaviour for it.

 So what should "la $2,0x80000000($3)" do when using 64-bit addresses?  
Replace/supplement the offset with a symbol as suitable...

  Maciej


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