This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips fp/s8 usage in objdump
- From: cgd at broadcom dot com
- To: jg-lists at jguk dot org
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: 31 Mar 2003 09:07:25 -0800
- Subject: Re: mips fp/s8 usage in objdump
- References: <3E877969.8090308@jguk.org><mailpost.1049065814.486@news-sj1-1>
At Sun, 30 Mar 2003 23:10:15 +0000 (UTC), "J. Grant" wrote:
> Due to the differing use of fp/s8 is there a reason s8 was selected as
> default? In my experience s8 has been used as fp.
To quote various documents i have laying about:
The MIPS SysV psABI supplement (p 3-12) says:
$30 s8 saved register (like s0-s7).
See MIPS Run (p.23) says:
30 s8/fp Ninth register variable; subroutines that need one can
use this as a frame pointer.
Finally, not that they're really relevant, the n32 ABI Handbook
(specifically, the page at
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/srch3 at n32/0650/bks/SGI_Developer/books/Mpro_n32_ABI/sgi_html/ch02.html#IT02.calling-26
8-) say about that register on n32 / n64 (not that they're really
relevant to o32):
$30 s8 Frame pointer (if needed) Callee-saved.
In other words, in my opinion:
* "fp" will occasionally be correct. "s8" is always correct.
and,
* Even in documents that acknowledge that this register is sometimes
used as a frame pointer describe it as "s8"...
> I think
> there might be a MIPS ABI name for fp usage, but can't remember the name.
AFAICT, there is and it's "s8." 8-)
cgd
--
Chris Demetriou Broadcom Corporation
Principal Design Engineer Broadband Processor Business Unit
Any opinions expressed in this message are mine, not necessarily Broadcom's.