summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Only run the complex type tests on supported platforms.Anthony Green2014-09-281-2/+17
|
* Compile tests with -Wno-psabi when using GCCAnthony Green2014-09-201-2/+2
|
* 2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com>Dominik Vogt2014-09-2040-0/+908
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/types.c (FFI_TYPEDEF, FFI_NONCONST_TYPEDEF): Merge the macros by adding another argument that controls whether the result is const or not (FFI_LDBL_CONST): Temporary macro to reduce ifdef confusion * src/prep_cif.c (ffi_prep_cif_core): Replace list of systems with new macro FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION * src/pa/ffitarget.h (FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION): Define. * src/s390/ffitarget.h (FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION): Define. * src/x86/ffitarget.h (FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION): Define. 2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com> * doc/libffi.texi (Primitive Types): Document ffi_type_complex_float, ffi_type_complex_double and ffi_type_complex_longdouble (Complex Types): New subsection. (Complex Type Example): Ditto. * testsuite/libffi.call/cls_align_complex_double.c: New FFI_TYPE_COMPLEX test. * testsuite/libffi.call/cls_align_complex_float.c: Ditto. * testsuite/libffi.call/cls_align_complex_longdouble.c: Ditto. * testsuite/libffi.call/cls_complex_double.c: Ditto. * testsuite/libffi.call/cls_complex_float.c: Ditto. * testsuite/libffi.call/cls_complex_longdouble.c: Ditto. * testsuite/libffi.call/cls_complex_struct_double.c: Ditto. * testsuite/libffi.call/cls_complex_struct_float.c: Ditto. * testsuite/libffi.call/cls_complex_struct_longdouble.c: Ditto. * testsuite/libffi.call/cls_complex_va_double.c: Ditto. * testsuite/libffi.call/cls_complex_va_float.c: Ditto. * testsuite/libffi.call/cls_complex_va_longdouble.c: Ditto. * testsuite/libffi.call/complex_double.c: Ditto. * testsuite/libffi.call/complex_defs_double.c: Ditto. * testsuite/libffi.call/complex_float.c: Ditto. * testsuite/libffi.call/complex_defs_float.c: Ditto. * testsuite/libffi.call/complex_longdouble.c: Ditto. * testsuite/libffi.call/complex_defs_longdouble.c: Ditto. * testsuite/libffi.call/complex_int.c: Ditto. * testsuite/libffi.call/many_complex_double.c: Ditto. * testsuite/libffi.call/many_complex_float.c: Ditto. * testsuite/libffi.call/many_complex_longdouble.c: Ditto. * testsuite/libffi.call/return_complex1_double.c: Ditto. * testsuite/libffi.call/return_complex1_float.c: Ditto. * testsuite/libffi.call/return_complex1_longdouble.c: Ditto. * testsuite/libffi.call/return_complex2_double.c: Ditto. * testsuite/libffi.call/return_complex2_float.c: Ditto. * testsuite/libffi.call/return_complex2_longdouble.c: Ditto. * testsuite/libffi.call/return_complex_double.c: Ditto. * testsuite/libffi.call/return_complex_float.c: Ditto. * testsuite/libffi.call/return_complex_longdouble.c: Ditto. * src/raw_api.c (ffi_raw_to_ptrarray): Handle FFI_TYPE_COMPLEX (ffi_ptrarray_to_raw): Ditto. * src/prep_cif.c (ffi_prep_cif_core): Abort if FFI_TYPE_COMPLEX is not implemented in libffi for the target. * src/java_raw_api.c (ffi_java_raw_size): FFI_TYPE_COMPLEX not supported yet (abort). (ffi_java_raw_to_ptrarray): Ditto. (ffi_java_rvalue_to_raw): Ditto. (ffi_java_raw_to_rvalue): Ditto. * src/debug.c (ffi_type_test): Add debug tests for complex types. * include/ffi.h.in (FFI_TYPE_COMPLEX): Add new FFI_TYPE_COMPLEX. (FFI_TYPE_LAST): Bump. (ffi_type_complex_float): Add new ffi_type_.... (ffi_type_complex_double): Ditto. (ffi_type_complex_longdouble): Ditto. 2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com> * src/s390/ffitarget.h (FFI_TARGET_HAS_COMPLEX_TYPE): Define to provide FFI_TYPE_COMPLEX support. * src/s390/ffi.c (ffi_check_struct_type): Implement FFI_TYPE_COMPLEX (ffi_prep_args): Ditto. (ffi_prep_cif_machdep): Ditto. (ffi_closure_helper_SYSV): Ditto.
* Fix testsuite for GCC 4.9.0Anthony Green2014-05-111-1/+1
|
* Support fastcall closuresJosh Triplett2014-04-203-66/+9
| | | | | | libffi on 32-bit x86 now supports closures for all supported ABIs. Thus, rewrite the last remaining duplicated-by-ABI test (closure_stdcall and closure_thiscall) to use the generic ABI_NUM/ABI_ATTR mechanism.
* Use the proper C++ compiler to run C++ testsJosh Triplett2014-03-272-4/+5
| | | | | Running the C compiler with -shared-libgcc -lstdc++ does not work on non-GCC compilers.
* Stop looking for expect and runtest above top_builddirJosh Triplett2014-03-261-9/+0
| | | | | | Users wishing to test hand-compiled versions of expect and runtest can easily enough put them in their path or set EXPECT and RUNTEST themselves.
* Stop setting an empty AM_RUNTESTFLAGSJosh Triplett2014-03-261-2/+0
|
* testsuite: Add ABIs to the test matrix; unify tests across ABIsJosh Triplett2014-03-1625-423/+90
| | | | | | | | | This eliminates all the *_win32.c tests in favor of the tests they were branched from, and expands test coverage to run many more tests on stdcall, thiscall, and fastcall. This same mechanism also supports testing any other target that has multiple ABIs.
* testsuite: Replace ffitestcxx.h with ffitest.hJosh Triplett2014-03-164-66/+3
| | | | | ffitest.h contains a superset of the functionality of ffitestcxx.h; make the C++ tests include ffitest.h instead, and remove ffitestcxx.h.
* testsuite: Unify the C and C++ testsuitesJosh Triplett2014-03-166-33/+6
| | | | | These two testsuites differ only in the source file glob and a couple of additional compiler options; unify the remaining bits.
* testsuite: ffitest.h: Parenthesize the CHECK macroJosh Triplett2014-03-161-1/+1
|
* testsuite: Factor out a function to run a matrix of testsJosh Triplett2014-03-163-24/+19
| | | | | | | This commons up code from libffi.call/call.exp and libffi.special/special.exp, unifies the optimization option matrix between the two, and makes it easier to add more axes to the matrix in the future.
* testsuite: Introduce a __THISCALL__ compiler-specific macroJosh Triplett2014-03-162-4/+3
|
* testsuite: Introduce a __STDCALL__ compiler-specific macroJosh Triplett2014-03-162-4/+3
| | | | | Several tests want to use stdcall, which differs in syntax by compiler, so introduce a macro for it in ffitest.h.
* testsuite: Common up the ifdef blocks for compiler-specific macrosJosh Triplett2014-03-161-8/+2
|
* Add support for stdcall, thiscall, and fastcall on non-Windows x86-32Josh Triplett2014-03-1611-11/+17
| | | | | | | | | 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.
* testsuite: Remove fragile stack pointer checksJosh Triplett2014-03-162-32/+0
| | | | | | | | | | 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.
* testsuite/libffi.call/many_win32.c: Avoid spurious failure due to excess ↵Josh Triplett2014-03-161-1/+1
| | | | | | | | | | | | | | | 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.
* testsuite/libffi.call/many.c: Avoid spurious failure due to excess precisionJosh Triplett2014-03-161-1/+1
| | | | | | | | | | | | | 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.
* Remove autogenerated files from the repositoryJosh Triplett2014-03-161-590/+0
| | | | Add an autogen.sh to regenerate them.
* This separates the 32-bit sysv/linux/bsd code from the 64-bit linuxAlan Modra2013-11-211-0/+1
| | | | | | | | | | | | | | | | code, and makes it possible to link code compiled with different options to those used to compile libffi. For example, a -mlong-double-128 libffi can be used with -mlong-double-64 code. Using the return value area as a place to pass parameters wasn't such a good idea, causing a failure of cls_ulonglong.c. I didn't see this when running the mainline gcc libffi testsuite because that version of the test is inferior to the upstreamm libffi test. Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant that a parameter save area could be allocated before it was strictly necessary. Wrong but harmless. Found when splitting apart ffi.c into 32-bit and 64-bit support.
* The powerpc64 support opted to pass floating point values both in theAlan Modra2013-11-162-13/+8
| | | | | | | | | | | | | 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..
* Fix broken test casesAndrew Haley2013-11-164-5/+5
|
* add a testcase for the double/float issue on ARMHFDavid Schneider2013-11-131-0/+55
|
* Merge pull request #45 from foss-for-synopsys-dwc-arc-processors/arc_supportAnthony Green2013-11-022-7/+87
|\ | | | | | | arc: Fix build error
* | Fix testsuite bugSandra Loosemore2013-10-151-1/+1
| |
* | Fix many.c testcase for Aarch64Marcus Shawcroft2013-10-151-1/+1
| |
* | Fix spelling errorsAnthony Green2013-10-081-1/+1
| |
* | Add m88k and VAX support. Update some configury bits.Anthony Green2013-10-081-35/+75
|/
* add a failing test for closures on ARM hardfloatDavid Schneider2013-03-281-0/+68
|
* add a testcase, that on ARM hardfloat needs more than the 8 VFP argument ↵David Schneider2013-03-281-0/+70
| | | | registers to pass arguments to a call
* use the absolute value to check the test result against an epsilonDavid Schneider2013-03-281-1/+3
|
* Add moxie support. Release 3.0.12.v3.0.12Anthony Green2013-02-114-0/+4
|
* mendAnthony Green2013-02-101-5/+5
|
* sparc v8 and testsuite fixesAnthony Green2013-02-093-2/+7
|
* Remove xfail for arm*-*-*.Anthony Green2013-02-081-1/+3
|
* Add missing files to distAnthony Green2013-02-082-136/+149
|
* Remove a.out cruft from distAnthony Green2013-02-072-2/+2
|
* Fixes for AIX xlc compiler.Anthony Green2013-02-0710-35/+35
|
* Fix man page. Clean out junk.Anthony Green2013-02-061-0/+0
|
* New microblaze supportAnthony Green2013-01-211-1/+1
|
* Remove obsolete inline test functionsAnthony Green2013-01-112-82/+0
|
* xlc compiler supportAnthony Green2013-01-111-1/+1
|
* Don't run EH tests with non-GNU compilerAnthony Green2013-01-101-4/+8
|
* Make sure we're running dejagnu tests with the right compiler.Anthony Green2013-01-082-0/+3
|
* Make compiler options in dejagnu runs compiler specificAnthony Green2013-01-082-5/+29
|
* Testsuite fix for Solaris vendor compilerAnthony Green2013-01-081-1/+1
|
* Testsuite fixes (was Re: [PATCH] Fix libffi on m68k-linux-gnu, completely)Thorsten Glaser2013-01-073-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* +2012-03-21 Peter Rosin <peda@lysator.liu.se>Anthony Green2013-01-021-1/+21
| | | | | | | | + + * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*] + (set_ld_library_path_env_vars): Add the library search dir to PATH + (and save PATH for later). + (restore_ld_library_path_env_vars): Restore PATH.