Subject: Re: SH3/4 function calling conventions
To: Christian Groessler <cpg@aladdin.de>
From: Marcus Comstedt <marcus@mc.pp.se>
List: port-dreamcast
Date: 02/23/2003 01:35:29
Christian Groessler <cpg@aladdin.de> writes:
> Hi,
>
> I'm currently digging a bit into assembly programming on the DC / SH.
>
> Is there somewhere a documentation about the calling conventions used
> on NetBSD (probably it's a gcc definition)?
>
> Specifically I want to know
> - which registers are used for function parameters
r4-r7 contain the first four parameters. Remaining parameters are
passed on the stack.
> - which registers contain function return values
r0
> - which registers need to be preserved across function calls
r8-r15.
This is assuming you're not using floating-point.
// Marcus