This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


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

Re: Why does mips define elf_backend_sign_extend_vma to true?




Andrew Cagney wrote
|> > Several ABI's have implied sign extension of addresses.  MIPS is one.

 H . J . Lu wrote
|> Show me where it is documemnted in the 32bit SVR4 MIPS ABI.

You have to know where to look :-)
It's not in the ABI, it's in the hardware.
When running MIPSIII or MIPSIV.
The hardware, on loading a 32bit integer value into a 
64 bit integer register, sign-extends to 64 bits.
(for example, with a lw instruction: any 32bit integer
load does this extension)

gdb is simply reflecting the hardware action.

Documented in  "See MIPS Run" by Sweetman,1999, page 28 (for example).


|FYI, some programs using bfd are broken on Linux/mips because of this: nm,

Corrections welcome...
David B. Anderson davea@sgi.com danderson@acm.org 


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