Commit Graph

63 Commits

Author SHA1 Message Date
Josh Triplett
98a793fa36 testsuite: Common up the ifdef blocks for compiler-specific macros 2014-03-16 15:21:57 -07:00
Josh Triplett
e1911f78df Add support for stdcall, thiscall, and fastcall on non-Windows x86-32
Linux supports the stdcall calling convention, either via functions
explicitly declared with the stdcall attribute, or via code compiled
with -mrtd which effectively makes stdcall the default.

This introduces FFI_STDCALL, FFI_THISCALL, and FFI_FASTCALL on
non-Windows x86-32 platforms, as non-default calling conventions.
2014-03-16 05:05:06 -07:00
Josh Triplett
9c279328ee testsuite: Remove fragile stack pointer checks
testsuite/libffi.call/closure_stdcall.c and
testsuite/libffi.call/closure_thiscall.c include inline assembly to save
the stack pointer before and after the call, and compare the values.
However, compilers can and do leave the stack in different states for
these two pieces of inline assembly, such as by saving a temporary value
on the stack across the call; observed with gcc -Os, and verified as
spurious through careful inspection of disassembly.
2014-03-16 04:45:37 -07:00
Josh Triplett
88d562a8b5 testsuite/libffi.call/many_win32.c: Avoid spurious failure due to excess precision
The test case testsuite/libffi.call/many_win32.c can spuriously fail due
to excess floating-point precision.  Instrumenting it with some printf
calls shows differences well above FLT_EPSILON.  (Note when
instrumenting it that multiple computations of the difference, such as
one in a print and another in the conditional, may produce different
results.)

Rather than complicating the test suite with architecture-specific flags
to avoid excess precision, just simplify the floating-point computation
to avoid a dependency on potential excess precision.
2014-03-16 04:39:37 -07:00
Josh Triplett
c00a49ecd1 testsuite/libffi.call/many.c: Avoid spurious failure due to excess precision
The test case testsuite/libffi.call/many.c can spuriously fail due to
excess floating-point precision.  Instrumenting it with some printf
calls shows differences well above FLT_EPSILON.  (Note when
instrumenting it that multiple computations of the difference, such as
one in a print and another in the conditional, may produce different
results.)

Rather than complicating the test suite with architecture-specific flags
to avoid excess precision, just simplify the floating-point computation
to avoid a dependency on potential excess precision.
2014-03-16 04:39:37 -07:00
Alan Modra
164283f4ac 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 changes the code to only pass fp in the ABI
mandated area.  ELFv2 needs this change since the parameter save area
may not exist there.

This also fixes two faulty tests that used a non-variadic function
cast to call a variadic function, and spuriously reasoned that this is
somehow necessary for static functions..
2013-11-16 06:38:55 -05:00
Andrew Haley
db0ace3a38 Fix broken test cases 2013-11-16 06:29:25 -05:00
David Schneider
cdf405d574 add a testcase for the double/float issue on ARMHF 2013-11-13 18:01:56 +01:00
Anthony Green
c2422174b3 Merge pull request #45 from foss-for-synopsys-dwc-arc-processors/arc_support
arc: Fix build error
2013-11-02 17:11:08 -04:00
Sandra Loosemore
2f5626ce02 Fix testsuite bug 2013-10-15 15:32:16 -04:00
Marcus Shawcroft
f64e4a8655 Fix many.c testcase for Aarch64 2013-10-15 15:20:14 -04:00
Anthony Green
128cd1d2f3 Fix spelling errors 2013-10-08 06:45:51 -04:00
David Schneider
dd26f1f39c add a failing test for closures on ARM hardfloat 2013-03-28 16:40:34 +01:00
David Schneider
b9f013788f add a testcase, that on ARM hardfloat needs more than the 8 VFP argument registers to pass arguments to a call 2013-03-28 16:38:04 +01:00
David Schneider
2fbdb0f231 use the absolute value to check the test result against an epsilon 2013-03-28 16:37:58 +01:00
Anthony Green
f308faf1ea Add moxie support. Release 3.0.12. 2013-02-11 14:25:13 -05:00
Anthony Green
10e77227b6 mend 2013-02-10 08:47:26 -05:00
Anthony Green
a9521411a5 sparc v8 and testsuite fixes 2013-02-09 06:54:40 -05:00
Anthony Green
63ba1fa79f Remove xfail for arm*-*-*. 2013-02-08 15:18:19 -05:00
Anthony Green
f3a4f3fdde Fixes for AIX xlc compiler. 2013-02-07 09:57:20 -05:00
Anthony Green
522f8fef49 Fix man page. Clean out junk. 2013-02-06 20:31:31 -05:00
Anthony Green
aeb8719a34 New microblaze support 2013-01-21 07:55:37 -05:00
Anthony Green
f03eab0824 Remove obsolete inline test functions 2013-01-11 17:14:11 -05:00
Anthony Green
05fbe1faed xlc compiler support 2013-01-11 16:54:40 -05:00
Anthony Green
f26c7ca671 Make compiler options in dejagnu runs compiler specific 2013-01-08 14:47:05 -05:00
Anthony Green
f7879bc3f3 Testsuite fix for Solaris vendor compiler 2013-01-08 07:30:28 -05:00
Thorsten Glaser
0de3277b18 Testsuite fixes (was Re: [PATCH] Fix libffi on m68k-linux-gnu, completely)
Dixi quod…

