summaryrefslogtreecommitdiffstats
path: root/libffi/include/ffi.h.in
Commit message (Collapse)AuthorAgeFilesLines
* * src/powerpc/ffitarget.h: Import from upstream.amodra2013-12-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205844 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge upstream libffigreen2012-03-041-14/+53
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184897 138bc75d-0d04-0410-961f-82ee72b054a4
* Define libffi macros carefullygreen2010-08-061-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162945 138bc75d-0d04-0410-961f-82ee72b054a4
* Enable build with microsoft compilergreen2010-08-061-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162935 138bc75d-0d04-0410-961f-82ee72b054a4
* IRIX supportgreen2009-12-261-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155470 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-06-12 Andrew Haley <aph@redhat.com>aph2009-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.libffi: testsuite/libffi.call/cls_align_sint64.c, testsuite/libffi.call/cls_align_uint64.c, testsuite/libffi.call/cls_ulonglong.c, testsuite/libffi.call/return_ll1.c, testsuite/libffi.call/stret_medium2.c: Fix printf format specifiers. testsuite/libffi.special/unwindtest.cc: include stdint.h. 2009-06-11 Timothy Wall <twall@users.sf.net> * Makefile.am, configure.ac, include/ffi.h.in, include/ffi_common.h, src/closures.c, src/dlmalloc.c, src/x86/ffi.c, src/x86/ffitarget.h, src/x86/win64.S (new), README: Added win64 support (mingw or MSVC) * Makefile.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in, configure, aclocal.m4: Regenerated * ltcf-c.sh: properly escape cygwin/w32 path * man/ffi_call.3: Clarify size requirements for return value. * src/x86/ffi64.c: Fix filename in comment. * src/x86/win32.S: Remove unused extern. * testsuite/libffi.call/closure_fn0.c, testsuite/libffi.call/closure_fn1.c, testsuite/libffi.call/closure_fn2.c, testsuite/libffi.call/closure_fn3.c, testsuite/libffi.call/closure_fn4.c, testsuite/libffi.call/closure_fn5.c, testsuite/libffi.call/closure_fn6.c, testsuite/libffi.call/closure_stdcall.c, testsuite/libffi.call/cls_12byte.c, testsuite/libffi.call/cls_16byte.c, testsuite/libffi.call/cls_18byte.c, testsuite/libffi.call/cls_19byte.c, testsuite/libffi.call/cls_1_1byte.c, testsuite/libffi.call/cls_20byte.c, testsuite/libffi.call/cls_20byte1.c, testsuite/libffi.call/cls_24byte.c, testsuite/libffi.call/cls_2byte.c, testsuite/libffi.call/cls_3_1byte.c, testsuite/libffi.call/cls_3byte1.c, testsuite/libffi.call/cls_3byte2.c, testsuite/libffi.call/cls_4_1byte.c, testsuite/libffi.call/cls_4byte.c, testsuite/libffi.call/cls_5_1_byte.c, testsuite/libffi.call/cls_5byte.c, testsuite/libffi.call/cls_64byte.c, testsuite/libffi.call/cls_6_1_byte.c, testsuite/libffi.call/cls_6byte.c, testsuite/libffi.call/cls_7_1_byte.c, testsuite/libffi.call/cls_7byte.c, testsuite/libffi.call/cls_8byte.c, testsuite/libffi.call/cls_9byte1.c, testsuite/libffi.call/cls_9byte2.c, testsuite/libffi.call/cls_align_double.c, testsuite/libffi.call/cls_align_float.c, testsuite/libffi.call/cls_align_longdouble.c, testsuite/libffi.call/cls_align_longdouble_split.c, testsuite/libffi.call/cls_align_longdouble_split2.c, testsuite/libffi.call/cls_align_pointer.c, testsuite/libffi.call/cls_align_sint16.c, testsuite/libffi.call/cls_align_sint32.c, testsuite/libffi.call/cls_align_sint64.c, testsuite/libffi.call/cls_align_uint16.c, testsuite/libffi.call/cls_align_uint32.c, testsuite/libffi.call/cls_align_uint64.c, testsuite/libffi.call/cls_dbls_struct.c, testsuite/libffi.call/cls_double.c, testsuite/libffi.call/cls_double_va.c, testsuite/libffi.call/cls_float.c, testsuite/libffi.call/cls_longdouble.c, testsuite/libffi.call/cls_longdouble_va.c, testsuite/libffi.call/cls_multi_schar.c, testsuite/libffi.call/cls_multi_sshort.c, testsuite/libffi.call/cls_multi_sshortchar.c, testsuite/libffi.call/cls_multi_uchar.c, testsuite/libffi.call/cls_multi_ushort.c, testsuite/libffi.call/cls_multi_ushortchar.c, testsuite/libffi.call/cls_pointer.c, testsuite/libffi.call/cls_pointer_stack.c, testsuite/libffi.call/cls_schar.c, testsuite/libffi.call/cls_sint.c, testsuite/libffi.call/cls_sshort.c, testsuite/libffi.call/cls_uchar.c, testsuite/libffi.call/cls_uint.c, testsuite/libffi.call/cls_ulonglong.c, testsuite/libffi.call/cls_ushort.c, testsuite/libffi.call/err_bad_abi.c, testsuite/libffi.call/err_bad_typedef.c, testsuite/libffi.call/float2.c, testsuite/libffi.call/huge_struct.c, testsuite/libffi.call/nested_struct.c, testsuite/libffi.call/nested_struct1.c, testsuite/libffi.call/nested_struct10.c, testsuite/libffi.call/nested_struct2.c, testsuite/libffi.call/nested_struct3.c, testsuite/libffi.call/nested_struct4.c, testsuite/libffi.call/nested_struct5.c, testsuite/libffi.call/nested_struct6.c, testsuite/libffi.call/nested_struct7.c, testsuite/libffi.call/nested_struct8.c, testsuite/libffi.call/nested_struct9.c, testsuite/libffi.call/problem1.c, testsuite/libffi.call/return_ldl.c, testsuite/libffi.call/return_ll1.c, testsuite/libffi.call/stret_large.c, testsuite/libffi.call/stret_large2.c, testsuite/libffi.call/stret_medium.c, testsuite/libffi.call/stret_medium2.c, testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead of checking for MMAP. Use intptr_t instead of long casts. 2009-06-12 Andrew Haley <aph@redhat.com> * Makefile.am: Remove info_TEXINFOS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148433 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-06-08 Andrew Haley <aph@redhat.com>aph2009-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Import from libffi 3.0.8: * doc/libffi.texi: New file. * doc/libffi.info: Likewise. * doc/stamp-vti: Likewise. * man/Makefile.am: New file. * man/ffi_call.3: New file. * Makefile.am (EXTRA_DIST): Add src/x86/darwin64.S, src/dlmalloc.c. (nodist_libffi_la_SOURCES): Add X86_FREEBSD. * configure.ac: Bump version to 3.0.8. parisc*-*-linux*: Add. i386-*-freebsd* | i386-*-openbsd*: Add. powerpc-*-beos*: Add. AM_CONDITIONAL X86_FREEBSD: Add. AC_CONFIG_FILES: Add man/Makefile. * include/ffi.h.in (FFI_FN): Change void (*)() to void (*)(void). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148309 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-06-04 Andrew Haley <aph@redhat.com>aph2009-06-041-3/+3
| | | | | | | | | * include/ffi.h.in: Change void (*)() to void (*)(void). * src/x86/ffi.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148173 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-06-04 Andrew Haley <aph@redhat.com>aph2009-06-041-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/ffi.h.in, src/arm/ffitarget.h, src/arm/ffi.c, src/arm/sysv.S, src/powerpc/ffitarget.h, src/closures.c, src/sh64/ffitarget.h, src/sh64/ffi.c, src/sh64/sysv.S, src/types.c, src/x86/ffi64.c, src/x86/ffitarget.h, src/x86/win32.S, src/x86/darwin.S, src/x86/ffi.c, src/x86/sysv.S, src/x86/unix64.S, src/alpha/ffitarget.h, src/alpha/ffi.c, src/alpha/osf.S, src/m68k/ffitarget.h, src/frv/ffitarget.h, src/frv/ffi.c, src/s390/ffitarget.h, src/s390/sysv.S, src/cris/ffitarget.h, src/pa/linux.S, src/pa/ffitarget.h, src/pa/ffi.c, src/raw_api.c, src/ia64/ffitarget.h, src/ia64/unix.S, src/ia64/ffi.c, src/ia64/ia64_flags.h, src/java_raw_api.c, src/debug.c, src/sparc/v9.S, src/sparc/ffitarget.h, src/sparc/ffi.c, src/sparc/v8.S, src/mips/ffitarget.h, src/mips/n32.S, src/mips/o32.S, src/mips/ffi.c, src/prep_cif.c, src/sh/ffitarget.h, src/sh/ffi.c, src/sh/sysv.S: Update license text. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148171 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-12-06 David Daney <ddaney@avtrex.com>daney2007-12-061-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ffi.h.in (FFI_SIZEOF_JAVA_RAW): Define if not already defined. (ffi_java_raw): New typedef. (ffi_java_raw_call, ffi_java_ptrarray_to_raw, ffi_java_raw_to_ptrarray): Change parameter types from ffi_raw to ffi_java_raw. (ffi_java_raw_closure) : Same. (ffi_prep_java_raw_closure, ffi_prep_java_raw_closure_loc): Change parameter types. * src/java_raw_api.c (ffi_java_raw_size): Replace FFI_SIZEOF_ARG with FFI_SIZEOF_JAVA_RAW. (ffi_java_raw_to_ptrarray): Change type of raw to ffi_java_raw. Replace FFI_SIZEOF_ARG with FFI_SIZEOF_JAVA_RAW. Use sizeof(ffi_java_raw) for alignment calculations. (ffi_java_ptrarray_to_raw): Same. (ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER if FFI_SIZEOF_JAVA_RAW == 4. (ffi_java_raw_to_rvalue): Same. (ffi_java_raw_call): Change type of raw to ffi_java_raw. (ffi_java_translate_args): Same. (ffi_prep_java_raw_closure_loc, ffi_prep_java_raw_closure): Change parameter types. * src/mips/ffitarget.h (FFI_SIZEOF_JAVA_RAW): Define for N32 ABI. 2007-12-06 David Daney <ddaney@avtrex.com> * interpret.cc: Replace ffi_raw with INTERP_FFI_RAW_TYPE throughout. (ncode_closure, ffi_closure_fun): Define versions for non-FFI_NATIVE_RAW_API case. * include/java-interp.h (INTERP_FFI_RAW_TYPE): Define and use to replace ffi_raw throughout. * jni.cc, interpret-run.cc: Replace ffi_raw with INTERP_FFI_RAW_TYPE throughout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130660 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.ac: Tidy target case.rth2007-04-061-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | (HAVE_LONG_DOUBLE): Allow the target to override. * configure: Regenerate. * include/ffi.h.in: Don't define ffi_type_foo if LIBFFI_HIDE_BASIC_TYPES is defined. (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define to ffi_type_double. * types.c (LIBFFI_HIDE_BASIC_TYPES): Define. (FFI_TYPEDEF, ffi_type_void): Mark the data const. (ffi_type_longdouble): Special case for Alpha. Don't define if long double == double. * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value. (ffi_prep_cif_machdep): Handle it as the 128-bit type. (ffi_call, ffi_closure_osf_inner): Likewise. (ffi_closure_osf_inner): Likewise. Mark hidden. (ffi_call_osf, ffi_closure_osf): Mark hidden. * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition. * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden. (load_table): Handle 128-bit long double. * testsuite/libffi.call/float4.c: Add -mieee for alpha. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123622 138bc75d-0d04-0410-961f-82ee72b054a4
* libffi/ChangeLog:aoliva2007-03-071-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New. (ffi_prep_closure_loc): New. (ffi_prep_raw_closure_loc): New. (ffi_prep_java_raw_closure_loc): New. * src/closures.c: New file. * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment): Replace sflags with exec_offset. [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset, sub_segment_exec_offset): New macros. (get_segment_flags, set_segment_flags, check_segment_merge): New macros. (is_mmapped_segment, is_extern_segment): Use get_segment_flags. (add_segment, sys_alloc, create_mspace, create_mspace_with_base, destroy_mspace): Use new macros. (sys_alloc): Silence warning. * Makefile.am (libffi_la_SOURCES): Add src/closures.c. * Makefile.in: Rebuilt. * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in terms of ffi_prep_closure_loc. * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted from... (ffi_prep_raw_closure): ... this. Re-implement in terms of the renamed version. * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and adjusted from... (ffi_prep_java_raw_closure): ... this. Re-implement in terms of the renamed version. * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from (ffi_prep_closure): ... this. * src/pa/ffi.c: Likewise. * src/cris/ffi.c: Likewise. Adjust. * src/frv/ffi.c: Likewise. * src/ia64/ffi.c: Likewise. * src/mips/ffi.c: Likewise. * src/powerpc/ffi_darwin.c: Likewise. * src/s390/ffi.c: Likewise. * src/sh/ffi.c: Likewise. * src/sh64/ffi.c: Likewise. * src/sparc/ffi.c: Likewise. * src/x86/ffi64.c: Likewise. * src/x86/ffi.c: Likewise. (FFI_INIT_TRAMPOLINE): Adjust. (ffi_prep_raw_closure_loc): Renamed and adjusted from... (ffi_prep_raw_closure): ... this. * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from (ffi_prep_closure): ... this. (flush_icache): Adjust. boehm-gc/ChangeLog: * include/gc.h (GC_REGISTER_FINALIZER_UNREACHABLE): New. (GC_register_finalizer_unreachable): Declare. (GC_debug_register_finalizer_unreachable): Declare. * finalize.c (GC_unreachable_finalize_mark_proc): New. (GC_register_finalizer_unreachable): New. (GC_finalize): Handle it. * dbg_mlc.c (GC_debug_register_finalizer_unreachable): New. (GC_debug_register_finalizer_no_order): Fix whitespace. libjava/ChangeLog: * include/jvm.h (_Jv_ClosureListFinalizer): New. (_Jv_Linker::create_error_method): Adjust. * boehm.cc (_Jv_ClosureListFinalizer): New. * nogc.cc (_Jv_ClosureListFinalizer): New. * java/lang/Class.h (class _Jv_ClosureList): New. (class java::lang::Class): Declare it as friend. * java/lang/natClass.cc (_Jv_ClosureList::releaseClosures): New. (_Jv_ClosureList::registerClousure): New. * include/execution.h (_Jv_ExecutionEngine): Add get_closure_list. (_Jv_CompiledEngine::do_get_closure_list): New. (_Jv_CompiledEngine::_Jv_CompiledEngine): Use it. (_Jv_IndirectCompiledClass): Add closures. (_Jv_IndirectCompiledEngine::get_aux_info): New. (_Jv_IndirectCompiledEngine::do_allocate_field_initializers): Use it. (_Jv_IndirectCompiledEngine::do_get_closure_list): New. (_Jv_IndirectCompiledEngine::_Jv_IndirectCompiledEngine): Use it. (_Jv_InterpreterEngine::do_get_closure_list): Declare. (_Jv_InterpreterEngine::_Jv_InterpreterEngine): Use it. * interpret.cc (FFI_PREP_RAW_CLOSURE): Use _loc variants. (node_closure): Add closure list. (_Jv_InterpMethod::ncode): Add jclass argument. Use ffi_closure_alloc and the separate code pointer. Register the closure for finalization. (_Jv_JNIMethod::ncode): Likewise. (_Jv_InterpreterEngine::do_create_ncode): Pass klass to ncode. (_Jv_InterpreterEngine::do_get_closure_list): New. * include/java-interp.h (_Jv_InterpMethod::ncode): Adjust. (_Jv_InterpClass): Add closures field. (_Jv_JNIMethod::ncode): Adjust. * defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Adjust. (_Jv_ClassReader::handleMethodsEnd): Likewise. * link.cc (struct method_closure): Add closure list. (_Jv_Linker::create_error_method): Add jclass argument. Use ffi_closure_alloc and the separate code pointer. Register the closure for finalization. (_Jv_Linker::link_symbol_table): Remove outdated comment about sharing of otable and atable. Adjust. * java/lang/reflect/natVMProxy.cc (ncode_closure): Add closure list. (ncode): Add jclass argument. Use ffi_closure_alloc and the separate code pointer. Register the closure for finalization. (java::lang::reflect::VMProxy::generateProxyClass): Adjust. * testsuite/libjava.jar/TestClosureGC.java: New. * testsuite/libjava.jar/TestClosureGC.out: New. * testsuite/libjava.jar/TestClosureGC.xfail: New. * testsuite/libjava.jar/TestClosureGC.jar: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122652 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-08-15 Andreas Tobler <a.tobler@schweiz.ch>andreast2006-08-151-21/+21
| | | | | | | | * include/ffi_common.h: Remove lint directives. * include/ffi.h.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116152 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-07-25 Torsten Schoenfeld <kaffeetisch@gmx.de>andreast2006-07-251-3/+11
| | | | | | | | | * include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly for 32-bit architectures. * testsuite/libffi.call/return_ul.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115739 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-08-30 Anthony Green <green@redhat.com>green2004-08-301-1/+1
| | | | | | | | | | | | | | | * Makefile.am: Add frv support. * Makefile.in, testsuite/Makefile.in: Rebuilt. * configure.ac: Read configure.host. * configure, aclocal.m4: Rebuilt. * configure.host: New file. frv-elf needs libgloss. * include/ffi.h.in: Force ffi_closure to have a nice big (8) alignment. This is needed to frv and should harm the others. * include/ffi_common.h (ALIGN_DOWN): New macro. * src/frv/ffi.c, src/frv/ffitarget.h, src/frv/eabi.S: New files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86779 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-10-21 Andreas Tobler <a.tobler@schweiz.ch>andreast2003-10-211-405/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: AC_LINK_FILES(ffitarget.h). * configure: Regenerate. * Makefile.in: Likewise. * include/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. * fficonfig.h.in: Likewise. 2003-10-21 Paolo Bonzini <bonzini@gnu.org> Richard Henderson <rth@redhat.com> Avoid that ffi.h includes fficonfig.h. * Makefile.am (EXTRA_DIST): Include ffitarget.h files (TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX. (TARGET_SRC_MIPS_SGI): Removed. (MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX. (MIPS_SGI): Removed. (CLEANFILES): Removed. (mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New targets. * acconfig.h: Removed. * configure.in: Compute sizeofs only for double and long double. Use them to define and subst HAVE_LONG_DOUBLE. Include comments into AC_DEFINE instead of using acconfig.h. Create include/ffitarget.h instead of include/fficonfig.h. Rename MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree. AC_DEFINE EH_FRAME_FLAGS. * include/Makefile.am (DISTCLEANFILES): New automake macro. (hack_DATA): Add ffitarget.h. * include/ffi.h.in: Remove all system specific definitions. Declare raw API even if it is not installed, why bother? Use limits.h instead of SIZEOF_* to define ffi_type_*. Do not define EH_FRAME_FLAGS, it is in fficonfig.h now. Include ffitarget.h instead of fficonfig.h. Remove ALIGN macro. (UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead. * include/ffi_common.h (bool): Do not define. (ffi_assert): Accept failed assertion. (ffi_type_test): Return void and accept file/line. (FFI_ASSERT): Pass stringized failed assertion. (FFI_ASSERT_AT): New macro. (FFI_ASSERT_VALID_TYPE): New macro. (UINT8, SINT8, UINT16, SINT16, UINT32, SINT32, UINT64, SINT64): Define here with gcc's __attribute__ macro instead of in ffi.h (FLOAT32, ALIGN): Define here instead of in ffi.h * include/ffi-mips.h: Removed. Its content moved to src/mips/ffitarget.h after separating assembly and C sections. * src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c, src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S, src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c: SIZEOF_ARG -> FFI_SIZEOF_ARG. * src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+). * src/debug.c (ffi_assert): Accept stringized failed assertion. (ffi_type_test): Rewritten. * src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call FFI_ASSERT_VALID_TYPE. * src/alpha/ffitarget.h, src/arm/ffitarget.h, src/ia64/ffitarget.h, src/m68k/ffitarget.h, src/mips/ffitarget.h, src/powerpc/ffitarget.h, src/s390/ffitarget.h, src/sh/ffitarget.h, src/sh64/ffitarget.h, src/sparc/ffitarget.h, src/x86/ffitarget.h: New files. * src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S, src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S, src/powerpc/aix.S, src/powerpc/darwin.S, src/powerpc/ffi_darwin.c, src/powerpc/linux64.S, src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S, src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S, src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S, src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S: include fficonfig.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72766 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am: Add SHmedia support. Fix a typo of SH support.kkojima2003-06-131-0/+16
| | | | | | | | | | | | * Makefile.in: Regenerate. * configure.in (sh64-*-linux*, sh5*-*-linux*): Add target. * configure: Regenerate. * include/ffi.h.in: Add SHmedia support. * src/sh64/ffi.c: New file. * src/sh64/sysv.S: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67869 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame sectionjakub2003-05-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | should be read-only. * configure: Rebuilt. * fficonfig.h.in: Rebuilt. * include/ffi.h.in (EH_FRAME_FLAGS): Define. * src/alpha/osf.S: Use EH_FRAME_FLAGS. * src/powerpc/linux64.S: Likewise. * src/powerpc/linux64_closure.S: Likewise. Include ffi.h. * src/powerpc/sysv.S: Use EH_FRAME_FLAGS. Use pcrel encoding if -fpic/-fPIC/-mrelocatable. * src/powerpc/powerpc_closure.S: Likewise. * src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include #write in .eh_frame flags. * src/sparc/v9.S: Likewise. * src/x86/unix64.S: Use EH_FRAME_FLAGS. * src/x86/sysv.S: Likewise. Use pcrel encoding if -fpic/-fPIC. * src/s390/sysv.S: Use EH_FRAME_FLAGS. Include ffi.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66887 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.in (powerpc64*-*-linux*): Remove.jakub2003-04-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure: Rebuilt. libffi/ * include/ffi.h.in (POWERPC64): Define if 64-bit. (enum ffi_abi): Add FFI_LINUX64 on POWERPC. Make it the default on POWERPC64. (FFI_TRAMPOLINE_SIZE): Define to 24 on POWERPC64. * configure.in: Change powerpc-*-linux* into powerpc*-*-linux*. * configure: Rebuilt. * src/powerpc/ffi.c (hidden): Define. (ffi_prep_args_SYSV): Renamed from ffi_prep_args. Cast pointers to unsigned long to shut up warnings. (NUM_GPR_ARG_REGISTERS64, NUM_FPR_ARG_REGISTERS64, ASM_NEEDS_REGISTERS64): New. (ffi_prep_args64): New function. (ffi_prep_cif_machdep): Handle FFI_LINUX64 ABI. (ffi_call): Likewise. (ffi_prep_closure): Likewise. (flush_icache): Surround by #ifndef POWERPC64. (ffi_dblfl): New union type. (ffi_closure_helper_SYSV): Use it to avoid aliasing problems. (ffi_closure_helper_LINUX64): New function. * src/powerpc/ppc_closure.S: Surround whole file by #ifndef __powerpc64__. * src/powerpc/sysv.S: Likewise. (ffi_call_SYSV): Rename ffi_prep_args to ffi_prep_args_SYSV. * src/powerpc/linux64.S: New file. * src/powerpc/linux64_closure.S: New file. * Makefile.am (EXTRA_DIST): Add src/powerpc/linux64.S and src/powerpc/linux64_closure.S. (TARGET_SRC_POWERPC): Likewise. * src/ffitest.c (closure_test_fn, closure_test_fn1, closure_test_fn2, closure_test_fn3): Fix result printing on big-endian 64-bit machines. (main): Print tst2_arg instead of uninitialized tst2_result. * src/ffitest.c (main): Hide what closure pointer really points to from the compiler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65781 138bc75d-0d04-0410-961f-82ee72b054a4
* * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32rakdver2003-03-211-0/+7
| | | | | | | | | | | bit mode. * libffi/src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Receive closure pointer through parameter, read args using __builtin_dwarf_cfa. (FFI_INIT_TRAMPOLINE): Send closure reference through eax. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64663 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-28 Andrew Haley <aph@redhat.com>aph2003-01-281-0/+6
| | | | | | | | | | * include/ffi.h.in: Enable FFI_CLOSURES for x86_64. * src/x86/ffi64.c (ffi_prep_closure): New. (ffi_closure_UNIX64_inner): New. * src/x86/unix64.S (ffi_closure_UNIX64): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61978 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/ffi.h.in: Add closure defines for SPARC, SPARC64.jsturm2003-01-031-1/+13
| | | | | | | | | | * src/ffitest.c (main): Use static storage for closure. * src/sparc/ffi.c (ffi_prep_closure, ffi_closure_sparc_inner): New. * src/sparc/v8.S (ffi_closure_v8): New. * src/sparc/v9.S (ffi_closure_v9): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60857 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-11-10 Ranjit Mathew <rmathew@hotmail.com>green2002-12-061-1/+3
| | | | | | | | | | | | | | | | | | * include/ffi.h.in: Added FFI_STDCALL ffi_type enumeration for X86_WIN32. * src/x86/win32.S: Added ffi_call_STDCALL function definition. * src/x86/ffi.c (ffi_call/ffi_raw_call): Added switch cases for recognising FFI_STDCALL and calling ffi_call_STDCALL if target is X86_WIN32. * src/ffitest.c (my_stdcall_strlen/stdcall_many): stdcall versions of the "my_strlen" and "many" test functions (for X86_WIN32). Added test cases to test stdcall invocation using these functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59878 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/ffi.h.in: Fix i386 win32 compilation.bo2002-10-011-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57691 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.in: Add s390x-*-linux-* target.uweigand2002-09-301-0/+16
| | | | | | | | | | | | | | | | * configure: Regenerate. * include/ffi.h.in: Define S390X for s390x targets. (FFI_CLOSURES): Define for s390/s390x. (FFI_TRAMPOLINE_SIZE): Likewise. (FFI_NATIVE_RAW_API): Likewise. * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390. * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x. * src/s390/ffi.c: Major rework of existing code. Add support for s390x targets. Add closure support. * src/s390/sysv.S: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57646 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-09-27 Bo Thorsen <bo@suse.de>bo2002-09-271-15/+9
| | | | | | | * include/ffi.h.in: Fix multilib x86-64 support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57589 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am: Add SH support.kkojima2002-07-191-0/+12
| | | | | | | | | | | | | * Makefile.in: Regenerate. * configure.in (sh-*-linux*, sh[34]*-*-linux*): Add target. * configure: Regenerate. * include/ffi.h.in: Add SH support. * src/sh/ffi.c: New file. * src/sh/sysv.S: New file. * src/types.c: Add SH support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55574 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-16 Bo Thorsen <bo@suse.de>bo2002-07-181-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/x86/ffi64.c: New file that adds x86-64 support. * src/x86/unix64.S: New file that handles argument setup for x86-64. * src/x86/sysv.S: Don't use this on x86-64. * src/x86/ffi.c: Don't use this on x86-64. Remove unused vars. * src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation for x86-64. * src/ffitest.c (struct6): New test that tests a special case in the x86-64 ABI. (struct7): Likewise. (struct8): Likewise. (struct9): Likewise. (closure_test_fn): Silence warning about this when it's not used. (main): Add the new tests. (main): Fix a couple of wrong casts and silence some compiler warnings. * include/ffi.h.in: Add x86-64 ABI definition. * fficonfig.h.in: Regenerate. * Makefile.am: Add x86-64 support. * configure.in: Likewise. * Makefile.in: Regenerate. * configure: Likewise. 2002-06-24 Bo Thorsen <bo@suse.de> * src/types.c: Merge settings for similar architectures. Add x86-64 sizes and alignments. 2002-06-23 Bo Thorsen <bo@suse.de> * src/arm/ffi.c (ffi_prep_args): Remove unused vars. * src/sparc/ffi.c (ffi_prep_args_v8): Likewise. * src/mips/ffi.c (ffi_prep_args): Likewise. * src/m68k/ffi.c (ffi_prep_args): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55571 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-04-29 Gerhard Tonn <GerhardTonn@swol.de>bryce2002-04-291-0/+6
| | | | | | | | | | | | | * Makefile.am: Add Linux for S/390 support. * Makefile.in: Regenerate. * configure.in: Add Linux for S/390 support. * configure: Regenerate. * include/ffi.h.in: Add Linux for S/390 support. * src/s390/ffi.c: New file from libffi CVS tree. * src/s390/sysv.S: New file from libffi CVS tree. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52873 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-03-07 Andreas Tobler <toa@pop.agri.ch>dje2002-03-071-0/+22
| | | | | | | | | | | | | | | | | | David Edelsohn <edelsohn@gnu.org> * Makefile.am (EXTRA_DIST): Add Darwin and AIX closure files. (TARGET_SRC_POWERPC_AIX): Add aix_closure.S. (TARGET_SRC_POWERPC_DARWIN): Add darwin_closure.S. * Makefile.in: Regenerate. * include/ffi.h.in: Add AIX and Darwin closure definitions. * src/powerpc/ffi_darwin.c (ffi_prep_closure): New function. (flush_icache, flush_range): New functions. (ffi_closure_helper_DARWIN): New function. * src/powerpc/aix_closure.S: New file. * src/powerpc/darwin_closure.S: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50408 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/ffi.h.in: Add typedef for ffi_arg.jsturm2002-02-241-0/+10
| | | | | | | * src/ffitest.c (main): Declare rint with ffi_arg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50006 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am (EXTRA_DIST): Add Darwin and AIX files.dje2002-01-171-1/+8
| | | | | | | | | | | | | | | | (TARGET_SRC_POWERPC_AIX): New. (POWERPC_AIX): New stanza. * Makefile.in: Regenerate. * configure.in: Add AIX case. * configure: Regenerate. * include/ffi.h.in (ffi_abi): Add FFI_AIX. * src/powerpc/ffi_darwin.c (ffi_status): Use "long" to scale frame size. Fix "long double" support. (ffi_call): Add FFI_AIX case. * src/powerpc/aix.S: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48956 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-10-09 John Hornkvist <john@toastedmarshmallow.com>bryce2001-10-091-0/+5
| | | | | | | | | | | | | | | Implement Darwin PowerPC ABI. * configure.in: Handle powerpc-*-darwin*. * Makefile.am: Set source files for POWERPC_DARWIN. * configure: Rebuilt. * Makefile.in: Rebuilt. * include/ffi.h.in: Define FFI_DARWIN and FFI_DEFAULT_ABI for POWERPC_DARWIN. * src/powerpc/darwin.S: New file. * src/powerpc/ffi_darwin.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46112 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-03-27 Jon Beniston <jon@beniston.com>bryce2001-03-271-0/+12
| | | | | | | | | | | | | | | | | | * configure.in: Added X86_WIN32 target (Win32, CygWin, MingW). * configure: Rebuilt. * Makefile.am: Added X86_WIN32 target support. * Makefile.in: Rebuilt. * include/ffi.h.in: Added X86_WIN32 target support. * src/ffitest.c: Doesn't run structure tests for X86_WIN32 targets. * src/types.c: Added X86_WIN32 target support. * src/x86/win32.S: New file. Based on sysv.S, but with EH stuff removed and made to work with CygWin's gas. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40860 138bc75d-0d04-0410-961f-82ee72b054a4
* * src/powerpc/ppc_closure.S: New file.tromey2001-03-241-0/+6
| | | | | | | | | | | | | | | | | * src/powerpc/ffi.c (ffi_prep_args): Fixed ABI compatibility bug involving long long and register pairs. (ffi_prep_closure): New function. (flush_icache): Likewise. (ffi_closure_helper_SYSV): Likewise. * include/ffi.h.in (FFI_CLOSURES): Define on PPC. (FFI_TRAMPOLINE_SIZE): Likewise. (FFI_NATIVE_RAW_API): Likewise. * Makefile.in: Rebuilt. * Makefile.am (EXTRA_DIST): Added src/powerpc/ppc_closure.S. (TARGET_SRC_POWERPC): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40807 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove RCS ident strings to allow comparisions with multiple source ↵nickc2001-03-021-2/+0
| | | | | | checkouts to work git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40195 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/java/:jsm282001-02-081-3/+3
| | | | | | | | | | | | | | | | * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org. libffi/: * include/ffi.h.in: Change sourceware.cygnus.com references to gcc.gnu.org. libjava/: * README, gij.cc, java/lang/natClass.cc, java/lang/natSystem.cc: Change sources.redhat.com and sourceware.cygnus.com references to gcc.gnu.org. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39531 138bc75d-0d04-0410-961f-82ee72b054a4
* libffi closures for Alphagreen2000-12-081-1/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38136 138bc75d-0d04-0410-961f-82ee72b054a4
* Port to sparc 32 and 64 Linux.green2000-04-171-2/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33196 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-02-25 Hans Boehm <boehm@acm.org>tromey2000-02-251-2/+74
| | | | | | | | | | | | | | | | | | | | | | | | * src/ia64/ffi.c, src/ia64/ia64_flags.h, src/ia64/unix.S: New files. * src/raw_api.c (ffi_translate_args): Fixed typo in argument list. (ffi_prep_raw_closure): Use ffi_translate_args, not ffi_closure_translate. * src/java_raw_api.c: New file. * src/ffitest.c (closure_test_fn): New function. (main): Define `rint' as long long on IA64. Added new test when FFI_CLOSURES is defined. * include/ffi.h.in (ALIGN): Use size_t, not unsigned. (ffi_abi): Recognize IA64. (ffi_raw): Added `flt' field. Added "Java raw API" code. * configure.in: Recognize ia64. * Makefile.am (TARGET_SRC_IA64): New macro. (libffi_la_common_SOURCES): Added java_raw_api.c. (libffi_la_SOURCES): Define in IA64 case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32151 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/ffi.h.in: Removed PACKAGE and VERSION defines andtromey1999-09-011-20/+1
| | | | | | | | | | | | undefs. * fficonfig.h.in: Rebuilt. * configure: Rebuilt. * configure.in: Pass 3rd argument to AM_INIT_AUTOMAKE. Use AM_PROG_LIBTOOL (automake 1.4 compatibility). * acconfig.h: Don't #undef PACKAGE or VERSION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29038 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/ffi.h.in (FFI_FN): Remove `...'.green1999-08-091-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28610 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.green1999-08-081-0/+421
* Makefile.am (AM_CFLAGS): Compile with -fexceptions. * src/x86/sysv.S: Add exception handling metadata. also, add missing files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28601 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud