Re: Pass floating point values on powerpc64 as per ABI

2013-11-25 Thread Alan Modra
On Tue, Nov 19, 2013 at 10:16:31AM +0100, Andreas Schwab wrote: > Alan Modra writes: > > > On Tue, Nov 19, 2013 at 11:16:26AM +1030, Alan Modra wrote: > >> On Tue, Nov 19, 2013 at 01:27:39AM +0100, Andreas Schwab wrote: > >> > Where does it call a varargs function? > >> > >> printf > > > > Sorry

Re: Pass floating point values on powerpc64 as per ABI

2013-11-19 Thread Andreas Schwab
Alan Modra writes: > On Tue, Nov 19, 2013 at 11:16:26AM +1030, Alan Modra wrote: >> On Tue, Nov 19, 2013 at 01:27:39AM +0100, Andreas Schwab wrote: >> > Where does it call a varargs function? >> >> printf > > Sorry that wasn't such a helpful response. > > Here, really: > res = ((int(*)(cha

Re: Pass floating point values on powerpc64 as per ABI

2013-11-18 Thread Alan Modra
On Tue, Nov 19, 2013 at 11:16:26AM +1030, Alan Modra wrote: > On Tue, Nov 19, 2013 at 01:27:39AM +0100, Andreas Schwab wrote: > > Where does it call a varargs function? > > printf Sorry that wasn't such a helpful response. Here, really: res = ((int(*)(char*, ...))(code))(format, doubleAr

Re: Pass floating point values on powerpc64 as per ABI

2013-11-18 Thread Alan Modra
On Tue, Nov 19, 2013 at 01:27:39AM +0100, Andreas Schwab wrote: > Alan Modra writes: > > > On Mon, Nov 18, 2013 at 10:10:39AM +0100, Andreas Schwab wrote: > >> Alan Modra writes: > >> > >> > -/* The call to cls_double_va_fn is static, so have to use a > >> > normal prep_cif */ > >> > -

Re: Pass floating point values on powerpc64 as per ABI

2013-11-18 Thread Andreas Schwab
Alan Modra writes: > On Mon, Nov 18, 2013 at 10:10:39AM +0100, Andreas Schwab wrote: >> Alan Modra writes: >> >> > - /* The call to cls_double_va_fn is static, so have to use a normal >> > prep_cif */ >> > - CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, arg_types) >> > == FFI

Re: Pass floating point values on powerpc64 as per ABI

2013-11-18 Thread Alan Modra
On Mon, Nov 18, 2013 at 10:10:39AM +0100, Andreas Schwab wrote: > Alan Modra writes: > > > - /* The call to cls_double_va_fn is static, so have to use a normal > > prep_cif */ > > - CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, arg_types) > > == FFI_OK); > > This breaks ia64

Re: Pass floating point values on powerpc64 as per ABI

2013-11-18 Thread Andreas Schwab
Alan Modra writes: > diff -urp gcc3/libffi/testsuite/libffi.call/cls_double_va.c > gcc4/libffi/testsuite/libffi.call/cls_double_va.c > --- gcc3/libffi/testsuite/libffi.call/cls_double_va.c 2013-11-15 > 23:03:07.193964372 +1030 > +++ gcc4/libffi/testsuite/libffi.call/cls_double_va.c 2013-11-15

Pass floating point values on powerpc64 as per ABI

2013-11-16 Thread Alan Modra
The powerpc64 support opted to pass floating point values both in the fpr area and the parameter save area, necessary when the backend doesn't know if a function argument corresponds to the ellipsis arguments of a variadic function. This patch adds powerpc support for variadic functions, and chang