>although I believe some 3.0.11 checks to be broken:

And indeed, with a few minor changes on top of git master,
I still get a full run of PASS plus one XPASS on amd64-linux!

With the other patches (from this message’s parent) and
these applied, I get a full PASS on m68k-linux as well.

So, please git am these three diffs ☺

bye,
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
From 5cb15a3bad1f0fb360520dd48bfc938c821cdcca Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <tg@mirbsd.org>
Date: Sun, 2 Dec 2012 23:20:56 +0000
Subject: [PATCH 1/2] Fix tests writing to a closure retval via pointer casts

As explained in <Pine.BSM.4.64L.1212022014490.23442@herc.mirbsd.org>
all other tests that do the same cast to an ffi_arg pointer instead.

PASS on amd64-linux (Xen domU) and m68k-linux (ARAnyM)

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2013-01-07 06:22:51 -05:00
Anthony Green
58e8b66f70 AArch64 port 2012-10-30 07:36:49 -04:00
Anthony Green
a098b44f4c Reapply missing testsuite changes for arm 2012-04-06 17:04:35 -04:00
Anthony Green
f2981454cb Revert debug code changes 2012-04-05 15:45:19 -04:00
Zachary Waldowski
39dccddb60 Fix building with Clang for Darwin (OS X 10.6+ and iOS
4.0+)
2012-04-05 12:32:41 -04:00
Peter Rosin
0a1ab12a8d Various MSVC-related changes. 2012-03-30 08:14:08 -04:00
Anthony Green
e72ed5eeaa Fix vararg float test 2012-03-21 09:52:28 -04:00
Anthony Green
bd78c9c331 More cygwin fixes 2012-03-21 08:09:30 -04:00
Anthony Green
dee20f8e45 Rebased from gcc 2012-02-10 13:06:46 -05:00
Anthony Green
1ff9c604bb Rebase from GCC 2012-02-01 16:34:30 -06:00
Anthony Green
164e6fe04b m68k fixes 2012-01-23 12:41:06 -05:00
Anthony Green
03e9ee321a Fix cls_double_va.c and update docs 2011-11-18 15:13:00 -05:00
Anthony Green
ff9454da44 Add David Gilbert's variadic function call support 2011-11-12 17:18:51 -05:00
Anthony Green
d992ac54a2 Refresh from GCC 2011-07-29 17:32:53 -04:00
Anthony Green
f1fb139b4e Fix tests 2011-02-09 18:30:02 -05:00
Anthony Green
69dbe845f4 Fix xfails 2011-02-09 07:38:43 -05:00
Anthony Green
0e5843995f Refresh from GCC 2011-02-08 07:52:40 -05:00
Anthony Green
2db72615b5 Rebase 2010-11-21 10:50:56 -05:00
Anthony Green
3f5b1375ab rebase 2010-07-12 14:39:18 -04:00
Anthony Green
9dc9a293f3 Rebase to latest GCC sources 2010-04-13 10:33:52 -04:00
Anthony Green
7b7a42f221 Rebase from GCC 2010-01-12 09:14:14 -05:00
Anthony Green
c3042afaf3 Reset quilt patches post 3.0.9 merge with GCC 2010-01-01 08:08:02 -05:00
Anthony Green
0cfe60e9d1 3.0.9rc12 2009-12-29 10:06:04 -05:00
Anthony Green
14e2e92e86 3.0.9rc11 2009-12-27 21:03:33 -05:00