Re: float4/float8/int64 passed by value with tsearchfixup - Mailing list pgsql-patches

From Gregory Stark
Subject Re: float4/float8/int64 passed by value with tsearchfixup
Date
Msg-id 87wsms98x6.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: float4/float8/int64 passed by value with tsearchfixup  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>>> Tom Lane wrote:
>>>> Specifically, I think what you missed is that on some platforms C
>>>> functions pass or return float values differently from similar-sized
>>>> integer or pointer values (typically, the float values get passed in
>>>> floating-point registers).
>
>> But I'm skeptical that it would hit such a wide swathe of the build farm. In
>> particular AFAIK the standard ABI for i386 does no such thing.
>
> I did some digging, and it seems you're mistaken.  The standard gcc ABI
> for both i386 and x86_64 returns floats in float registers (387
> registers in the first case, and SSE registers in the second case).
> This appears to have been the case for a very long time.  I quote from
> the manual for gcc 2.95:

Ah, return values. I accidentally glossed over that point and was looking for
how parameters were passed.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's 24x7 Postgres support!

pgsql-patches by date:

Previous
From: Bryce Nesbitt
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Gregory Stark
Date:
Subject: Re: float4/float8/int64 passed by value with tsearchfixup