pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libffi Update to 3.2.1:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fd1832a18df2
branches:  trunk
changeset: 641844:fd1832a18df2
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Nov 19 13:49:35 2014 +0000

description:
Update to 3.2.1:

    Fix for AArch64. Release as 3.2.1.

    Fix typo

    Final 3.2 changes

    Final 3.2 changes

    Mention OpenRISC

    Merge pull request #134 from s-macke/openrisc

    Add OpenRISC support

    Only run the complex type tests on supported platforms.

    Add OpenRISC support

    This patch adds support for the OpenRISC architecture.
    (http://opencores.org/or1k/Main_Page)

    This patch has been tested under Linux with QEMU-user emulation support.
    - 32 Bit
    - big endian
    - delayed instructions
    This is the only available configuration under Linux.

    The description of the ABI can be found on the official website.

    Is passes the testsuite except of the unwindtest_ffi_call.cc
    testcase, which seems to be a problem of gcc and not libffi.
    Some testcases of the gcc testsuite still fail.

    Signed-off-by: Sebastian Macke <sebastian%macke.de@localhost>

    Add complex type support. Mostly broken right now

    Compile tests with -Wno-psabi when using GCC

    Update version to 3.2

    More README updates for 3.2

    Update release notes.

    2014-05-11  Bernd Edlinger  <bernd.edlinger%hotmail.de@localhost>

        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.

    2014-09-10  Jakub Jelinek  <jakub%redhat.com@localhost>

        * src/powerpc/linux64.S: Emit .note.GNU-stack even when
        POWERPC64 is not defined.
        * src/powerpc/linux64_closure.S: Likewise.  Also test _CALL_ELF == 2.

    Fix -Werror=declaration-after-statement problem

    2014-07-22  Dominik Vogt  <vogt%linux.vnet.ibm.com@localhost>

        * 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@localhost>

        * 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@localhost>

        * 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.

    Merge pull request #132 from nielsAD/master

    Pascal and Register calling convention support on x86

    Merge pull request #130 from frida/fix/darwin-aarch64-float-alignment

    Fix alignment of FFI_TYPE_FLOAT for Apple's ARM64 ABI

    Merge pull request #129 from frida/fix/darwin-aarch64-cif-prep

    Fix non-variadic CIF initialization for Apple/ARM64

    Merge pull request #124 from knuesel/master

    Fix issue with builddir when calling configure with absolute path

    Merge pull request #123 from ehsan/clang-cl

    Add support for building with clang-cl

    Determine whether register arguments (THISCALL/FASTCALL/REGISTER) are really passed via register to closures. Use stack if not.

    Fixed THISCALL/FASTCALL closures and added basic support for PASCAL/REGISTER closures.

    Support for calling functions with PASCAL and REGISTER calling conventions on x86 Windows/Linux.
    Also changed indentation to be more consistent throughout the (adjusted) files.

    Enable forcing the usage of the static CRT in libffi's msvc wrapper

    This is required for AddressSanitizer builds with clang-cl.

    Fix alignment of FFI_TYPE_FLOAT for Apple's ARM64 ABI

    Fix non-variadic CIF initialization for Apple/ARM64

    Turns out `aarch64_nfixedargs` wasn't initialized in the non-variadic
    case, resulting in undefined behavior when allocating arguments.

    Fix issue with builddir when calling configure with absolute path

    Add support for building with clang-cl

    Remove compiler warning

    Fix paths in libffi.pc.in

    Merge pull request #122 from rvandermeulen/1014976

    Don't make --enable-debug imply using the debug CRT in libffi

    Bug 1014976 - Don't make --enable-debug imply using the debug CRT in libffi.

    Prepare for libffi 3.1.1

    Add missing GNU stack markings in win32.S

    Fix typo

    Update current version.

    Increment libtool version number

    Merge pull request #120 from l0kod/tmpfile

    Create temporary file with O_TMPFILE and O_CLOEXEC when available

    closures: Check for mkostemp(3)

    closures: Create temporary file with O_TMPFILE and O_CLOEXEC when available

    The open_temp_exec_file_dir function can create a temporary file without
    file system accessible link. If the O_TMPFILE flag is not defined (old
    Linux kernel or libc) the behavior is unchanged.

    The open_temp_exec_file_name function now need a new argument "flags"
    (like O_CLOEXEC) used for temporary file creation.

    The O_TMPFILE flag allow temporary file creation without race condition.
    This feature/fix prevent another process to access the (future)
    executable file from the file system.

    The O_CLOEXEC flag automatically close the temporary file for any
    execve. This avoid transmitting (executable) file descriptor to a child
    process.

diffstat:

 devel/libffi/Makefile                           |    5 +-
 devel/libffi/distinfo                           |   20 +-
 devel/libffi/patches/patch-aa                   |   41 +-
 devel/libffi/patches/patch-ah                   |   26 -
 devel/libffi/patches/patch-ai                   |   20 -
 devel/libffi/patches/patch-fficonfig.h.in       |   14 -
 devel/libffi/patches/patch-src_m88k_ffi.c       |  405 ------------------------
 devel/libffi/patches/patch-src_m88k_ffitarget.h |   54 ---
 devel/libffi/patches/patch-src_vax_elfbsd.S     |  200 -----------
 devel/libffi/patches/patch-src_vax_ffi.c        |  281 ----------------
 devel/libffi/patches/patch-src_vax_ffitarget.h  |   54 ---
 11 files changed, 22 insertions(+), 1098 deletions(-)

diffs (truncated from 1251 to 300 lines):

diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/Makefile
--- a/devel/libffi/Makefile     Wed Nov 19 13:17:26 2014 +0000
+++ b/devel/libffi/Makefile     Wed Nov 19 13:49:35 2014 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.25 2014/11/04 21:40:05 joerg Exp $
+# $NetBSD: Makefile,v 1.26 2014/11/19 13:49:35 wiz Exp $
 
-DISTNAME=      libffi-3.1
-PKGREVISION=   1
+DISTNAME=      libffi-3.2.1
 CATEGORIES=    devel
 MASTER_SITES=  ftp://sourceware.org/pub/libffi/
 
diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/distinfo
--- a/devel/libffi/distinfo     Wed Nov 19 13:17:26 2014 +0000
+++ b/devel/libffi/distinfo     Wed Nov 19 13:49:35 2014 +0000
@@ -1,24 +1,14 @@
-$NetBSD: distinfo,v 1.37 2014/11/10 21:29:40 joerg Exp $
+$NetBSD: distinfo,v 1.38 2014/11/19 13:49:35 wiz Exp $
 
-SHA1 (libffi-3.1.tar.gz) = cb373ef2115ec7c57913b84ca72eee14b10ccdc3
-RMD160 (libffi-3.1.tar.gz) = 2445ad6cf9cf42adbd29b9ced4cd29f252864ec5
-Size (libffi-3.1.tar.gz) = 937214 bytes
-SHA1 (patch-aa) = 5aa03c9d2988bf4bbf15d0eb7348a504f2c375ff
+SHA1 (libffi-3.2.1.tar.gz) = 280c265b789e041c02e5c97815793dfc283fb1e6
+RMD160 (libffi-3.2.1.tar.gz) = 9b546a3d002380bec3f00d86fc47d730abf51dfd
+Size (libffi-3.2.1.tar.gz) = 940837 bytes
+SHA1 (patch-aa) = 7748465dc903b53568999fc8e0caf4ea3fbc5778
 SHA1 (patch-ac) = f3c6324f4334d23e684b4eca25173a13be5d37eb
 SHA1 (patch-ad) = 8bb3ec9ea69a8c06b0b1963b3f24018c6384c249
 SHA1 (patch-ae) = 3d8cd3bcd834876f6e60ae519dca8c0b0ba0d4d1
 SHA1 (patch-af) = 2c7ca79ef980a2561333bf79a18df1ecb0bbb9f7
 SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2
-SHA1 (patch-ah) = e9580069ede90cd616da7bc230b28acbf5d204a6
-SHA1 (patch-ai) = f85a6cb64d4a9d7c3e56b47b7092fce10a744b5b
 SHA1 (patch-aj) = d130b2b20b94ca26c70dcc46614e36c6d0ac9153
-SHA1 (patch-fficonfig.h.in) = fd85fa767bc057c843ff71cc61bedfcff84def43
 SHA1 (patch-src_arm_sysv.S) = ea294af156566c6e6f63810358de89cba6213c4f
 SHA1 (patch-src_m88k_elfbsd.S) = fae3e425dcff3e924ef195eab165f9bbc6ec4077
-SHA1 (patch-src_m88k_ffi.c) = e4b7382c3d6e253b8c1c6054150c530c21d018de
-SHA1 (patch-src_m88k_ffitarget.h) = e8479bc3aa876f5e6d52a4d578c5da88291c6646
-SHA1 (patch-src_vax_elfbsd.S) = abf284bd1db086a12608b7243344af30e4a314ca
-SHA1 (patch-src_vax_ffi.c) = f47ced03388e9744afa44d6bb5e14d5f4285cfbf
-SHA1 (patch-src_vax_ffitarget.h) = 388f3a58e37dd8af5c194b5be77a6ea6f9beef4b
-SHA1 (patch-src_x86_ffi.c) = b9ac64a53a92de663a339212e22c1286fa41c1d5
-SHA1 (patch-src_x86_win64.S) = 5b6836bae6c73743b925de4d11bc241c783bffd6
diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/patches/patch-aa
--- a/devel/libffi/patches/patch-aa     Wed Nov 19 13:17:26 2014 +0000
+++ b/devel/libffi/patches/patch-aa     Wed Nov 19 13:49:35 2014 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.22 2014/11/04 21:40:05 joerg Exp $
+$NetBSD: patch-aa,v 1.23 2014/11/19 13:49:35 wiz Exp $
 
---- configure.orig     2014-05-19 13:44:03.000000000 +0000
+--- configure.orig     2014-11-12 11:59:57.000000000 +0000
 +++ configure
 @@ -654,6 +654,8 @@ VAX_FALSE
  VAX_TRUE
@@ -11,7 +11,7 @@
  PA64_HPUX_FALSE
  PA64_HPUX_TRUE
  PA_HPUX_FALSE
-@@ -17199,7 +17201,7 @@ case "$host" in
+@@ -17120,7 +17122,7 @@ case "$host" in
        TARGET=FRV; TARGETDIR=frv
        ;;
  
@@ -20,7 +20,7 @@
        TARGET=PA_LINUX; TARGETDIR=pa
        ;;
    hppa*64-*-hpux*)
