diff options
author | Alan Modra <amodra@bigpond.net.au> | 2004-02-09 03:39:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2004-02-09 14:09:48 +1030 |
commit | 4243752ca1ab399389152e9f6e09a06452db8ada (patch) | |
tree | 78ec388e24099521b55d6696a59a0863b43e0521 /libffi/testsuite/libffi.call/float.c | |
parent | 3b4b85c945f850219212333d236f617b24b3515f (diff) | |
download | gcc-4243752ca1ab399389152e9f6e09a06452db8ada.zip gcc-4243752ca1ab399389152e9f6e09a06452db8ada.tar.gz gcc-4243752ca1ab399389152e9f6e09a06452db8ada.tar.bz2 |
ffi.c (ffi_prep_args64): Correct long double handling.
* src/powerpc/ffi.c (ffi_prep_args64): Correct long double handling.
(ffi_closure_helper_LINUX64): Fix typo.
* testsuite/libffi.call/cls_align_longdouble.c: Pass -mlong-double-128
for powerpc64-*-*.
* testsuite/libffi.call/float.c: Likewise.
* testsuite/libffi.call/float2.c: Likewise.
From-SVN: r77522
Diffstat (limited to 'libffi/testsuite/libffi.call/float.c')
-rw-r--r-- | libffi/testsuite/libffi.call/float.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libffi/testsuite/libffi.call/float.c b/libffi/testsuite/libffi.call/float.c index e5ee05b..d712fb1 100644 --- a/libffi/testsuite/libffi.call/float.c +++ b/libffi/testsuite/libffi.call/float.c @@ -5,6 +5,8 @@ Originator: From the original ffitest.c */ /* { dg-do run } */ +/* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */ + #include "ffitest.h" static int floating(int a, float b, double c, long double d, int e) @@ -28,8 +30,6 @@ int main (void) double d; long double ld; signed int si2; - - args[0] = &ffi_type_sint; values[0] = &si1; @@ -41,7 +41,7 @@ int main (void) values[3] = &ld; args[4] = &ffi_type_sint; values[4] = &si2; - + /* Initialize the cif */ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 5, &ffi_type_sint, args) == FFI_OK); @@ -51,15 +51,14 @@ int main (void) d = (double)1.0/(double)3.0; ld = 2.71828182846L; si2 = 10; - + floating (si1, f, d, ld, si2); - + ffi_call(&cif, FFI_FN(floating), &rint, values); - + printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld, si2)); - + CHECK(rint == floating(si1, f, d, ld, si2)); - + exit (0); } - |