Subject: Re: READ ME: ABI issue
To: Charles M. Hannum <mycroft@mit.edu>
From: David Edelsohn <dje@watson.ibm.com>
List: port-powerpc
Date: 05/06/1998 13:12:43
>>>>> "Charles M Hannum" writes:

Charles> We've been using an old version of GCC that defaulted to the AIX
Charles> calling convention.  EGCS uses the SysV calling convention by default,
Charles> which is *not* entirely compatible.

	I am not sure what you mean by defaulted to.  A very old version
of gcc-2.7 provided a merged AIX and SVR4 calling convention for embedded
targets.  It had a number of problems including mixing the AIX 220 byte
stack cushion with SVR4 which does not use function descriptors.

	I strongly recommend that NetBSD *not* use the mixed calling
convention which is not standardized anywhere.  Linux and MkLinux both use
true SVR4 calling convention, and NetBSD probably would benefit from
compatibility with those systems which have many software packages already
available.  The other alternative is *true* AIX PowerOpen calling
convention and XCOFF file formats which is documented (unlike Apple PEF)
but rather proprietary.

	ELF file formats probably is the right way to go, so true SVR4 PPC
calling convention is the only real option.  Note that there may be some
incorrect assumptions in the NetBSD kernel if it was designed with the
preliminary GCC support, e.g. the stack cushion.  GCC did change its order
of stack updates in function prologue for SVR4 PPC because of this to
remove a window during which values had been written to negative stack
offsets.

David
===============================================================================
David Edelsohn                                      T.J. Watson Research Center
dje@watson.ibm.com                                  P.O. Box 218
+1 914 945 4364 (TL 862)                            Yorktown Heights, NY 10598