mips fp/s8 usage in objdump
cgd@broadcom.com
cgd@broadcom.com
Mon Mar 31 17:51:00 GMT 2003
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@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.
More information about the Binutils
mailing list