Contents|Index|Previous|Next
Calling
conventions for SPARC and SPARClite targets
SPARC
passes the first six words of arguments in registers, R8
through R13.
All remaining arguments are stored in a reserved block on the stack, last
to first, so that the lowest numbered argument not passed in a register
is at the lowest address in the stack. The registers are always filled,
so a double word argument starting in R13
would have the most significant word in R13
and the least significant word on the stack.
Function return values are
stored in R8.
Register, R0,
is hardwired so that it always has the value, 0.
R14
and R15
have reserved uses. Registers, R1
through R7,
can be used for temporary values.
When a function is compiled
with the default options, it must return with registers, R16
through R29,
unchanged.
Note:
Functions compiled with
different calling conventions cannot be run together without some care.
Top|Contents|Index|Previous|Next