This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] libffi darwin x86-32bit, fix return_sc testcase.
- From: Andrew Haley <aph at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: Andreas Tobler <andreast-list at fgznet dot ch>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Java Patches <java-patches at gcc dot gnu dot org>, Eric Christopher <echristo at apple dot com>, Michael Matz <matz at suse dot de>
- Date: Thu, 3 Jan 2008 10:09:36 +0000
- Subject: Re: [patch] libffi darwin x86-32bit, fix return_sc testcase.
- References: <477C054B.7060107@fgznet.ch> <18300.44919.694252.333004@zebedee.pink> <Pine.LNX.4.64.0801031056510.3891@zhemvz.fhfr.qr>
Richard Guenther writes:
> We obviously disagree about what the ABI specifies. r126480 made
> the C/C++ frontend behavior the same as other frontends behavior
> (for example Fortran behavior, which I explicitly checked). As GCC
> supports both promoting function return values or not in the
> backends and the x86 backend explicitly does _not_ enable this
> promotion it agrees with my reading of the ABI.
But the ABI isn't in doubt: it is required to
> Functions pass all integer-valued arguments as words, expanding or
> padding signed or unsigned bytes and halfwords as needed'
and this surely applies to return values as well as arguments passed
to functions. It is utterly perverse to assume that return values are
treated differently from arguments passed to functions. So if the
back end isn't promoting return values then the back end is wrong.
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903