Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: Why does mips define elf_backend_sign_extend_vma to true?
@ 2001-08-07 20:27 David B Anderson
  2001-08-07 22:04 ` H . J . Lu
  0 siblings, 1 reply; 21+ messages in thread
From: David B Anderson @ 2001-08-07 20:27 UTC (permalink / raw)
  To: hjl; +Cc: rth, gdb, binutils

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 


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2001-08-10  0:47 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20010807182459.A15252@lucon.org>
     [not found] ` <20010807183933.A15425@lucon.org>
     [not found]   ` <3B709900.3000502@cygnus.com>
     [not found]     ` <20010807184504.A15571@lucon.org>
2001-08-07 18:52       ` Why does mips define elf_backend_sign_extend_vma to true? H . J . Lu
2001-08-07 18:58         ` Daniel Jacobowitz
2001-08-07 20:27 David B Anderson
2001-08-07 22:04 ` H . J . Lu
2001-08-07 22:46   ` Richard Henderson
2001-08-07 23:21     ` H . J . Lu
2001-08-08  0:50       ` Richard Henderson
2001-08-08  1:09       ` Maciej W. Rozycki
2001-08-08  7:29         ` H . J . Lu
2001-08-08  7:50           ` Andrew Cagney
2001-08-08  8:03             ` H . J . Lu
2001-08-08  8:18               ` Andrew Cagney
2001-08-08  9:02                 ` H . J . Lu
2001-08-08  9:53                   ` Daniel Jacobowitz
2001-08-08 10:02                     ` H . J . Lu
2001-08-08 11:02                       ` Daniel Jacobowitz
2001-08-08 11:08                         ` H . J . Lu
2001-08-09 12:23                   ` Andrew Cagney
2001-08-08  9:48               ` Daniel Jacobowitz
2001-08-08  9:52                 ` H . J . Lu
2001-08-10  0:47               ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox