long double support for powerpc64-linux
Jakub Jelinek
jakub@redhat.com
Thu Jan 29 17:37:00 GMT 2004
On Fri, Jan 30, 2004 at 01:55:42AM +1030, Alan Modra wrote:
> This patch borrows Geoff's darwin long double support for powerpc64-linux,
> so we can finally comply with the ABI. In making these changes, I ran
> into a couple of latent bugs.
>
> One bug occurred in passing variable arguments. These are supposed to
> go in r3..r10 then on the stack. When a long double was split over r10
> and the stack, the part in r10 only had the low 32 bits. The
> function_arg change to use Pmode fixes this one.
>
> The other bug was with returning a complex long double, which gcc tried
> to return in (f1,f2) and (f2,f3). The problem here was that
> rs6000_complex_function_value assumed that the two element of the
> parallel it returns were on consecutive registers. That's obviously
> wrong in the case of multi-reg elements. On the patch itself, it might
> seem wrong that I'm always testing inner_bytes against 8, but the only
> case where we might have multiple 32 bit registers is already handled
> just above.
I don't think we should switch to TFmode long doubles until glibc side is
ready. Which means adding binary compatibility.
For an unfinished patch which did the same for sparc32 see:
http://sources.redhat.com/ml/libc-hacker/2002-08/msg00102.html
Jakub
More information about the Gcc-patches
mailing list