[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: x86 abi for complex.
On Thu, Feb 02, 2023 at 07:59:32PM +0100, Anders Magnusson wrote:
> I looked at the "complex" abi code generated on NetBSD/i386
> for function calls, and noticed a slight discrepancy.
> For functions returning double or long double complex, the complex
> numbers are handled as returning of structs with the same content.
> But; for functions returning float complex, the return values are
> returned in eax/edx and not as the corresponding struct.
I believe that is how the i386 ABI is defined:
https://www.uclibc.org/docs/psABI-i386.pdf (page 14)
> What is the reason for;
> 1) return floats in eax/edx instead as a struct?
My guess: passing these values in registers helps
reduce memory traffic.
Main Index |
Thread Index |