Subject: Re: READ ME: ABI issue
To: None <port-powerpc@NetBSD.ORG, mycroft@mit.edu>
From: Wolfgang Solfrank <ws@tools.de>
List: port-powerpc
Date: 05/13/1998 20:38:08
Hi,

Sorry for the delay, but I was on vacation the last two weeks.

> So, we have a slight problem here...
> 
> We've been using an old version of GCC that defaulted to the AIX
> calling convention.  EGCS uses the SysV calling convention by default,
> which is *not* entirely compatible.
>
> I could just configure EGCS to use the AIX calling convention, but
> given that the SysV convention is by definition what the ELF ABI uses,
> and that there has been no real PowerPC-based distribution to date,
> I'm inclined to simply switch to the SysV convention.  I've verified
> that it does work -- and that the same kernel works correctly with
> either set of libraries and executables.

Well, NetBSD/powerpc _never_ used anything but SysV calling convention.
(well, when I started development there was only support for this merged
AIX/SVR4 calling convention in gcc, but this was pretty quickly replaced
with separate support for PowerOpen and SVR4 ABI).  In fact, it will not
work in its current incarnation, should you try to use a compiler configured
for PowerOpen ABI.

There would indeed be some implication should you want to use PowerOpen ABI
that would even result in slight changes of the interface between kernel and
userland.  The problem is that the PowerOpen ABI does use data below the
stack pointer.  So within the kernel the interrupt setup code, and in
user land the signal handler setup code has to take this into account.
Since the current implementation doesn't do this, things will break if you
try the PowerOpen ABI without changing the locore code.

Hope it helps.

Ciao,
Wolfgang
-- 
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800