This is the mail archive of the 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, i386] Optionally use %xmm0 to return float and/or double values

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.


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