Subject: Re: return value in %a0 on m68k ELF (Re: CVS commit: syssrc)
To: None <thorpej@zembu.com>
From: Klaus Klein <kleink@reziprozitaet.de>
List: port-m68k
Date: 02/23/2001 22:42:31
Jason R Thorpe <thorpej@zembu.com> writes:

> On Fri, Feb 23, 2001 at 06:13:31PM +0900, Izumi Tsutsui wrote:
> 
>  > > Log Message:
>  > > switch sun3 to ELF.  highlight include:
>  >  :
>  > > change assembly functions to return values in %a0 instead of %d0.
>  > 
>  > Should we set return values into %a0 in all case?
>  > I guess this is required if the return value is pointer, isn't it?
>  > I wonder if I have to fix getdfc() and getsfc() on news68k.
>  > (I hope news68k is almost ELF ready but have not checked yet.)
> 
> Yah, I thought it was %d0 unless the return value was an address, in
> which case it's %d0 and %a0...  Am I just confused?

That's how GCC behaves in System V configurations. While I have no
reason to doubt that the 68000 ABI supplement, of which I've never
managed to find a copy, specifies %a0 for address returns, it's never
been clear to me whether the additional return in %d0 is a requirement
or just an accomodation.


- Klaus