-@@ -17297,10 +17299,10 @@ case "$host" in
+@@ -17218,10 +17220,10 @@ case "$host" in
        TARGET=METAG; TARGETDIR=metag
        ;;
  
@@ -33,7 +33,7 @@
        # Support 128-bit long double for NewABI.
        HAVE_LONG_DOUBLE='defined(__mips64)'
        TARGET=MIPS; TARGETDIR=mips
-@@ -17326,7 +17328,7 @@ case "$host" in
+@@ -17251,7 +17253,7 @@ case "$host" in
    powerpc-*-aix* | rs6000-*-aix*)
        TARGET=POWERPC_AIX; TARGETDIR=powerpc
        ;;
@@ -42,7 +42,7 @@
        TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
        HAVE_LONG_DOUBLE_VARIANT=1
        ;;
-@@ -17341,7 +17343,7 @@ case "$host" in
+@@ -17266,7 +17268,7 @@ case "$host" in
        TARGET=S390; TARGETDIR=s390
        ;;
  
@@ -51,7 +51,7 @@
        TARGET=SH; TARGETDIR=sh
        ;;
    sh64-*-* | sh5*-*-*)
-@@ -17360,6 +17362,10 @@ case "$host" in
+@@ -17285,6 +17287,10 @@ case "$host" in
        TARGET=VAX; TARGETDIR=vax
        ;;
  
