aboutsummaryrefslogtreecommitdiff
path: root/libffi/src
AgeCommit message (Collapse)AuthorFilesLines
2014-05-13Enable Java on Cygwin-64Bernd Edlinger3-61/+113
Currently it is not possible to build GCC's libjava support on Cygwin-64. This patch fixes the current build-problems on Cygwin-64 and the most fundamental bugs on that platform. Note you must still add --enable-threads=posix to successfully build the java language support. boehm-gc/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * include/gc_config_macros.h (GC_PTHREADS): Use __CYGWIN__ instead of __CYGWIN32__ here. * win32_threads.c (GC_push_all_stacks): Push all X86_64 registers. (GC_get_thread_stack_base): Get the stack base for X86_64. libffi/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * src/java_raw_api.c: Remove if !defined(FFI_NO_RAW_API). * src/x86/ffi.c: Add if defined(__CYGWIN__). * src/x86/win64.S (ffi_closure_win64, ffi_call_win64): Added handling for FFI_TYPE_UINT64, FFI_TYPE_POINTER and FFI_TYPE_INT. Added SEH information. Fixed formatting. libgcc/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> * unwind-seh.c (_Unwind_Backtrace): Uncommented, finished implementation. libjava/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * configure.host: Added handling for x86_64-*-cygwin/mingw. * boehm.cc (_Jv_GCAttachThread, _Jv_GCDetachThread): Don't compile if GC_WIN32_THREADS is defined. * java/lang/natClass.cc (_Jv_InterfaceAssignableFrom): Rename interface to source_interface. libjava/classpath/ChangeLog: 2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de> Fix current cygwin-64 build problems. * native/fdlibm/mprec.c (_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S, __ULong, __Long): Undefine previous definitions. From-SVN: r210386
2014-03-12sysv.S (ffi_closure_SYSV): Use x29 as the main CFA reg; update cfi_rel_offset.Yufeng Zhang1-4/+4
libffi/ * src/aarch64/sysv.S (ffi_closure_SYSV): Use x29 as the main CFA reg; update cfi_rel_offset. From-SVN: r208515
2014-02-17re PR libffi/60073 (64-bit libffi.call/cls_double_va.c FAILs after recent ↵Eric Botcazou4-187/+236
modification) PR libffi/60073 * src/sparc/v8.S: Assemble only if !SPARC64. * src/sparc/v9.S: Remove obsolete comment. * src/sparc/ffitarget.h (enum ffi_abi): Add FFI_COMPAT_V9. (V8_ABI_P): New macro. (V9_ABI_P): Likewise. (FFI_EXTRA_CIF_FIELDS): Define only if SPARC64. * src/sparc/ffi.c (ffi_prep_args_v8): Compile only if !SPARC64. (ffi_prep_args_v9): Compile only if SPARC64. (ffi_prep_cif_machdep_core): Use V9_ABI_P predicate. (ffi_prep_cif_machdep): Guard access to nfixedargs field. (ffi_prep_cif_machdep_var): Likewise. (ffi_v9_layout_struct): Compile only if SPARC64. (ffi_call): Deal with FFI_V8PLUS and FFI_COMPAT_V9 and fix warnings. (ffi_prep_closure_loc): Use V9_ABI_P and V8_ABI_P predicates. (ffi_closure_sparc_inner_v8): Compile only if !SPARC64. (ffi_closure_sparc_inner_v9): Compile only if SPARC64. Guard access to nfixedargs field. From-SVN: r207822
2014-02-13re PR libffi/60073 (64-bit libffi.call/cls_double_va.c FAILs after recent ↵Eric Botcazou2-8/+28
modification) PR libffi/60073 * src/sparc/ffitarget.h (FFI_TARGET_SPECIFIC_VARIADIC): Define. (FFI_EXTRA_CIF_FIELDS): Likewise. (FFI_NATIVE_RAW_API): Move around. * src/sparc/ffi.c (ffi_prep_cif_machdep_core): New function from... (ffi_prep_cif_machdep): ...here. Call ffi_prep_cif_machdep_core. (ffi_prep_cif_machdep_var): New function. (ffi_closure_sparc_inner_v9): Do not pass anonymous FP arguments in FP registers. * doc/libffi.texi (Introduction): Fix inaccuracy. From-SVN: r207763
2013-12-10ffitarget.h: Import from upstream.Alan Modra11-1762/+2093
* src/powerpc/ffitarget.h: Import from upstream. * src/powerpc/ffi_powerpc.h: Likewise. * src/powerpc/ffi.c: Likewise. * src/powerpc/ffi_sysv.c: Likewise. * src/powerpc/ffi_linux64.c: Likewise. * src/powerpc/sysv.S: Likewise. * src/powerpc/ppc_closure.S: Likewise. * src/powerpc/linux64.S: Likewise. * src/powerpc/linux64_closure.S: Likewise. * src/types.c: Likewise. * Makefile.am (EXTRA_DIST): Add new src/powerpc files. (nodist_libffi_la_SOURCES <POWERPC, POWERPC_FREEBSD>): Likewise. * configure.ac (HAVE_LONG_DOUBLE_VARIANT): Define for powerpc. * include/ffi.h.in (ffi_prep_types): Declare. * src/prep_cif.c (ffi_prep_cif_core): Call ffi_prep_types. * configure: Regenerate. * fficonfig.h.in: Regenerate. * Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. From-SVN: r205844
2013-11-18ppc_closure.S: Don't bl .Luint128.Alan Modra1-1/+1
* src/powerpc/ppc_closure.S: Don't bl .Luint128. From-SVN: r204918
2013-11-18PowerPC64 ELFv2 supportAlan Modra4-216/+718
PowerPC64 ELFv2 support * src/powerpc/ffitarget.h: Import from upstream. * src/powerpc/ffi.c: Likewise. * src/powerpc/linux64.S: Likewise. * src/powerpc/linux64_closure.S: Likewise. * doc/libffi.texi: Likewise. * testsuite/libffi.call/cls_double_va.c: Likewise. * testsuite/libffi.call/cls_longdouble_va.c: Likewise. From-SVN: r204917
2013-06-25ffi.c (ffi_prep_args_SYSV): Move var declaration before statements.Alan Modra3-7/+84
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration before statements. (ffi_prep_args64): Support little-endian. (ffi_closure_helper_SYSV, ffi_closure_helper_LINUX64): Likewise. * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Likewise. * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Likewise. From-SVN: r200383
2013-03-22win64.S: Make use of ffi_closure_win64_inner symbol pc-relative.Kai Tietz1-1/+1
* src/x86/win64.S: Make use of ffi_closure_win64_inner symbol pc-relative. From-SVN: r196900
2013-03-07closures.c (is_emutramp_enabled [!FFI_MMAP_EXEC_EMUTRAMP_PAX]): Move default ↵Dave Korn1-2/+4
definition outside enclosing #if scope. * src/closures.c (is_emutramp_enabled [!FFI_MMAP_EXEC_EMUTRAMP_PAX]): Move default definition outside enclosing #if scope. From-SVN: r196527
2013-02-06ffi.c (ffi_prep_cif_machdep): Fix case where DOUBLE equal LONGDOUBLE.Andreas Tobler1-0/+2
2013-02-06 Andreas Tobler <andreast@fgznet.ch> * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix case where DOUBLE equal LONGDOUBLE. From-SVN: r195812
2012-12-26libffi mergeAnthony Green21-103/+2947
From-SVN: r194722
2012-10-31linux64_closure.S: Add new ABI support.Alan Modra2-4/+37
* src/powerpc/linux64_closure.S: Add new ABI support. * src/powerpc/linux64.S: Likewise. From-SVN: r193015
2012-08-26re PR libffi/53014 (libffi failures on mips64-linux-gnu with soft-float)Andrew Pinski1-2/+9
2012-08-26 Andrew Pinski <apinski@cavium.com> PR libffi/53014 * src/mips/ffi.c (ffi_prep_closure_loc): Allow n32 with soft-float and n64 with soft-float. From-SVN: r190696
2012-08-08ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI ↵Uros Bizjak1-1/+2
when things are wrong. * src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI when things are wrong. From-SVN: r190230
2012-07-18Define FFI_SIZEOF_JAVA_RAW to 4 for x32H.J. Lu1-1/+2
PR libffi/53982 PR libffi/53973 * src/x86/ffitarget.h: Check __ILP32__ instead of __LP64__ for x32. (FFI_SIZEOF_JAVA_RAW): Defined to 4 for x32. From-SVN: r189626
2012-04-02ffi.c (ffi_prep_args_SYSV): Declare double_tmp.Peter Bergner1-7/+6
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Declare double_tmp. Silence casting pointer to integer of different size warning. Delete goto to previously deleted label. (ffi_call): Silence possibly undefined warning. (ffi_closure_helper_SYSV): Declare variable type. From-SVN: r186091
2012-03-29Restore trampled commitsAnthony Green3-7/+50
From-SVN: r185955
2012-03-13ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI ↵Kaz Kojima2-4/+6
when things are wrong. * src/sh/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI when things are wrong. * src/sh64/ffi.c (ffi_prep_closure_loc): Ditto. From-SVN: r185361
2012-03-09aix_closure.S (ffi_closure_ASM): Adjust for Darwin64 change to return value ↵David Edelsohn1-1/+3
of ffi_closure_helper_DARWIN and... * src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64 change to return value of ffi_closure_helper_DARWIN and load type from return type. From-SVN: r185152
2012-03-04Merge upstream libffiAnthony Green45-553/+5603
From-SVN: r184897
2012-02-23re PR libffi/52221 ([libffi] r183675,r184021 needs to be fixed.)Kai Tietz2-4/+34
PR libffi/52221 * src/x86/ffi.c (ffi_closure_raw_THISCALL): New prototype. (ffi_prep_raw_closure_loc): Use ffi_closure_raw_THISCALL for thiscall-convention. (ffi_raw_call): Use ffi_prep_args_raw. * src/x86/win32.S (ffi_closure_raw_THISCALL): Add implementation for stub. From-SVN: r184526
2012-02-13re PR libffi/52221 ([libffi] r183675,r184021 needs to be fixed.)Kai Tietz1-3/+16
PR libffi/52221 * src/x86/ffi.c (ffi_prep_raw_closure_loc): Add thiscall support for X86_WIN32. (FFI_INIT_TRAMPOLINE_THISCALL): Fix displacement. From-SVN: r184155
2012-02-11* src/sparc/v9.S (STACKFRAME): Bump to 176.Eric Botcazou1-1/+1
From-SVN: r184129
2012-02-08prep_cif.c (ffi_prep_cif): Allow for X86_WIN32 also FFI_THISCALL.Kai Tietz4-1/+67
* src/prep_cif.c (ffi_prep_cif): Allow for X86_WIN32 also FFI_THISCALL. * src/x86/ffi.c (ffi_closure_THISCALL): Add prototype. (FFI_INIT_TRAMPOLINE_THISCALL): New trampoline code. (ffi_prep_closure_loc): Add FFI_THISCALL support. * src/x86/ffitarget.h (FFI_TRAMPOLINE_SIZE): Adjust size. * src/x86/win32.S (ffi_closure_THISCALL): New closure code for thiscall-calling convention. * testsuite/libffi.call/closure_thiscall.c: New test. From-SVN: r184021
2012-01-29ffi.c (ffi_call_win32): Add new argument to prototype for specify ↵Kai Tietz3-19/+181
calling-convention. * src/libffi/src/x86/ffi.c (ffi_call_win32): Add new argument to prototype for specify calling-convention. (ffi_call): Add support for stdcall/thiscall convention. (ffi_prep_args): Likewise. (ffi_raw_call): Likewise. * src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and FFI_FASTCALL. * src/x86/win32.S (_ffi_call_win32): Add support for fastcall/thiscall calling-convention calls. * testsuite/libffi.call/fastthis1_win32.c: New test. * testsuite/libffi.call/fastthis2_win32.c: New test. * testsuite/libffi.call/fastthis3_win32.c: New test. * testsuite/libffi.call/strlen2_win32.c: New test. * testsuite/libffi.call/many2_win32.c: New test. * testsuite/libffi.call/struct1_win32.c: New test. * testsuite/libffi.call/struct2_win32.c: New test. From-SVN: r183676
2012-01-23sysv.S (ffi_call_SYSV): Properly test for plain mc68000.Andreas Schwab1-8/+8
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain mc68000. Test for __HAVE_68881__ in addition to __MC68881__. From-SVN: r183451
2012-01-19re PR target/48496 ('asm' operand requires impossible reload)Jakub Jelinek1-3/+7
PR rtl-optimization/48496 * src/ia64/ffi.c (ffi_call): Fix up aliasing violations. From-SVN: r183301
2011-12-07n32.S: Add ".set mips4".Andrew Pinski1-0/+1
2011-12-07 Andrew Pinski <apinski@cavium.com> * src/mips/n32.S: Add ".set mips4". From-SVN: r182091
2011-09-04re PR libffi/49594 (bootstrap failure in libffi:darwin_closure for ↵Iain Sandoe1-3/+4
powerpc-darwin8) PR libffi/49594 * src/powerpc/darwin_closure.S (stubs): Make the stub binding helper reference track the architecture pointer size. From-SVN: r178512
2011-08-25ffi.c (FFI_INIT_TRAMPOLINE): Remove hard-coded assembly instructions.Andrew Haley2-3/+8
2011-08-25 Andrew Haley <aph@redhat.com> * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Remove hard-coded assembly instructions. * src/arm/sysv.S (ffi_arm_trampoline): Put them here instead. From-SVN: r178060
2011-07-11ffi.c (FFI_INIT_TRAMPOLINE): Clear icache.Andrew Haley1-1/+5
2011-07-11 Andrew Haley <aph@redhat.com> * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Clear icache. From-SVN: r176172
2011-04-29osf.S (UA_SI, [...]): Define.Rainer Orth1-18/+39
* src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE): Define. Use them to handle ELF vs. ECOFF differences. [__osf__] (_GLOBAL__F_ffi_call_osf): Define. From-SVN: r173151
2011-02-08ffi.c: Add RTEMS support for cache flushing.Joel Sherrill2-0/+46
2011-02-07 Joel Sherrill <joel.sherrill@oarcorp.com> * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing. Handle case when CPU variant does not have long double support. * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire, and cores with soft floating point. From-SVN: r169938
2011-02-08configure.ac: Add mips*-*-rtems* support.Joel Sherrill1-0/+8
2011-02-07 Joel Sherrill <joel.sherrill@oarcorp.com> * configure.ac: Add mips*-*-rtems* support. * configure: Regenerate. * src/mips/ffitarget.h: Ensure needed constants are available for targets which do not have sgidefs.h. From-SVN: r169936
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek3-3/+3
From-SVN: r168438
2010-12-18re PR libffi/29152 (64-bit darwin ppc port needed for libffi)Iain Sandoe4-347/+1181
libffi: PR libffi/29152 PR libffi/42378 * src/powerpc/darwin_closure.S: Provide Darwin64 implementation, update comments. * src/powerpc/ffitarget.h (POWERPC_DARWIN64): New, (FFI_TRAMPOLINE_SIZE): Update for Darwin64. * src/powerpc/darwin.S: Provide Darwin64 implementation, update comments. * src/powerpc/ffi_darwin.c: Likewise. From-SVN: r168016
2010-12-03sysv.S (ffi_closure_SYSV): Add UNWIND to .pad directive.Chung-Lin Tang1-74/+78
2010-12-03 Chung-Lin Tang <cltang@codesourcery.com> * src/arm/sysv.S (ffi_closure_SYSV): Add UNWIND to .pad directive. (ffi_closure_VFP): Same. (ffi_call_VFP): Move down to before ffi_closure_VFP. Add '.fpu vfp' directive. From-SVN: r167434
2010-11-29sysv.S (FDE_ENCODING, FDE_ENCODE): Define.Richard Henderson1-25/+26
2010-11-29 Richard Henderson <rth@redhat.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * src/x86/sysv.S (FDE_ENCODING, FDE_ENCODE): Define. (.eh_frame): Use FDE_ENCODING. (.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE. Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> From-SVN: r167251
2010-10-28Add ARM VFP ABI support to libffi.Chung-Lin Tang3-30/+392
From-SVN: r166032
2010-10-01re PR libffi/45677 (Bad stack allocation for ffi function calls on x86-64)Jakub Jelinek1-2/+2
PR libffi/45677 * src/x86/ffi64.c (ffi_prep_cif_machdep): Ensure cif->bytes is a multiple of 8. * testsuite/libffi.call/many2.c: New test. From-SVN: r164829
2010-09-03closures.c (open_temp_exec_file_mnt): Check if getmntent_r returns NULL.Mark Wielaard1-1/+1
* src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r returns NULL. From-SVN: r163809
2010-08-06Remove warningsDan Witte3-12/+12
From-SVN: r162959
2010-08-06Add OS/2 SupportDan Witte3-8/+77
Co-Authored-By: Walter Meinl <wuno@lsvw.de> From-SVN: r162946
2010-08-06Define libffi macros carefullyDan Horák3-0/+10
From-SVN: r162945
2010-08-06Fix spelling errorsMichael Kohler2-2/+2
From-SVN: r162938
2010-08-06Fix SELinux testEvan Phoenix1-1/+1
From-SVN: r162937
2010-08-06Improve libffi commentsMatthias Klose2-7/+8
From-SVN: r162936
2010-08-06Enable build with microsoft compilerAnthony Green3-259/+417
From-SVN: r162935
2010-08-06Enable build with sun compilerOliver Kiddle1-3/+3
From-SVN: r162933