This is the mail archive of the gcc-patches@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: [PATCH] adds FreeBSD/x86-64 target


On Thu, Jan 24, 2002 at 11:02:15PM -0800, Richard Henderson wrote:
> On Thu, Jan 24, 2002 at 10:37:12PM -0800, David O'Brien wrote:
> > Why does x86-64.h even set DEFAULT_PCC_STRUCT_RETURN to 1 as it is really
> > part of the Intel IA-32 psABI and should be done in a 386 specific
> > header.
> 
> x86-64 is not subject to the ia32 psabi.  It is quite different.

Straight from http://www.x86-64.org/documentation:

    Application Binary Interface documents (ABIs) 
    ...
    * The Intel386 psABI is an essential reference, since the x86-64
    psABI is written in the form of changes relative to the Intel386
    psABI. 

> Anyway, x86-64 defines its own calling convention for returning
> structures in registers, so I suspect that flag_pcc_struct_return
> actually gets ignored.

You may be right.  It is not very clear to me in the x86-64 psABI exactly
what the structure return convention is.  3.2.3 "Parameter Passing"
(which "Returning of Values" refers one to) isn't the most clear
section... it seems to imply that what the psABI specifies as how to
return an aggregate depends on the sizes and classification of the
structures members.

Maybe Andreas Jaeger <aj@suse.de> can clarify.

-- 
-- David  (obrien@FreeBSD.org)


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