@@ -62,7 +62,7 @@
    xtensa*-*)
        TARGET=XTENSA; TARGETDIR=xtensa
        ;;
-@@ -17677,6 +17683,14 @@ else
+@@ -17610,6 +17616,14 @@ else
    VAX_FALSE=
  fi
  
@@ -77,7 +77,7 @@
   if test x$TARGET = xXTENSA; then
    XTENSA_TRUE=
    XTENSA_FALSE='#'
-@@ -18597,7 +18611,7 @@ case "$target" in
+@@ -18530,7 +18544,7 @@ case "$target" in
  $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
  
       ;;
@@ -86,16 +86,9 @@
  
  $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
  
-@@ -18787,19 +18801,14 @@ if test "x$GCC" = "xyes"; then
-   if test -n "$with_cross_host" &&
-      test x"$with_cross_host" != x"no"; then
-     toolexecdir='$(exec_prefix)/$(target_alias)'
--    toolexeclibdir='$(toolexecdir)/lib'
-+    toolexeclibdir='${toolexecdir}/lib'
-   else
-     toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
--    toolexeclibdir='$(libdir)'
-+    toolexeclibdir='${libdir}'
+@@ -18725,11 +18739,6 @@ if test "x$GCC" = "xyes"; then
+     toolexecdir="${libdir}"/gcc-lib/'$(target_alias)'
+     toolexeclibdir="${libdir}"
    fi
 -  multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
 -  case $multi_os_directory in
