[RFC PATCH, alpha]: ABI change: pass SFmode and SCmode variable arguments by reference
Richard Henderson
rth@twiddle.net
Fri Sep 2 17:17:00 GMT 2016
On 09/02/2016 02:35 AM, Uros Bizjak wrote:
> --q--
> /* Pass float and _Complex float variable arguments by reference.
> This avoids 64-bit store from a FP register to a pretend args save area
> and subsequent 32-bit load from the saved location to a FP register.
>
> Note that 32-bit loads and stores to/from a FP register on alpha reorder
> bits to form a canonical 64-bit value in the FP register. This fact
> invalidates compiler assumption that 32-bit FP value lives in the lower
> 32-bits of the passed 64-bit FP value, so loading the 32-bit value from
> the stored 64-bit location using 32-bit FP load is invalid on alpha.
>
> This introduces sort of ABI incompatibility, but until _Float32 was
> introduced, C-family languages promoted 32-bit float variable arg to
> a 64-bit double, and it was not allowed to pass float as a varible
> argument. Passing _Complex float as a variable argument never
> worked on alpha. Thus, we have no backward compatibility issues
> to worry about, and passing un-promoted _Float32 and _Complex float
> as a variable argument will actually work in the future. */
> --/q--
This sounds like a good plan to me.
> (I was not able to find the
> authoritative OSF/1 ABI document on the net...)
As far as I know, it was never available online.
I have a paper copy.
r~
More information about the Gcc-patches
mailing list