Subject: Re: Rebuild an X11 server
To: Arnaud Blanchard <jblancha@pratique.fr>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 01/23/1998 17:31:23
On Wed, 21 Jan 1998, Arnaud Blanchard wrote:

> Now a question about GCC:
> I think that GCC give parameters to functions, with the stack.
> right ?
> Is there a way to pass paramaters via register ? ( as CW with PPC ) ?

Not a standard one. One of the standard things specified with a CPU is the
subroutine calling procedure (*). Most all m68k programming environments,
including NetBSD and MacOS, use parameters passed on the stack. 

Moto & IBM specified for teh PowerPC that the first 8 or so parameters are
passed in registers, and that some registers must be preserved by
subroutines and others don't have to be.

Sorry.

Take care,

Bill

(*) It's really specified as part of an ABI. I've never seen more than one
parameter-passing standard per CPU. If you're using assembly language, you
can, of course, use registers to your heart's content.