This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, i386] Optionally use %xmm0 to return float and/or double values
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, uros at kss-loka dot si, Richard Guenther <richard dot guenther at gmail dot com>
- Date: Tue, 25 Jan 2005 11:02:12 -0500
- Subject: Re: [PATCH, i386] Optionally use %xmm0 to return float and/or double values
- References: <41F6642A.email@example.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 25, 2005 at 04:22:18PM +0100, Paolo Bonzini wrote:
> The attached patch implements the idea of returning floating point
> values in SSE registers. This is done as long as the ISA supports it
> (e.g. for floats on SSE processors, or for doubles on SSE2):
> 1) with the new -mfp-ret-in-sse option, for all functions
> 2) with -mfpmath=sse, for local functions
> 3) without any option, for functions that have the sse_return attribute.
> Given the advanced state of development of 4.0.0, I have included a few
> asserts. Also, the code will not trigger unless the specific
> command-line options -mfpmath=sse or -mfp-ret-in-sse are included. It
> does not apply to x86-64 platforms, for which -mfpmath=sse is the
> default, because their ABI implementation is completely separate.
When you make the new ABI user visible (which I'm not 100% sure
is the right thing, especially in the 4.0 timeframe), then it should IMHO be a
full new ABI, that uses not just return value passing in register, but also
argument passing in registers (at least float, double arguments,
structs containing just one, two floats/doubles or something similar),
otherwise we end up with a multitude of different ABIs.