This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc?


On Sun, Jun 02, 2002 at 09:20:43PM -0400, Kevin B. Hendricks wrote:

 > 1. How are you currently handling the case when you call a function with 
 > more than 8 floating point (not double) values so that floating point 
 > values must be created on the outgoing parameter stack in the frame making 
 > the call?
 > 
 > The sys v abi says these float parameters should be passed as double values 
 > on the outgoing stack with addresses aligned to 8.
 > 
 > Currently ppc Linux does NOT follow this part of the abi and instead 
 > passing float parameters (after the 8 which are passed in f1-f8) as 
 > floating point (single) values aligned to 4.
 > 
 > What does NetBSD ppc do here?

As far as I can tell, this is also what NetBSD does.  Attached is:

	float.c -- function which takes 10 float arguments, and
	consumes them all.

	float.s-2.95.3-native -- asm output from the 2.95.3-based
	native compiler.

	float.s-3.2 -- asm output from gcc-current.

Note the offsets used in the "lfs" insns.

 > 2. What about returning unions (which would probably be exactly 8 bytes in 
 > size?  Are they treated like small structures or something different?

Unions of <= 8 bytes are treated just like structures of <= 8 bytes,
in both the 2.95.3-based native compiler and in the fixed gcc 3.1/3.2
compiler.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: float.c
Description: Text document

Attachment: float.s-2.95.3-native
Description: Text document

Attachment: float.s-3.2
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]