@@ -104,12 +97,8 @@
 -  esac
  
  else
--  toolexeclibdir='$(libdir)'
-+  toolexeclibdir='${libdir}'
- fi
- 
- 
-@@ -19115,6 +19124,10 @@ if test -z "${VAX_TRUE}" && test -z "${V
+   toolexeclibdir="${libdir}"
+@@ -19052,6 +19061,10 @@ if test -z "${VAX_TRUE}" && test -z "${V
    as_fn_error $? "conditional \"VAX\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
@@ -120,7 +109,7 @@
  if test -z "${XTENSA_TRUE}" && test -z "${XTENSA_FALSE}"; then
    as_fn_error $? "conditional \"XTENSA\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
-@@ -20813,13 +20826,13 @@ s/ [a-zA-Z0-9-]*-all [a-zA-Z0-9-]*-all-a
+@@ -20749,13 +20762,13 @@ s/ [a-zA-Z0-9-]*-all [a-zA-Z0-9-]*-all-a
  /-all-all/d
  a\\
        @ HOST="\$(HOST)\" \\\\\\
diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/patches/patch-ah
--- a/devel/libffi/patches/patch-ah     Wed Nov 19 13:17:26 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2009/09/20 13:10:30 tnn Exp $
-
---- src/alpha/ffi.c.orig       2008-02-26 18:34:36.000000000 +0100
-+++ src/alpha/ffi.c
-@@ -27,6 +27,9 @@
- #include <ffi.h>
- #include <ffi_common.h>
- #include <stdlib.h>
-+#ifndef __GNUC__
-+#include <c_asm.h>
-+#endif
- 
- /* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
-    all further uses in this file will refer to the 128-bit type.  */
-@@ -195,7 +198,11 @@ ffi_prep_closure_loc (ffi_closure* closu
-      instead, since both Compaq as and gas can handle it.
- 
-      0x86 is PAL_imb in Tru64 UNIX <alpha/pal.h>.  */
-+#ifdef __GNUC__
-   asm volatile ("call_pal 0x86" : : : "memory");
-+#else /* Compaq C compiler */
-+  asm ("call_pal 0x86");
-+#endif
- 
-   return FFI_OK;
- }
diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/patches/patch-ai
--- a/devel/libffi/patches/patch-ai     Wed Nov 19 13:17:26 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-$NetBSD: patch-ai,v 1.2 2010/01/16 16:28:58 asau Exp $
-
---- include/ffi_common.h.orig  2009-12-29 18:22:26.000000000 +0300
-+++ include/ffi_common.h       2010-01-12 12:47:54.000000000 +0300
-@@ -99,6 +99,15 @@
- typedef uint64_t UINT64;
- typedef int64_t  SINT64;
- # endif
-+#elif defined(__digital__) && !defined(__GNUC__) /* XXX tnn: check sunpro */
-+typedef unsigned int UINT8;
-+typedef signed int   SINT8;
-+typedef unsigned int UINT16;
-+typedef signed int   SINT16;
-+typedef unsigned int UINT32;
-+typedef signed int   SINT32;
-+typedef unsigned int UINT64;
-+typedef signed int   SINT64;
- #else
- typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
- typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/patches/patch-fficonfig.h.in
--- a/devel/libffi/patches/patch-fficonfig.h.in Wed Nov 19 13:17:26 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-$NetBSD: patch-fficonfig.h.in,v 1.1 2012/05/30 09:13:16 jperkin Exp $
-
---- fficonfig.h.in.orig        Wed May 30 08:53:33 2012
-+++ fficonfig.h.in     Wed May 30 08:54:03 2012
-@@ -46,6 +46,9 @@
- /* Define if your assembler supports PC relative relocs. */
- #undef HAVE_AS_X86_PCREL
- 
-+/* Define if your assembler supports unwind section type. */
-+#undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
-+
- /* Define to 1 if you have the <dlfcn.h> header file. */
- #undef HAVE_DLFCN_H
- 
diff -r 83eb97c33481 -r fd1832a18df2 devel/libffi/patches/patch-src_m88k_ffi.c
--- a/devel/libffi/patches/patch-src_m88k_ffi.c Wed Nov 19 13:17:26 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,405 +0,0 @@
-$NetBSD: patch-src_m88k_ffi.c,v 1.1 2013/11/03 23:51:51 jklos Exp $
-
---- src/m88k/ffi.c.orig        2013-11-03 22:59:04.000000000 +0000
-+++ src/m88k/ffi.c
-@@ -0,0 +1,400 @@
-+/*
-+ * Copyright (c) 2013 Miodrag Vallat.  <miod%openbsd.org@localhost>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * ``Software''), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice shall be included
-+ * in all copies or substantial portions of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/*
-+ * m88k Foreign Function Interface
-+ *
-+ * This file attempts to provide all the FFI entry points which can reliably
-+ * be implemented in C.
-+ *
-+ * Only OpenBSD/m88k is currently supported; other platforms (such as
-+ * Motorola's SysV/m88k) could be supported with the following tweaks:
-+ *
-+ * - non-OpenBSD systems use an `outgoing parameter area' as part of the
-+ *   88BCS calling convention, which is not supported under OpenBSD from
-+ *   release 3.6 onwards.  Supporting it should be as easy as taking it
-+ *   into account when adjusting the stack, in the assembly code.
-+ *
-+ * - the logic deciding whether a function argument gets passed through
-+ *   registers, or on the stack, has changed several times in OpenBSD in
-+ *   edge cases (especially for structs larger than 32 bytes being passed
-+ *   by value). The code below attemps to match the logic used by the
-+ *   system compiler of OpenBSD 5.3, i.e. gcc 3.3.6 with many m88k backend
-+ *   fixes.
-+ */
-+
-+#include <ffi.h>
-+#include <ffi_common.h>
-+
-+#include <stdlib.h>
-+#include <unistd.h>
-+
-+void ffi_call_OBSD (unsigned int, extended_cif *, unsigned int, void *,
-+                  void (*fn) ());
-+void *ffi_prep_args (void *, extended_cif *);



Home | Main Index | Thread Index | Old Index