mirror of
https://github.com/python/cpython
synced 2026-09-29 09:40:29 +03:00
Fixes Issue #17192: Update the ctypes module's libffi to v3.0.13. This
specifically addresses a stack misalignment issue on x86 and issues on some more recent platforms.
This commit is contained in:
commit
c70e53aca8
45 changed files with 1288 additions and 658 deletions
|
|
@ -289,9 +289,13 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #17192: Update the ctypes module's libffi to v3.0.13. This
|
||||
specifically addresses a stack misalignment issue on x86 and issues on
|
||||
some more recent platforms.
|
||||
|
||||
- Issue #8862: Fixed curses cleanup when getkey is interrputed by a signal.
|
||||
|
||||
- Issue #17443: impalib.IMAP4_stream was using the default unbuffered IO
|
||||
- Issue #17443: imaplib.IMAP4_stream was using the default unbuffered IO
|
||||
in subprocess, but the imap code assumes buffered IO. In Python2 this
|
||||
worked by accident. IMAP4_stream now explicitly uses buffered IO.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,73 +1,19 @@
|
|||
diff -urN libffi.orig/configure.ac libffi/configure.ac
|
||||
--- libffi.orig/configure.ac 2013-02-11 20:24:24.000000000 +0100
|
||||
+++ libffi/configure.ac 2013-02-12 15:05:46.209844321 +0100
|
||||
@@ -1,4 +1,7 @@
|
||||
dnl Process this with autoconf to create configure
|
||||
+#
|
||||
+# file from libffi - slightly patched for ctypes
|
||||
+#
|
||||
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
@@ -146,6 +149,10 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+ i*86-*-nto-qnx*)
|
||||
+ TARGET=X86; TARGETDIR=x86
|
||||
+ ;;
|
||||
+
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
@@ -200,12 +207,12 @@
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
+ TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
mips*-*-linux* | mips*-*-openbsd*)
|
||||
# Support 128-bit long double for NewABI.
|
||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
+ TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
@@ -265,7 +272,7 @@
|
||||
AC_MSG_ERROR(["libffi has not been ported to $host."])
|
||||
fi
|
||||
|
||||
-AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
|
||||
+AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null])
|
||||
AM_CONDITIONAL(BFIN, test x$TARGET = xBFIN)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
@@ -562,4 +569,8 @@
|
||||
|
||||
AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc)
|
||||
|
||||
+AC_CONFIG_LINKS(include/ffi_common.h:include/ffi_common.h)
|
||||
+
|
||||
+AC_CONFIG_FILES(fficonfig.py)
|
||||
+
|
||||
AC_OUTPUT
|
||||
diff -urN libffi.orig/configure libffi/configure
|
||||
--- libffi.orig/configure 2013-02-11 20:24:24.000000000 +0100
|
||||
+++ libffi/configure 2013-02-12 15:11:42.353853081 +0100
|
||||
@@ -13366,6 +13366,10 @@
|
||||
diff -r -N -u libffi.orig/autom4te.cache/output.0 libffi/autom4te.cache/output.0
|
||||
diff -r -N -u libffi.orig/configure libffi/configure
|
||||
--- libffi.orig/configure 2013-03-17 15:37:50.000000000 -0700
|
||||
+++ libffi/configure 2013-03-18 15:11:39.611575163 -0700
|
||||
@@ -13368,6 +13368,10 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+ i*86-*-nto-qnx*)
|
||||
+ TARGET=X86; TARGETDIR=x86
|
||||
+ ;;
|
||||
+ TARGET=X86; TARGETDIR=x86
|
||||
+ ;;
|
||||
+
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
@@ -13420,12 +13424,12 @@
|
||||
@@ -13426,12 +13430,12 @@
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
|
|
@ -82,7 +28,7 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
;;
|
||||
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
@@ -13485,7 +13489,7 @@
|
||||
@@ -13491,7 +13495,7 @@
|
||||
as_fn_error $? "\"libffi has not been ported to $host.\"" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
|
@ -91,7 +37,7 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
MIPS_TRUE=
|
||||
MIPS_FALSE='#'
|
||||
else
|
||||
@@ -14848,6 +14852,12 @@
|
||||
@@ -14862,6 +14866,12 @@
|
||||
ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc"
|
||||
|
||||
|
||||
|
|
@ -104,7 +50,7 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
@@ -16029,6 +16039,8 @@
|
||||
@@ -16047,6 +16057,8 @@
|
||||
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
|
||||
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
|
||||
"libffi.pc") CONFIG_FILES="$CONFIG_FILES libffi.pc" ;;
|
||||
|
|
@ -113,10 +59,64 @@ diff -urN libffi.orig/configure libffi/configure
|
|||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
diff -urN libffi.orig/fficonfig.py.in libffi/fficonfig.py.in
|
||||
--- libffi.orig/fficonfig.py.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libffi/fficonfig.py.in 2013-02-12 15:11:24.589852644 +0100
|
||||
@@ -0,0 +1,36 @@
|
||||
diff -r -N -u libffi.orig/configure.ac libffi/configure.ac
|
||||
--- libffi.orig/configure.ac 2013-03-17 15:37:50.000000000 -0700
|
||||
+++ libffi/configure.ac 2013-03-18 15:11:11.392989136 -0700
|
||||
@@ -1,4 +1,7 @@
|
||||
dnl Process this with autoconf to create configure
|
||||
+#
|
||||
+# file from libffi - slightly patched for Python's ctypes
|
||||
+#
|
||||
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
@@ -146,6 +149,10 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+ i*86-*-nto-qnx*)
|
||||
+ TARGET=X86; TARGETDIR=x86
|
||||
+ ;;
|
||||
+
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
;;
|
||||
@@ -204,12 +211,12 @@
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
+ TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
mips*-*-linux* | mips*-*-openbsd*)
|
||||
# Support 128-bit long double for NewABI.
|
||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||
- TARGET=MIPS; TARGETDIR=mips
|
||||
+ TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
@@ -269,7 +276,7 @@
|
||||
AC_MSG_ERROR(["libffi has not been ported to $host."])
|
||||
fi
|
||||
|
||||
-AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
|
||||
+AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null])
|
||||
AM_CONDITIONAL(BFIN, test x$TARGET = xBFIN)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
@@ -567,4 +574,8 @@
|
||||
|
||||
AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc)
|
||||
|
||||
+AC_CONFIG_LINKS(include/ffi_common.h:include/ffi_common.h)
|
||||
+
|
||||
+AC_CONFIG_FILES(fficonfig.py)
|
||||
+
|
||||
AC_OUTPUT
|
||||
--- libffi-3.0.11/fficonfig.py.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libffi/fficonfig.py.in 2012-03-15 01:04:27.000000000 +0100
|
||||
@@ -0,0 +1,35 @@
|
||||
+ffi_sources = """
|
||||
+src/prep_cif.c
|
||||
+src/closures.c
|
||||
|
|
@ -130,7 +130,6 @@ diff -urN libffi.orig/fficonfig.py.in libffi/fficonfig.py.in
|
|||
+ 'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'],
|
||||
+ 'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'],
|
||||
+ 'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'],
|
||||
+ 'AARCH64': ['src/aarch64/ffi.c', 'src/aarch64/sysv.S'],
|
||||
+ 'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'],
|
||||
+ 'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'],
|
||||
+ 'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'],
|
||||
|
|
@ -153,9 +152,9 @@ diff -urN libffi.orig/fficonfig.py.in libffi/fficonfig.py.in
|
|||
+ffi_sources += ffi_platforms['@TARGET@']
|
||||
+
|
||||
+ffi_cflags = '@CFLAGS@'
|
||||
diff -urN libffi.orig/src/dlmalloc.c libffi/src/dlmalloc.c
|
||||
--- libffi.orig/src/dlmalloc.c 2013-02-11 20:24:18.000000000 +0100
|
||||
+++ libffi/src/dlmalloc.c 2013-02-12 15:15:12.113858241 +0100
|
||||
diff -urN libffi-3.0.11/src/dlmalloc.c libffi/src/dlmalloc.c
|
||||
--- libffi-3.0.11/src/dlmalloc.c 2012-04-12 04:46:06.000000000 +0200
|
||||
+++ libffi/src/dlmalloc.c 2012-06-26 15:15:58.949547461 +0200
|
||||
@@ -457,6 +457,11 @@
|
||||
#define LACKS_ERRNO_H
|
||||
#define MALLOC_FAILURE_ACTION
|
||||
|
|
|
|||
21
Modules/_ctypes/libffi/.gitignore
vendored
Normal file
21
Modules/_ctypes/libffi/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.libs
|
||||
.deps
|
||||
*.o
|
||||
*.lo
|
||||
.dirstamp
|
||||
*.la
|
||||
Makefile
|
||||
config.log
|
||||
config.status
|
||||
*~
|
||||
fficonfig.h
|
||||
include/ffi.h
|
||||
include/ffitarget.h
|
||||
libffi.pc
|
||||
libtool
|
||||
stamp-h1
|
||||
libffi*gz
|
||||
autom4te.cache
|
||||
libffi.xcodeproj/xcuserdata
|
||||
libffi.xcodeproj/project.xcworkspace
|
||||
ios/
|
||||
8
Modules/_ctypes/libffi/.travis.yml
Normal file
8
Modules/_ctypes/libffi/.travis.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
before_script: sudo apt-get install dejagnu
|
||||
|
||||
script: ./configure && make && make check
|
||||
|
|
@ -1,3 +1,49 @@
|
|||
2013-03-17 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* README: Update for 3.0.13.
|
||||
* configure.ac: Ditto.
|
||||
* configure: Rebuilt.
|
||||
* doc/*: Update version.
|
||||
|
||||
2013-03-17 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* src/closures.c (is_emutramp_enabled
|
||||
[!FFI_MMAP_EXEC_EMUTRAMP_PAX]): Move default definition outside
|
||||
enclosing #if scope.
|
||||
|
||||
2013-03-17 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* configure.ac: Only modify toolexecdir in certain cases.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2013-03-16 Gilles Talis <gilles.talis@gmail.com>
|
||||
|
||||
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Don't use
|
||||
fparg_count,etc on __NO_FPRS__ targets.
|
||||
|
||||
2013-03-16 Alan Hourihane <alanh@fairlite.co.uk>
|
||||
|
||||
* src/m68k/sysv.S (epilogue): Don't use extb instruction on
|
||||
m680000 machines.
|
||||
|
||||
2013-03-16 Alex Gaynor <alex.gaynor@gmail.com>
|
||||
|
||||
* src/x86/ffi.c (ffi_prep_cif_machdep): Always align stack.
|
||||
|
||||
2013-03-13 Markos Chandras <markos.chandras@imgtec.com>
|
||||
|
||||
* configure.ac: Add support for Imagination Technologies Meta.
|
||||
* Makefile.am: Likewise.
|
||||
* README: Add Imagination Technologies Meta details.
|
||||
* src/metag/ffi.c: New.
|
||||
* src/metag/ffitarget.h: Likewise.
|
||||
* src/metag/sysv.S: Likewise.
|
||||
|
||||
2013-02-24 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* doc/libffi.texi (Structures): Fix missing category argument of
|
||||
@deftp.
|
||||
|
||||
2013-02-11 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* configure.ac: Update release number to 3.0.12.
|
||||
|
|
|
|||
|
|
@ -7,44 +7,45 @@ ACLOCAL_AMFLAGS = -I m4
|
|||
SUBDIRS = include testsuite man
|
||||
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/aarch64/ffi.c src/aarch64/ffitarget.h \
|
||||
src/aarch64/sysv.S build-ios.sh \
|
||||
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
|
||||
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
|
||||
src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \
|
||||
src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
|
||||
src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||
src/ia64/unix.S src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
|
||||
src/mips/ffitarget.h src/m32r/ffi.c src/m32r/sysv.S \
|
||||
src/m32r/ffitarget.h src/m68k/ffi.c src/m68k/sysv.S \
|
||||
src/m68k/ffitarget.h src/microblaze/ffi.c \
|
||||
src/microblaze/sysv.S src/microblaze/ffitarget.h \
|
||||
src/powerpc/ffi.c src/powerpc/sysv.S \
|
||||
src/powerpc/linux64.S src/powerpc/linux64_closure.S \
|
||||
src/powerpc/ppc_closure.S src/powerpc/asm.h \
|
||||
src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c \
|
||||
src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S \
|
||||
src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c \
|
||||
src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S \
|
||||
src/x86/win32.S src/x86/darwin.S src/x86/win64.S \
|
||||
src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S \
|
||||
src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c \
|
||||
src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c \
|
||||
src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S \
|
||||
src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c \
|
||||
src/tile/ffitarget.h src/tile/tile.S libtool-version \
|
||||
src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S \
|
||||
src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S \
|
||||
build-ios.sh src/alpha/ffi.c src/alpha/osf.S \
|
||||
src/alpha/ffitarget.h src/arm/ffi.c src/arm/sysv.S \
|
||||
src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S \
|
||||
src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S \
|
||||
src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h \
|
||||
src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c \
|
||||
src/mips/n32.S src/mips/o32.S src/metag/ffi.c \
|
||||
src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c \
|
||||
src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h \
|
||||
src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
|
||||
src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
|
||||
src/microblaze/ffi.c src/microblaze/sysv.S \
|
||||
src/microblaze/ffitarget.h src/powerpc/ffi.c \
|
||||
src/powerpc/sysv.S src/powerpc/linux64.S \
|
||||
src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
|
||||
src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c \
|
||||
src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S \
|
||||
src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c \
|
||||
src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S \
|
||||
src/x86/win32.S src/x86/darwin.S src/x86/win64.S \
|
||||
src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S \
|
||||
src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c \
|
||||
src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c \
|
||||
src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S \
|
||||
src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c \
|
||||
src/tile/ffitarget.h src/tile/tile.S libtool-version \
|
||||
src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S \
|
||||
ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4 \
|
||||
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
||||
m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh \
|
||||
generate-ios-source-and-headers.py \
|
||||
generate-ios-source-and-headers.py \
|
||||
generate-osx-source-and-headers.py \
|
||||
libffi.xcodeproj/project.pbxproj src/arm/trampoline.S \
|
||||
libtool-ldflags
|
||||
libffi.xcodeproj/project.pbxproj src/arm/trampoline.S \
|
||||
libtool-ldflags
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
|
|
@ -208,6 +209,9 @@ endif
|
|||
if XTENSA
|
||||
nodist_libffi_la_SOURCES += src/xtensa/sysv.S src/xtensa/ffi.c
|
||||
endif
|
||||
if METAG
|
||||
nodist_libffi_la_SOURCES += src/metag/sysv.S src/metag/ffi.c
|
||||
endif
|
||||
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ target_triplet = @target@
|
|||
@PA_HPUX_TRUE@am__append_31 = src/pa/hpux32.S src/pa/ffi.c
|
||||
@TILE_TRUE@am__append_32 = src/tile/tile.S src/tile/ffi.c
|
||||
@XTENSA_TRUE@am__append_33 = src/xtensa/sysv.S src/xtensa/ffi.c
|
||||
@METAG_TRUE@am__append_34 = src/metag/sysv.S src/metag/ffi.c
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
|
||||
|
|
@ -196,6 +197,7 @@ am_libffi_la_OBJECTS = src/prep_cif.lo src/types.lo src/raw_api.lo \
|
|||
@PA_HPUX_TRUE@am__objects_31 = src/pa/hpux32.lo src/pa/ffi.lo
|
||||
@TILE_TRUE@am__objects_32 = src/tile/tile.lo src/tile/ffi.lo
|
||||
@XTENSA_TRUE@am__objects_33 = src/xtensa/sysv.lo src/xtensa/ffi.lo
|
||||
@METAG_TRUE@am__objects_34 = src/metag/sysv.lo src/metag/ffi.lo
|
||||
nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
|
||||
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
|
||||
$(am__objects_6) $(am__objects_7) $(am__objects_8) \
|
||||
|
|
@ -207,17 +209,17 @@ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
|
|||
$(am__objects_24) $(am__objects_25) $(am__objects_26) \
|
||||
$(am__objects_27) $(am__objects_28) $(am__objects_29) \
|
||||
$(am__objects_30) $(am__objects_31) $(am__objects_32) \
|
||||
$(am__objects_33)
|
||||
$(am__objects_33) $(am__objects_34)
|
||||
libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
|
||||
$(nodist_libffi_la_OBJECTS)
|
||||
libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
libffi_convenience_la_LIBADD =
|
||||
am__objects_34 = src/prep_cif.lo src/types.lo src/raw_api.lo \
|
||||
am__objects_35 = src/prep_cif.lo src/types.lo src/raw_api.lo \
|
||||
src/java_raw_api.lo src/closures.lo
|
||||
am_libffi_convenience_la_OBJECTS = $(am__objects_34)
|
||||
am__objects_35 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
am_libffi_convenience_la_OBJECTS = $(am__objects_35)
|
||||
am__objects_36 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
||||
$(am__objects_4) $(am__objects_5) $(am__objects_6) \
|
||||
$(am__objects_7) $(am__objects_8) $(am__objects_9) \
|
||||
$(am__objects_10) $(am__objects_11) $(am__objects_12) \
|
||||
|
|
@ -227,8 +229,9 @@ am__objects_35 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
|
|||
$(am__objects_22) $(am__objects_23) $(am__objects_24) \
|
||||
$(am__objects_25) $(am__objects_26) $(am__objects_27) \
|
||||
$(am__objects_28) $(am__objects_29) $(am__objects_30) \
|
||||
$(am__objects_31) $(am__objects_32) $(am__objects_33)
|
||||
nodist_libffi_convenience_la_OBJECTS = $(am__objects_35)
|
||||
$(am__objects_31) $(am__objects_32) $(am__objects_33) \
|
||||
$(am__objects_34)
|
||||
nodist_libffi_convenience_la_OBJECTS = $(am__objects_36)
|
||||
libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
|
||||
$(nodist_libffi_convenience_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
|
|
@ -466,44 +469,45 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
|
|||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = include testsuite man
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/aarch64/ffi.c src/aarch64/ffitarget.h \
|
||||
src/aarch64/sysv.S build-ios.sh \
|
||||
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
|
||||
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
|
||||
src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \
|
||||
src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
|
||||
src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
|
||||
src/ia64/unix.S src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
|
||||
src/mips/ffitarget.h src/m32r/ffi.c src/m32r/sysv.S \
|
||||
src/m32r/ffitarget.h src/m68k/ffi.c src/m68k/sysv.S \
|
||||
src/m68k/ffitarget.h src/microblaze/ffi.c \
|
||||
src/microblaze/sysv.S src/microblaze/ffitarget.h \
|
||||
src/powerpc/ffi.c src/powerpc/sysv.S \
|
||||
src/powerpc/linux64.S src/powerpc/linux64_closure.S \
|
||||
src/powerpc/ppc_closure.S src/powerpc/asm.h \
|
||||
src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c \
|
||||
src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S \
|
||||
src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c \
|
||||
src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S \
|
||||
src/x86/win32.S src/x86/darwin.S src/x86/win64.S \
|
||||
src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S \
|
||||
src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c \
|
||||
src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c \
|
||||
src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S \
|
||||
src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c \
|
||||
src/tile/ffitarget.h src/tile/tile.S libtool-version \
|
||||
src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S \
|
||||
src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S \
|
||||
build-ios.sh src/alpha/ffi.c src/alpha/osf.S \
|
||||
src/alpha/ffitarget.h src/arm/ffi.c src/arm/sysv.S \
|
||||
src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S \
|
||||
src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S \
|
||||
src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h \
|
||||
src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c \
|
||||
src/mips/n32.S src/mips/o32.S src/metag/ffi.c \
|
||||
src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c \
|
||||
src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h \
|
||||
src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
|
||||
src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
|
||||
src/microblaze/ffi.c src/microblaze/sysv.S \
|
||||
src/microblaze/ffitarget.h src/powerpc/ffi.c \
|
||||
src/powerpc/sysv.S src/powerpc/linux64.S \
|
||||
src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
|
||||
src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S \
|
||||
src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
|
||||
src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
|
||||
src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
|
||||
src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c \
|
||||
src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S \
|
||||
src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c \
|
||||
src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S \
|
||||
src/x86/win32.S src/x86/darwin.S src/x86/win64.S \
|
||||
src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S \
|
||||
src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c \
|
||||
src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c \
|
||||
src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S \
|
||||
src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c \
|
||||
src/tile/ffitarget.h src/tile/tile.S libtool-version \
|
||||
src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S \
|
||||
ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4 \
|
||||
m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
||||
m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh \
|
||||
generate-ios-source-and-headers.py \
|
||||
generate-ios-source-and-headers.py \
|
||||
generate-osx-source-and-headers.py \
|
||||
libffi.xcodeproj/project.pbxproj src/arm/trampoline.S \
|
||||
libtool-ldflags
|
||||
libffi.xcodeproj/project.pbxproj src/arm/trampoline.S \
|
||||
libtool-ldflags
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
|
|
@ -567,7 +571,7 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
|
|||
$(am__append_24) $(am__append_25) $(am__append_26) \
|
||||
$(am__append_27) $(am__append_28) $(am__append_29) \
|
||||
$(am__append_30) $(am__append_31) $(am__append_32) \
|
||||
$(am__append_33)
|
||||
$(am__append_33) $(am__append_34)
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
|
||||
|
|
@ -943,6 +947,16 @@ src/xtensa/sysv.lo: src/xtensa/$(am__dirstamp) \
|
|||
src/xtensa/$(DEPDIR)/$(am__dirstamp)
|
||||
src/xtensa/ffi.lo: src/xtensa/$(am__dirstamp) \
|
||||
src/xtensa/$(DEPDIR)/$(am__dirstamp)
|
||||
src/metag/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/metag
|
||||
@: > src/metag/$(am__dirstamp)
|
||||
src/metag/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) src/metag/$(DEPDIR)
|
||||
@: > src/metag/$(DEPDIR)/$(am__dirstamp)
|
||||
src/metag/sysv.lo: src/metag/$(am__dirstamp) \
|
||||
src/metag/$(DEPDIR)/$(am__dirstamp)
|
||||
src/metag/ffi.lo: src/metag/$(am__dirstamp) \
|
||||
src/metag/$(DEPDIR)/$(am__dirstamp)
|
||||
libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES) $(EXTRA_libffi_la_DEPENDENCIES)
|
||||
$(libffi_la_LINK) -rpath $(toolexeclibdir) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
|
||||
libffi_convenience.la: $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_DEPENDENCIES) $(EXTRA_libffi_convenience_la_DEPENDENCIES)
|
||||
|
|
@ -972,6 +986,8 @@ mostlyclean-compile:
|
|||
-rm -f src/m32r/*.lo
|
||||
-rm -f src/m68k/*.$(OBJEXT)
|
||||
-rm -f src/m68k/*.lo
|
||||
-rm -f src/metag/*.$(OBJEXT)
|
||||
-rm -f src/metag/*.lo
|
||||
-rm -f src/microblaze/*.$(OBJEXT)
|
||||
-rm -f src/microblaze/*.lo
|
||||
-rm -f src/mips/*.$(OBJEXT)
|
||||
|
|
@ -1027,6 +1043,8 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@src/m32r/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/metag/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/metag/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/microblaze/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/microblaze/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/ffi.Plo@am__quote@
|
||||
|
|
@ -1134,6 +1152,7 @@ clean-libtool:
|
|||
-rm -rf src/ia64/.libs src/ia64/_libs
|
||||
-rm -rf src/m32r/.libs src/m32r/_libs
|
||||
-rm -rf src/m68k/.libs src/m68k/_libs
|
||||
-rm -rf src/metag/.libs src/metag/_libs
|
||||
-rm -rf src/microblaze/.libs src/microblaze/_libs
|
||||
-rm -rf src/mips/.libs src/mips/_libs
|
||||
-rm -rf src/moxie/.libs src/moxie/_libs
|
||||
|
|
@ -1711,6 +1730,8 @@ distclean-generic:
|
|||
-rm -f src/m32r/$(am__dirstamp)
|
||||
-rm -f src/m68k/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/m68k/$(am__dirstamp)
|
||||
-rm -f src/metag/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/metag/$(am__dirstamp)
|
||||
-rm -f src/microblaze/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/microblaze/$(am__dirstamp)
|
||||
-rm -f src/mips/$(DEPDIR)/$(am__dirstamp)
|
||||
|
|
@ -1747,7 +1768,7 @@ clean-am: clean-aminfo clean-generic clean-libtool \
|
|||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
|
||||
-rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/metag/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
|
@ -1886,7 +1907,7 @@ installcheck-am:
|
|||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
|
||||
-rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/metag/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Status
|
||||
======
|
||||
|
||||
libffi-3.0.12 was released on February 11, 2013. Check the libffi web
|
||||
libffi-3.0.13 was released on March 17, 2013. Check the libffi web
|
||||
page for updates: <URL:http://sourceware.org/libffi/>.
|
||||
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ Libffi has been ported to many different platforms.
|
|||
For specific configuration details and testing status, please
|
||||
refer to the wiki page here:
|
||||
|
||||
http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.12
|
||||
http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.13
|
||||
|
||||
At the time of release, the following basic configurations have been
|
||||
tested:
|
||||
|
|
@ -63,6 +63,7 @@ tested:
|
|||
| M68K | FreeMiNT | GCC |
|
||||
| M68K | Linux | GCC |
|
||||
| M68K | RTEMS | GCC |
|
||||
| Meta | Linux | GCC |
|
||||
| MicroBlaze | Linux | GCC |
|
||||
| MIPS | IRIX | GCC |
|
||||
| MIPS | Linux | GCC |
|
||||
|
|
@ -162,6 +163,16 @@ History
|
|||
|
||||
See the ChangeLog files for details.
|
||||
|
||||
3.0.13 Mar-17-13
|
||||
Add Meta support.
|
||||
Add missing Moxie bits.
|
||||
Fix stack alignment bug on 32-bit x86.
|
||||
Build fix for m68000 targets.
|
||||
Build fix for soft-float Power targets.
|
||||
Fix the install dir location for some platforms when building
|
||||
with GCC (OS X, Solaris).
|
||||
Fix Cygwin regression.
|
||||
|
||||
3.0.12 Feb-11-13
|
||||
Add Moxie support.
|
||||
Add AArch64 support.
|
||||
|
|
|
|||
0
Modules/_ctypes/libffi/build-ios.sh
Executable file → Normal file
0
Modules/_ctypes/libffi/build-ios.sh
Executable file → Normal file
50
Modules/_ctypes/libffi/configure
vendored
50
Modules/_ctypes/libffi/configure
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for libffi 3.0.12.
|
||||
# Generated by GNU Autoconf 2.69 for libffi 3.0.13.
|
||||
#
|
||||
# Report bugs to <http://github.com/atgreen/libffi/issues>.
|
||||
#
|
||||
|
|
@ -590,8 +590,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='libffi'
|
||||
PACKAGE_TARNAME='libffi'
|
||||
PACKAGE_VERSION='3.0.12'
|
||||
PACKAGE_STRING='libffi 3.0.12'
|
||||
PACKAGE_VERSION='3.0.13'
|
||||
PACKAGE_STRING='libffi 3.0.13'
|
||||
PACKAGE_BUGREPORT='http://github.com/atgreen/libffi/issues'
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
|
@ -685,6 +685,8 @@ POWERPC_FALSE
|
|||
POWERPC_TRUE
|
||||
MOXIE_FALSE
|
||||
MOXIE_TRUE
|
||||
METAG_FALSE
|
||||
METAG_TRUE
|
||||
MICROBLAZE_FALSE
|
||||
MICROBLAZE_TRUE
|
||||
M68K_FALSE
|
||||
|
|
@ -1405,7 +1407,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libffi 3.0.12 to adapt to many kinds of systems.
|
||||
\`configure' configures libffi 3.0.13 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
|
@ -1476,7 +1478,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libffi 3.0.12:";;
|
||||
short | recursive ) echo "Configuration of libffi 3.0.13:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
|
@ -1596,7 +1598,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libffi configure 3.0.12
|
||||
libffi configure 3.0.13
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
|
@ -2202,7 +2204,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libffi $as_me 3.0.12, which was
|
||||
It was created by libffi $as_me 3.0.13, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
|
@ -3245,7 +3247,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libffi'
|
||||
VERSION='3.0.12'
|
||||
VERSION='3.0.13'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
|
@ -13367,8 +13369,8 @@ case "$host" in
|
|||
;;
|
||||
|
||||
i*86-*-nto-qnx*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
;;
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
|
|
@ -13423,6 +13425,10 @@ case "$host" in
|
|||
TARGET=MOXIE; TARGETDIR=moxie
|
||||
;;
|
||||
|
||||
metag-*-*)
|
||||
TARGET=METAG; TARGETDIR=metag
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
|
|
@ -13593,6 +13599,14 @@ else
|
|||
MICROBLAZE_FALSE=
|
||||
fi
|
||||
|
||||
if test x$TARGET = xMETAG; then
|
||||
METAG_TRUE=
|
||||
METAG_FALSE='#'
|
||||
else
|
||||
METAG_TRUE='#'
|
||||
METAG_FALSE=
|
||||
fi
|
||||
|
||||
if test x$TARGET = xMOXIE; then
|
||||
MOXIE_TRUE=
|
||||
MOXIE_FALSE='#'
|
||||
|
|
@ -14491,10 +14505,10 @@ if ${libffi_cv_as_x86_pcrel+:} false; then :
|
|||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
libffi_cv_as_x86_pcrel=no
|
||||
libffi_cv_as_x86_pcrel=yes
|
||||
echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
|
||||
if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
|
||||
libffi_cv_as_x86_pcrel=yes
|
||||
if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
|
||||
libffi_cv_as_x86_pcrel=no
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
@ -14833,7 +14847,7 @@ if test "x$GCC" = "xyes"; then
|
|||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) ;; # Avoid trailing /.
|
||||
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
|
@ -15055,6 +15069,10 @@ if test -z "${MICROBLAZE_TRUE}" && test -z "${MICROBLAZE_FALSE}"; then
|
|||
as_fn_error $? "conditional \"MICROBLAZE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${METAG_TRUE}" && test -z "${METAG_FALSE}"; then
|
||||
as_fn_error $? "conditional \"METAG\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${MOXIE_TRUE}" && test -z "${MOXIE_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MOXIE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
|
@ -15541,7 +15559,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libffi $as_me 3.0.12, which was
|
||||
This file was extended by libffi $as_me 3.0.13, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
|
@ -15611,7 +15629,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
libffi config.status 3.0.12
|
||||
libffi config.status 3.0.13
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
dnl Process this with autoconf to create configure
|
||||
#
|
||||
# file from libffi - slightly patched for ctypes
|
||||
# file from libffi - slightly patched for Python's ctypes
|
||||
#
|
||||
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
AC_INIT([libffi], [3.0.12], [http://github.com/atgreen/libffi/issues])
|
||||
AC_INIT([libffi], [3.0.13], [http://github.com/atgreen/libffi/issues])
|
||||
AC_CONFIG_HEADERS([fficonfig.h])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
|
@ -150,8 +150,8 @@ case "$host" in
|
|||
;;
|
||||
|
||||
i*86-*-nto-qnx*)
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
;;
|
||||
TARGET=X86; TARGETDIR=x86
|
||||
;;
|
||||
|
||||
x86_64-*-darwin*)
|
||||
TARGET=X86_DARWIN; TARGETDIR=x86
|
||||
|
|
@ -206,6 +206,10 @@ case "$host" in
|
|||
TARGET=MOXIE; TARGETDIR=moxie
|
||||
;;
|
||||
|
||||
metag-*-*)
|
||||
TARGET=METAG; TARGETDIR=metag
|
||||
;;
|
||||
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
TARGET=MIPS_IRIX; TARGETDIR=mips
|
||||
;;
|
||||
|
|
@ -285,6 +289,7 @@ AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
|
|||
AM_CONDITIONAL(M32R, test x$TARGET = xM32R)
|
||||
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
|
||||
AM_CONDITIONAL(MICROBLAZE, test x$TARGET = xMICROBLAZE)
|
||||
AM_CONDITIONAL(METAG, test x$TARGET = xMETAG)
|
||||
AM_CONDITIONAL(MOXIE, test x$TARGET = xMOXIE)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
|
||||
|
|
@ -362,10 +367,10 @@ fi
|
|||
if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64; then
|
||||
AC_CACHE_CHECK([assembler supports pc related relocs],
|
||||
libffi_cv_as_x86_pcrel, [
|
||||
libffi_cv_as_x86_pcrel=no
|
||||
libffi_cv_as_x86_pcrel=yes
|
||||
echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
|
||||
if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
|
||||
libffi_cv_as_x86_pcrel=yes
|
||||
if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
|
||||
libffi_cv_as_x86_pcrel=no
|
||||
fi
|
||||
])
|
||||
if test "x$libffi_cv_as_x86_pcrel" = xyes; then
|
||||
|
|
@ -551,7 +556,7 @@ if test "x$GCC" = "xyes"; then
|
|||
multi_os_directory=`$CC -print-multi-os-directory`
|
||||
case $multi_os_directory in
|
||||
.) ;; # Avoid trailing /.
|
||||
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
||||
esac
|
||||
AC_SUBST(toolexecdir)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
This is ../doc/libffi.info, produced by makeinfo version 4.13 from
|
||||
../doc/libffi.texi.
|
||||
This is ../libffi/doc/libffi.info, produced by makeinfo version 4.13
|
||||
from ../libffi/doc/libffi.texi.
|
||||
|
||||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright (C) 2008, 2010, 2011 Red Hat, Inc.
|
||||
Copyright (C) 2008, 2010 Red Hat, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU General Public License as
|
||||
|
|
@ -27,7 +27,7 @@ libffi
|
|||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright (C) 2008, 2010, 2011 Red Hat, Inc.
|
||||
Copyright (C) 2008, 2010 Red Hat, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU General Public License as
|
||||
|
|
@ -115,6 +115,8 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
|||
want. *note Multiple ABIs:: for more information.
|
||||
|
||||
NARGS is the number of arguments that this function accepts.
|
||||
`libffi' does not yet handle varargs functions; see *note Missing
|
||||
Features:: for more information.
|
||||
|
||||
RTYPE is a pointer to an `ffi_type' structure that describes the
|
||||
return type of the function. *Note Types::.
|
||||
|
|
@ -127,30 +129,6 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
|||
properly; `FFI_BAD_TYPEDEF' if one of the `ffi_type' objects is
|
||||
incorrect; or `FFI_BAD_ABI' if the ABI parameter is invalid.
|
||||
|
||||
If the function being called is variadic (varargs) then
|
||||
`ffi_prep_cif_var' must be used instead of `ffi_prep_cif'.
|
||||
|
||||
-- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi
|
||||
varabi, unsigned int NFIXEDARGS, unsigned int varntotalargs,
|
||||
ffi_type *RTYPE, ffi_type **ARGTYPES)
|
||||
This initializes CIF according to the given parameters for a call
|
||||
to a variadic function. In general it's operation is the same as
|
||||
for `ffi_prep_cif' except that:
|
||||
|
||||
NFIXEDARGS is the number of fixed arguments, prior to any variadic
|
||||
arguments. It must be greater than zero.
|
||||
|
||||
NTOTALARGS the total number of arguments, including variadic and
|
||||
fixed arguments.
|
||||
|
||||
Note that, different cif's must be prepped for calls to the same
|
||||
function when different numbers of arguments are passed.
|
||||
|
||||
Also note that a call to `ffi_prep_cif_var' with
|
||||
NFIXEDARGS=NOTOTALARGS is NOT equivalent to a call to
|
||||
`ffi_prep_cif'.
|
||||
|
||||
|
||||
To call a function using an initialized `ffi_cif', use the
|
||||
`ffi_call' function:
|
||||
|
||||
|
|
@ -169,9 +147,7 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
|
|||
AVALUES is a vector of `void *' pointers that point to the memory
|
||||
locations holding the argument values for a call. If CIF declares
|
||||
that the function has no arguments (i.e., NARGS was 0), then
|
||||
AVALUES is ignored. Note that argument values may be modified by
|
||||
the callee (for instance, structs passed by value); the burden of
|
||||
copying pass-by-value arguments is placed on the caller.
|
||||
AVALUES is ignored.
|
||||
|
||||
|
||||
File: libffi.info, Node: Simple Example, Next: Types, Prev: The Basics, Up: Using libffi
|
||||
|
|
@ -533,7 +509,9 @@ File: libffi.info, Node: Missing Features, Next: Index, Prev: Using libffi,
|
|||
`libffi' is missing a few features. We welcome patches to add support
|
||||
for these.
|
||||
|
||||
* Variadic closures.
|
||||
* There is no support for calling varargs functions. This may work
|
||||
on some platforms, depending on how the ABI is defined, but it is
|
||||
not reliable.
|
||||
|
||||
* There is no support for bit fields in structures.
|
||||
|
||||
|
|
@ -541,9 +519,6 @@ for these.
|
|||
|
||||
* The "raw" API is undocumented.
|
||||
|
||||
Note that variadic support is very new and tested on a relatively
|
||||
small number of platforms.
|
||||
|
||||
|
||||
File: libffi.info, Node: Index, Prev: Missing Features, Up: Top
|
||||
|
||||
|
|
@ -561,12 +536,11 @@ Index
|
|||
* closure API: The Closure API. (line 13)
|
||||
* closures: The Closure API. (line 13)
|
||||
* FFI: Introduction. (line 31)
|
||||
* ffi_call: The Basics. (line 63)
|
||||
* ffi_closure_alloc: The Closure API. (line 19)
|
||||
* ffi_call: The Basics. (line 41)
|
||||
* ffi_closure_alloca: The Closure API. (line 19)
|
||||
* ffi_closure_free: The Closure API. (line 26)
|
||||
* FFI_CLOSURES: The Closure API. (line 13)
|
||||
* ffi_prep_cif: The Basics. (line 16)
|
||||
* ffi_prep_cif_var: The Basics. (line 39)
|
||||
* ffi_prep_closure_loc: The Closure API. (line 34)
|
||||
* ffi_status <1>: The Closure API. (line 37)
|
||||
* ffi_status: The Basics. (line 18)
|
||||
|
|
@ -594,24 +568,24 @@ Index
|
|||
* ffi_type_void: Primitive Types. (line 10)
|
||||
* Foreign Function Interface: Introduction. (line 31)
|
||||
* void <1>: The Closure API. (line 20)
|
||||
* void: The Basics. (line 65)
|
||||
* void: The Basics. (line 43)
|
||||
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top698
|
||||
Node: Introduction1446
|
||||
Node: Using libffi3082
|
||||
Node: The Basics3568
|
||||
Node: Simple Example7210
|
||||
Node: Types8237
|
||||
Node: Primitive Types8520
|
||||
Node: Structures10340
|
||||
Node: Type Example11200
|
||||
Node: Multiple ABIs12423
|
||||
Node: The Closure API12794
|
||||
Node: Closure Example15738
|
||||
Node: Missing Features17297
|
||||
Node: Index17750
|
||||
Node: Top706
|
||||
Node: Introduction1448
|
||||
Node: Using libffi3084
|
||||
Node: The Basics3570
|
||||
Node: Simple Example6177
|
||||
Node: Types7204
|
||||
Node: Primitive Types7487
|
||||
Node: Structures9307
|
||||
Node: Type Example10167
|
||||
Node: Multiple ABIs11390
|
||||
Node: The Closure API11761
|
||||
Node: Closure Example14705
|
||||
Node: Missing Features16264
|
||||
Node: Index16757
|
||||
|
||||
End Tag Table
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ You must first describe the structure to @samp{libffi} by creating a
|
|||
new @code{ffi_type} object for it.
|
||||
|
||||
@tindex ffi_type
|
||||
@deftp ffi_type
|
||||
@deftp {Data type} ffi_type
|
||||
The @code{ffi_type} has the following members:
|
||||
@table @code
|
||||
@item size_t size
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@set UPDATED 6 February 2013
|
||||
@set UPDATED-MONTH February 2013
|
||||
@set EDITION 3.0.12
|
||||
@set VERSION 3.0.12
|
||||
@set UPDATED 16 March 2013
|
||||
@set UPDATED-MONTH March 2013
|
||||
@set EDITION 3.0.13
|
||||
@set VERSION 3.0.13
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@set UPDATED 6 February 2013
|
||||
@set UPDATED-MONTH February 2013
|
||||
@set EDITION 3.0.12
|
||||
@set VERSION 3.0.12
|
||||
@set UPDATED 16 March 2013
|
||||
@set UPDATED-MONTH March 2013
|
||||
@set EDITION 3.0.13
|
||||
@set VERSION 3.0.13
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ ffi_platforms = {
|
|||
'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'],
|
||||
'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'],
|
||||
'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'],
|
||||
'AARCH64': ['src/aarch64/ffi.c', 'src/aarch64/sysv.S'],
|
||||
'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'],
|
||||
'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'],
|
||||
'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'],
|
||||
|
|
|
|||
0
Modules/_ctypes/libffi/libtool-ldflags
Executable file → Normal file
0
Modules/_ctypes/libffi/libtool-ldflags
Executable file → Normal file
0
Modules/_ctypes/libffi/ltmain.sh
Normal file → Executable file
0
Modules/_ctypes/libffi/ltmain.sh
Normal file → Executable file
0
Modules/_ctypes/libffi/mdate-sh
Normal file → Executable file
0
Modules/_ctypes/libffi/mdate-sh
Normal file → Executable file
0
Modules/_ctypes/libffi/msvcc.sh
Executable file → Normal file
0
Modules/_ctypes/libffi/msvcc.sh
Executable file → Normal file
0
Modules/_ctypes/libffi/src/arm/gentramp.sh
Executable file → Normal file
0
Modules/_ctypes/libffi/src/arm/gentramp.sh
Executable file → Normal file
|
|
@ -189,8 +189,6 @@ emutramp_enabled_check (void)
|
|||
|
||||
#define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \
|
||||
: (emutramp_enabled = emutramp_enabled_check ()))
|
||||
#else
|
||||
#define is_emutramp_enabled() 0
|
||||
#endif /* FFI_MMAP_EXEC_EMUTRAMP_PAX */
|
||||
|
||||
#elif defined (__CYGWIN__) || defined(__INTERIX)
|
||||
|
|
@ -202,6 +200,10 @@ emutramp_enabled_check (void)
|
|||
|
||||
#endif /* !defined(X86_WIN32) && !defined(X86_WIN64) */
|
||||
|
||||
#ifndef FFI_MMAP_EXEC_EMUTRAMP_PAX
|
||||
#define is_emutramp_enabled() 0
|
||||
#endif /* FFI_MMAP_EXEC_EMUTRAMP_PAX */
|
||||
|
||||
/* Declare all functions defined in dlmalloc.c as static. */
|
||||
static void *dlmalloc(size_t);
|
||||
static void dlfree(void*);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
|
||||
If you don't like either of these options, you can define
|
||||
CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything
|
||||
else. And if you are sure that your program using malloc has
|
||||
else. And if if you are sure that your program using malloc has
|
||||
no errors or vulnerabilities, you can define INSECURE to 1,
|
||||
which might (or might not) provide a small performance improvement.
|
||||
|
||||
|
|
@ -607,7 +607,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K
|
|||
declaration needed is the mallinfo struct that is returned (by-copy)
|
||||
by mallinfo(). The malloinfo struct contains a bunch of fields that
|
||||
are not even meaningful in this version of malloc. These fields are
|
||||
instead filled by mallinfo() with other numbers that might be of
|
||||
are instead filled by mallinfo() with other numbers that might be of
|
||||
interest.
|
||||
|
||||
HAVE_USR_INCLUDE_MALLOC_H should be set if you have a
|
||||
|
|
@ -1621,7 +1621,7 @@ static MLOCK_T magic_init_mutex;
|
|||
Each freshly allocated chunk must have both cinuse and pinuse set.
|
||||
That is, each allocated chunk borders either a previously allocated
|
||||
and still in-use chunk, or the base of its memory arena. This is
|
||||
ensured by making all allocations from the `lowest' part of any
|
||||
ensured by making all allocations from the the `lowest' part of any
|
||||
found chunk. Further, no free chunk physically borders another one,
|
||||
so each free chunk is known to be preceded and followed by either
|
||||
inuse chunks or the ends of memory.
|
||||
|
|
@ -1827,12 +1827,12 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|||
of the same size are arranged in a circularly-linked list, with only
|
||||
the oldest chunk (the next to be used, in our FIFO ordering)
|
||||
actually in the tree. (Tree members are distinguished by a non-null
|
||||
parent pointer.) If a chunk with the same size as an existing node
|
||||
parent pointer.) If a chunk with the same size an an existing node
|
||||
is inserted, it is linked off the existing node using pointers that
|
||||
work in the same way as fd/bk pointers of small chunks.
|
||||
|
||||
Each tree contains a power of 2 sized range of chunk sizes (the
|
||||
smallest is 0x100 <= x < 0x180), which is divided in half at each
|
||||
smallest is 0x100 <= x < 0x180), which is is divided in half at each
|
||||
tree level, with the chunks in the smaller half of the range (0x100
|
||||
<= x < 0x140 for the top nose) in the left subtree and the larger
|
||||
half (0x140 <= x < 0x180) in the right subtree. This is, of course,
|
||||
|
|
@ -3442,7 +3442,7 @@ static void* sys_alloc(mstate m, size_t nb) {
|
|||
least-preferred order):
|
||||
1. A call to MORECORE that can normally contiguously extend memory.
|
||||
(disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or
|
||||
main space is mmapped or a previous contiguous call failed)
|
||||
or main space is mmapped or a previous contiguous call failed)
|
||||
2. A call to MMAP new space (disabled if not HAVE_MMAP).
|
||||
Note that under the default settings, if MORECORE is unable to
|
||||
fulfill a request, and HAVE_MMAP is true, then mmap is
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ endian_adjust (void *addr, size_t len)
|
|||
#define ldf_fill(result, addr) \
|
||||
asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));
|
||||
|
||||
/* Return the size of the C type associated with TYPE, which will
|
||||
/* Return the size of the C type associated with with TYPE. Which will
|
||||
be one of the FFI_IA64_TYPE_HFA_* values. */
|
||||
|
||||
static size_t
|
||||
|
|
@ -185,7 +185,7 @@ hfa_element_type (ffi_type *type, int nested)
|
|||
break;
|
||||
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
/* Similarly, except that HFA is true for double extended,
|
||||
/* Similarly, except that that HFA is true for double extended,
|
||||
but not quad precision. Both have sizeof == 16, so tell the
|
||||
difference based on the precision. */
|
||||
if (LDBL_MANT_DIG == 64 && nested)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
sysv.S - Copyright (c) 2012 Alan Hourihane
|
||||
Copyright (c) 1998, 2012 Andreas Schwab
|
||||
Copyright (c) 2008 Red Hat, Inc.
|
||||
Copyright (c) 2012 Thorsten Glaser
|
||||
|
||||
m68k Foreign Function Interface
|
||||
Copyright (c) 2008 Red Hat, Inc.
|
||||
|
||||
m68k Foreign Function Interface
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -169,22 +168,8 @@ retstruct1:
|
|||
|
||||
retstruct2:
|
||||
btst #7,%d2
|
||||
jbeq retsint8
|
||||
move.w %d0,(%a1)
|
||||
jbra epilogue
|
||||
|
||||
retsint8:
|
||||
btst #8,%d2
|
||||
jbeq retsint16
|
||||
extb.l %d0
|
||||
move.l %d0,(%a1)
|
||||
jbra epilogue
|
||||
|
||||
retsint16:
|
||||
btst #9,%d2
|
||||
jbeq noretval
|
||||
ext.l %d0
|
||||
move.l %d0,(%a1)
|
||||
move.w %d0,(%a1)
|
||||
|
||||
noretval:
|
||||
epilogue:
|
||||
|
|
@ -216,10 +201,8 @@ CALLFUNC(ffi_closure_SYSV):
|
|||
lsr.l #1,%d0
|
||||
jne 1f
|
||||
jcc .Lcls_epilogue
|
||||
| CIF_FLAGS_INT
|
||||
move.l -12(%fp),%d0
|
||||
.Lcls_epilogue:
|
||||
| no CIF_FLAGS_*
|
||||
unlk %fp
|
||||
rts
|
||||
1:
|
||||
|
|
@ -227,7 +210,6 @@ CALLFUNC(ffi_closure_SYSV):
|
|||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jcs .Lcls_ret_float
|
||||
| CIF_FLAGS_DINT
|
||||
move.l (%a0)+,%d0
|
||||
move.l (%a0),%d1
|
||||
jra .Lcls_epilogue
|
||||
|
|
@ -242,7 +224,6 @@ CALLFUNC(ffi_closure_SYSV):
|
|||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jcs .Lcls_ret_ldouble
|
||||
| CIF_FLAGS_DOUBLE
|
||||
#if defined(__MC68881__) || defined(__HAVE_68881__)
|
||||
fmove.d (%a0),%fp0
|
||||
#else
|
||||
|
|
@ -261,31 +242,17 @@ CALLFUNC(ffi_closure_SYSV):
|
|||
jra .Lcls_epilogue
|
||||
1:
|
||||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jne .Lcls_ret_struct2
|
||||
jcs .Lcls_ret_struct1
|
||||
| CIF_FLAGS_POINTER
|
||||
move.l (%a0),%a0
|
||||
move.l %a0,%d0
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_struct1:
|
||||
move.b (%a0),%d0
|
||||
jra .Lcls_epilogue
|
||||
1:
|
||||
lsr.l #2,%d0
|
||||
jne 1f
|
||||
jcs .Lcls_ret_sint8
|
||||
| CIF_FLAGS_STRUCT2
|
||||
.Lcls_ret_struct2:
|
||||
move.w (%a0),%d0
|
||||
jra .Lcls_epilogue
|
||||
.Lcls_ret_sint8:
|
||||
move.l (%a0),%d0
|
||||
extb.l %d0
|
||||
jra .Lcls_epilogue
|
||||
1:
|
||||
| CIF_FLAGS_SINT16
|
||||
move.l (%a0),%d0
|
||||
ext.l %d0
|
||||
jra .Lcls_epilogue
|
||||
CFI_ENDPROC()
|
||||
|
||||
.size CALLFUNC(ffi_closure_SYSV),.-CALLFUNC(ffi_closure_SYSV)
|
||||
|
|
|
|||
330
Modules/_ctypes/libffi/src/metag/ffi.c
Normal file
330
Modules/_ctypes/libffi/src/metag/ffi.c
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
ffi.c - Copyright (c) 2013 Imagination Technologies
|
||||
|
||||
Meta Foreign Function Interface
|
||||
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 SIMON POSNJAK 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.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#include <ffi.h>
|
||||
#include <ffi_common.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/*
|
||||
* ffi_prep_args is called by the assembly routine once stack space has been
|
||||
* allocated for the function's arguments
|
||||
*/
|
||||
|
||||
unsigned int ffi_prep_args(char *stack, extended_cif *ecif)
|
||||
{
|
||||
register unsigned int i;
|
||||
register void **p_argv;
|
||||
register char *argp;
|
||||
register ffi_type **p_arg;
|
||||
|
||||
argp = stack;
|
||||
|
||||
/* Store return value */
|
||||
if ( ecif->cif->flags == FFI_TYPE_STRUCT ) {
|
||||
argp -= 4;
|
||||
*(void **) argp = ecif->rvalue;
|
||||
}
|
||||
|
||||
p_argv = ecif->avalue;
|
||||
|
||||
/* point to next location */
|
||||
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; (i != 0); i--, p_arg++, p_argv++)
|
||||
{
|
||||
size_t z;
|
||||
|
||||
/* Move argp to address of argument */
|
||||
z = (*p_arg)->size;
|
||||
argp -= z;
|
||||
|
||||
/* Align if necessary */
|
||||
argp = (char *) ALIGN_DOWN(ALIGN_DOWN(argp, (*p_arg)->alignment), 4);
|
||||
|
||||
if (z < sizeof(int)) {
|
||||
z = sizeof(int);
|
||||
switch ((*p_arg)->type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
*(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
|
||||
break;
|
||||
case FFI_TYPE_UINT8:
|
||||
*(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
|
||||
break;
|
||||
case FFI_TYPE_SINT16:
|
||||
*(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
|
||||
break;
|
||||
case FFI_TYPE_UINT16:
|
||||
*(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
|
||||
case FFI_TYPE_STRUCT:
|
||||
memcpy(argp, *p_argv, (*p_arg)->size);
|
||||
break;
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
} else if ( z == sizeof(int)) {
|
||||
*(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
|
||||
} else {
|
||||
memcpy(argp, *p_argv, z);
|
||||
}
|
||||
}
|
||||
|
||||
/* return the size of the arguments to be passed in registers,
|
||||
padded to an 8 byte boundary to preserve stack alignment */
|
||||
return ALIGN(MIN(stack - argp, 6*4), 8);
|
||||
}
|
||||
|
||||
/* Perform machine dependent cif processing */
|
||||
ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
{
|
||||
ffi_type **ptr;
|
||||
unsigned i, bytes = 0;
|
||||
|
||||
for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) {
|
||||
if ((*ptr)->size == 0)
|
||||
return FFI_BAD_TYPEDEF;
|
||||
|
||||
/* Perform a sanity check on the argument type, do this
|
||||
check after the initialization. */
|
||||
FFI_ASSERT_VALID_TYPE(*ptr);
|
||||
|
||||
/* Add any padding if necessary */
|
||||
if (((*ptr)->alignment - 1) & bytes)
|
||||
bytes = ALIGN(bytes, (*ptr)->alignment);
|
||||
|
||||
bytes += ALIGN((*ptr)->size, 4);
|
||||
}
|
||||
|
||||
/* Ensure arg space is aligned to an 8-byte boundary */
|
||||
bytes = ALIGN(bytes, 8);
|
||||
|
||||
/* Make space for the return structure pointer */
|
||||
if (cif->rtype->type == FFI_TYPE_STRUCT) {
|
||||
bytes += sizeof(void*);
|
||||
|
||||
/* Ensure stack is aligned to an 8-byte boundary */
|
||||
bytes = ALIGN(bytes, 8);
|
||||
}
|
||||
|
||||
cif->bytes = bytes;
|
||||
|
||||
/* Set the return type flag */
|
||||
switch (cif->rtype->type) {
|
||||
case FFI_TYPE_VOID:
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
cif->flags = (unsigned) cif->rtype->type;
|
||||
break;
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
cif->flags = (unsigned) FFI_TYPE_SINT64;
|
||||
break;
|
||||
case FFI_TYPE_STRUCT:
|
||||
/* Meta can store return values which are <= 64 bits */
|
||||
if (cif->rtype->size <= 4)
|
||||
/* Returned to D0Re0 as 32-bit value */
|
||||
cif->flags = (unsigned)FFI_TYPE_INT;
|
||||
else if ((cif->rtype->size > 4) && (cif->rtype->size <= 8))
|
||||
/* Returned valued is stored to D1Re0|R0Re0 */
|
||||
cif->flags = (unsigned)FFI_TYPE_DOUBLE;
|
||||
else
|
||||
/* value stored in memory */
|
||||
cif->flags = (unsigned)FFI_TYPE_STRUCT;
|
||||
break;
|
||||
default:
|
||||
cif->flags = (unsigned)FFI_TYPE_INT;
|
||||
break;
|
||||
}
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
extern void ffi_call_SYSV(void (*fn)(void), extended_cif *, unsigned, unsigned, double *);
|
||||
|
||||
/*
|
||||
* Exported in API. Entry point
|
||||
* cif -> ffi_cif object
|
||||
* fn -> function pointer
|
||||
* rvalue -> pointer to return value
|
||||
* avalue -> vector of void * pointers pointing to memory locations holding the
|
||||
* arguments
|
||||
*/
|
||||
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||
{
|
||||
extended_cif ecif;
|
||||
|
||||
int small_struct = (((cif->flags == FFI_TYPE_INT) || (cif->flags == FFI_TYPE_DOUBLE)) && (cif->rtype->type == FFI_TYPE_STRUCT));
|
||||
ecif.cif = cif;
|
||||
ecif.avalue = avalue;
|
||||
|
||||
double temp;
|
||||
|
||||
/*
|
||||
* If the return value is a struct and we don't have a return value address
|
||||
* then we need to make one
|
||||
*/
|
||||
|
||||
if ((rvalue == NULL ) && (cif->flags == FFI_TYPE_STRUCT))
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
else if (small_struct)
|
||||
ecif.rvalue = &temp;
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
|
||||
switch (cif->abi) {
|
||||
case FFI_SYSV:
|
||||
ffi_call_SYSV(fn, &ecif, cif->bytes, cif->flags, ecif.rvalue);
|
||||
break;
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (small_struct)
|
||||
memcpy (rvalue, &temp, cif->rtype->size);
|
||||
}
|
||||
|
||||
/* private members */
|
||||
|
||||
static void ffi_prep_incoming_args_SYSV (char *, void **, void **,
|
||||
ffi_cif*, float *);
|
||||
|
||||
void ffi_closure_SYSV (ffi_closure *);
|
||||
|
||||
/* Do NOT change that without changing the FFI_TRAMPOLINE_SIZE */
|
||||
extern unsigned int ffi_metag_trampoline[10]; /* 10 instructions */
|
||||
|
||||
/* end of private members */
|
||||
|
||||
/*
|
||||
* __tramp: trampoline memory location
|
||||
* __fun: assembly routine
|
||||
* __ctx: memory location for wrapper
|
||||
*
|
||||
* At this point, tramp[0] == __ctx !
|
||||
*/
|
||||
void ffi_init_trampoline(unsigned char *__tramp, unsigned int __fun, unsigned int __ctx) {
|
||||
memcpy (__tramp, ffi_metag_trampoline, sizeof(ffi_metag_trampoline));
|
||||
*(unsigned int*) &__tramp[40] = __ctx;
|
||||
*(unsigned int*) &__tramp[44] = __fun;
|
||||
/* This will flush the instruction cache */
|
||||
__builtin_meta2_cachewd(&__tramp[0], 1);
|
||||
__builtin_meta2_cachewd(&__tramp[47], 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* the cif must already be prepared */
|
||||
|
||||
ffi_status
|
||||
ffi_prep_closure_loc (ffi_closure *closure,
|
||||
ffi_cif* cif,
|
||||
void (*fun)(ffi_cif*,void*,void**,void*),
|
||||
void *user_data,
|
||||
void *codeloc)
|
||||
{
|
||||
void (*closure_func)(ffi_closure*) = NULL;
|
||||
|
||||
if (cif->abi == FFI_SYSV)
|
||||
closure_func = &ffi_closure_SYSV;
|
||||
else
|
||||
return FFI_BAD_ABI;
|
||||
|
||||
ffi_init_trampoline(
|
||||
(unsigned char*)&closure->tramp[0],
|
||||
(unsigned int)closure_func,
|
||||
(unsigned int)codeloc);
|
||||
|
||||
closure->cif = cif;
|
||||
closure->user_data = user_data;
|
||||
closure->fun = fun;
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
|
||||
/* This function is jumped to by the trampoline */
|
||||
unsigned int ffi_closure_SYSV_inner (closure, respp, args, vfp_args)
|
||||
ffi_closure *closure;
|
||||
void **respp;
|
||||
void *args;
|
||||
void *vfp_args;
|
||||
{
|
||||
ffi_cif *cif;
|
||||
void **arg_area;
|
||||
|
||||
cif = closure->cif;
|
||||
arg_area = (void**) alloca (cif->nargs * sizeof (void*));
|
||||
|
||||
/*
|
||||
* This call will initialize ARG_AREA, such that each
|
||||
* element in that array points to the corresponding
|
||||
* value on the stack; and if the function returns
|
||||
* a structure, it will re-set RESP to point to the
|
||||
* structure return address.
|
||||
*/
|
||||
ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif, vfp_args);
|
||||
|
||||
(closure->fun) ( cif, *respp, arg_area, closure->user_data);
|
||||
|
||||
return cif->flags;
|
||||
}
|
||||
|
||||
static void ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
|
||||
void **avalue, ffi_cif *cif,
|
||||
float *vfp_stack)
|
||||
{
|
||||
register unsigned int i;
|
||||
register void **p_argv;
|
||||
register char *argp;
|
||||
register ffi_type **p_arg;
|
||||
|
||||
/* stack points to original arguments */
|
||||
argp = stack;
|
||||
|
||||
/* Store return value */
|
||||
if ( cif->flags == FFI_TYPE_STRUCT ) {
|
||||
argp -= 4;
|
||||
*rvalue = *(void **) argp;
|
||||
}
|
||||
|
||||
p_argv = avalue;
|
||||
|
||||
for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) {
|
||||
size_t z;
|
||||
size_t alignment;
|
||||
|
||||
alignment = (*p_arg)->alignment;
|
||||
if (alignment < 4)
|
||||
alignment = 4;
|
||||
if ((alignment - 1) & (unsigned)argp)
|
||||
argp = (char *) ALIGN(argp, alignment);
|
||||
|
||||
z = (*p_arg)->size;
|
||||
*p_argv = (void*) argp;
|
||||
p_argv++;
|
||||
argp -= z;
|
||||
}
|
||||
return;
|
||||
}
|
||||
53
Modules/_ctypes/libffi/src/metag/ffitarget.h
Normal file
53
Modules/_ctypes/libffi/src/metag/ffitarget.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/* -----------------------------------------------------------------*-C-*-
|
||||
ffitarget.h - Copyright (c) 2013 Imagination Technologies Ltd.
|
||||
Target configuration macros for Meta
|
||||
|
||||
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.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_TARGET_H
|
||||
#define LIBFFI_TARGET_H
|
||||
|
||||
#ifndef LIBFFI_H
|
||||
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
|
||||
#endif
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
typedef unsigned long ffi_arg;
|
||||
typedef signed long ffi_sarg;
|
||||
|
||||
typedef enum ffi_abi {
|
||||
FFI_FIRST_ABI = 0,
|
||||
FFI_SYSV,
|
||||
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1,
|
||||
} ffi_abi;
|
||||
#endif
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#define FFI_CLOSURES 1
|
||||
#define FFI_TRAMPOLINE_SIZE 48
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
#endif
|
||||
|
||||
311
Modules/_ctypes/libffi/src/metag/sysv.S
Normal file
311
Modules/_ctypes/libffi/src/metag/sysv.S
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
sysv.S - Copyright (c) 2013 Imagination Technologies Ltd.
|
||||
|
||||
Meta Foreign Function Interface
|
||||
|
||||
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.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#define LIBFFI_ASM
|
||||
#include <fficonfig.h>
|
||||
#include <ffi.h>
|
||||
#ifdef HAVE_MACHINE_ASM_H
|
||||
#include <machine/asm.h>
|
||||
#else
|
||||
#ifdef __USER_LABEL_PREFIX__
|
||||
#define CONCAT1(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a ## b
|
||||
|
||||
/* Use the right prefix for global labels. */
|
||||
#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
|
||||
#else
|
||||
#define CNAME(x) x
|
||||
#endif
|
||||
#define ENTRY(x) .globl CNAME(x); .type CNAME(x), %function; CNAME(x):
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
#define LSYM(x) .x
|
||||
#else
|
||||
#define LSYM(x) x
|
||||
#endif
|
||||
|
||||
.macro call_reg x=
|
||||
.text
|
||||
.balign 4
|
||||
mov D1RtP, \x
|
||||
swap D1RtP, PC
|
||||
.endm
|
||||
|
||||
! Save register arguments
|
||||
.macro SAVE_ARGS
|
||||
.text
|
||||
.balign 4
|
||||
setl [A0StP++], D0Ar6, D1Ar5
|
||||
setl [A0StP++], D0Ar4, D1Ar3
|
||||
setl [A0StP++], D0Ar2, D1Ar1
|
||||
.endm
|
||||
|
||||
! Save retrun, frame pointer and other regs
|
||||
.macro SAVE_REGS regs=
|
||||
.text
|
||||
.balign 4
|
||||
setl [A0StP++], D0FrT, D1RtP
|
||||
! Needs to be a pair of regs
|
||||
.ifnc "\regs",""
|
||||
setl [A0StP++], \regs
|
||||
.endif
|
||||
.endm
|
||||
|
||||
! Declare a global function
|
||||
.macro METAG_FUNC_START name
|
||||
.text
|
||||
.balign 4
|
||||
ENTRY(\name)
|
||||
.endm
|
||||
|
||||
! Return registers from the stack. Reverse SAVE_REGS operation
|
||||
.macro RET_REGS regs=, cond=
|
||||
.ifnc "\regs", ""
|
||||
getl \regs, [--A0StP]
|
||||
.endif
|
||||
getl D0FrT, D1RtP, [--A0StP]
|
||||
.endm
|
||||
|
||||
! Return arguments
|
||||
.macro RET_ARGS
|
||||
getl D0Ar2, D1Ar1, [--A0StP]
|
||||
getl D0Ar4, D1Ar3, [--A0StP]
|
||||
getl D0Ar6, D1Ar5, [--A0StP]
|
||||
.endm
|
||||
|
||||
|
||||
! D1Ar1: fn
|
||||
! D0Ar2: &ecif
|
||||
! D1Ar3: cif->bytes
|
||||
! D0Ar4: fig->flags
|
||||
! D1Ar5: ecif.rvalue
|
||||
|
||||
! This assumes we are using GNU as
|
||||
METAG_FUNC_START ffi_call_SYSV
|
||||
! Save argument registers
|
||||
|
||||
SAVE_ARGS
|
||||
|
||||
! new frame
|
||||
mov D0FrT, A0FrP
|
||||
add A0FrP, A0StP, #0
|
||||
|
||||
! Preserve the old frame pointer
|
||||
SAVE_REGS "D1.5, D0.5"
|
||||
|
||||
! Make room for new args. cifs->bytes is the total space for input
|
||||
! and return arguments
|
||||
|
||||
add A0StP, A0StP, D1Ar3
|
||||
|
||||
! Preserve cifs->bytes & fn
|
||||
mov D0.5, D1Ar3
|
||||
mov D1.5, D1Ar1
|
||||
|
||||
! Place all of the ffi_prep_args in position
|
||||
mov D1Ar1, A0StP
|
||||
|
||||
! Call ffi_prep_args(stack, &ecif)
|
||||
#ifdef __PIC__
|
||||
callr D1RtP, CNAME(ffi_prep_args@PLT)
|
||||
#else
|
||||
callr D1RtP, CNAME(ffi_prep_args)
|
||||
#endif
|
||||
|
||||
! Restore fn pointer
|
||||
|
||||
! The foreign stack should look like this
|
||||
! XXXXX XXXXXX <--- stack pointer
|
||||
! FnArgN rvalue
|
||||
! FnArgN+2 FnArgN+1
|
||||
! FnArgN+4 FnArgN+3
|
||||
! ....
|
||||
!
|
||||
|
||||
! A0StP now points to the first (or return) argument + 4
|
||||
|
||||
! Preserve cif->bytes
|
||||
getl D0Ar2, D1Ar1, [--A0StP]
|
||||
getl D0Ar4, D1Ar3, [--A0StP]
|
||||
getl D0Ar6, D1Ar5, [--A0StP]
|
||||
|
||||
! Place A0StP to the first argument again
|
||||
add A0StP, A0StP, #24 ! That's because we loaded 6 regs x 4 byte each
|
||||
|
||||
! A0FrP points to the initial stack without the reserved space for the
|
||||
! cifs->bytes, whilst A0StP points to the stack after the space allocation
|
||||
|
||||
! fn was the first argument of ffi_call_SYSV.
|
||||
! The stack at this point looks like this:
|
||||
!
|
||||
! A0StP(on entry to _SYSV) -> Arg6 Arg5 | low
|
||||
! Arg4 Arg3 |
|
||||
! Arg2 Arg1 |
|
||||
! A0FrP ----> D0FrtP D1RtP |
|
||||
! D1.5 D0.5 |
|
||||
! A0StP(bf prep_args) -> FnArgn FnArgn-1 |
|
||||
! FnArgn-2FnArgn-3 |
|
||||
! ................ | <= cifs->bytes
|
||||
! FnArg4 FnArg3 |
|
||||
! A0StP (prv_A0StP+cifs->bytes) FnArg2 FnArg1 | high
|
||||
!
|
||||
! fn was in Arg1 so it's located in in A0FrP+#-0xC
|
||||
!
|
||||
|
||||
! D0Re0 contains the size of arguments stored in registers
|
||||
sub A0StP, A0StP, D0Re0
|
||||
|
||||
! Arg1 is the function pointer for the foreign call. This has been
|
||||
! preserved in D1.5
|
||||
|
||||
! Time to call (fn). Arguments should be like this:
|
||||
! Arg1-Arg6 are loaded to regs
|
||||
! The rest of the arguments are stored in stack pointed by A0StP
|
||||
|
||||
call_reg D1.5
|
||||
|
||||
! Reset stack.
|
||||
|
||||
mov A0StP, A0FrP
|
||||
|
||||
! Load Arg1 with the pointer to storage for the return type
|
||||
! This was stored in Arg5
|
||||
|
||||
getd D1Ar1, [A0FrP+#-20]
|
||||
|
||||
! Load D0Ar2 with the return type code. This was stored in Arg4 (flags)
|
||||
|
||||
getd D0Ar2, [A0FrP+#-16]
|
||||
|
||||
! We are ready to start processing the return value
|
||||
! D0Re0 (and D1Re0) hold the return value
|
||||
|
||||
! If the return value is NULL, assume no return value
|
||||
cmp D1Ar1, #0
|
||||
beq LSYM(Lepilogue)
|
||||
|
||||
! return INT
|
||||
cmp D0Ar2, #FFI_TYPE_INT
|
||||
! Sadly, there is no setd{cc} instruction so we need to workaround that
|
||||
bne .INT64
|
||||
setd [D1Ar1], D0Re0
|
||||
b LSYM(Lepilogue)
|
||||
|
||||
! return INT64
|
||||
.INT64:
|
||||
cmp D0Ar2, #FFI_TYPE_SINT64
|
||||
setleq [D1Ar1], D0Re0, D1Re0
|
||||
|
||||
! return DOUBLE
|
||||
cmp D0Ar2, #FFI_TYPE_DOUBLE
|
||||
setl [D1AR1++], D0Re0, D1Re0
|
||||
|
||||
LSYM(Lepilogue):
|
||||
! At this point, the stack pointer points right after the argument
|
||||
! saved area. We need to restore 4 regs, therefore we need to move
|
||||
! 16 bytes ahead.
|
||||
add A0StP, A0StP, #16
|
||||
RET_REGS "D1.5, D0.5"
|
||||
RET_ARGS
|
||||
getd D0Re0, [A0StP]
|
||||
mov A0FrP, D0FrT
|
||||
swap D1RtP, PC
|
||||
|
||||
.ffi_call_SYSV_end:
|
||||
.size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
|
||||
|
||||
|
||||
/*
|
||||
(called by ffi_metag_trampoline)
|
||||
void ffi_closure_SYSV (ffi_closure*)
|
||||
|
||||
(called by ffi_closure_SYSV)
|
||||
unsigned int FFI_HIDDEN
|
||||
ffi_closure_SYSV_inner (closure,respp, args)
|
||||
ffi_closure *closure;
|
||||
void **respp;
|
||||
void *args;
|
||||
*/
|
||||
|
||||
METAG_FUNC_START ffi_closure_SYSV
|
||||
! We assume that D1Ar1 holds the address of the
|
||||
! ffi_closure struct. We will use that to fetch the
|
||||
! arguments. The stack pointer points to an empty space
|
||||
! and it is ready to store more data.
|
||||
|
||||
! D1Ar1 is ready
|
||||
! Allocate stack space for return value
|
||||
add A0StP, A0StP, #8
|
||||
! Store it to D0Ar2
|
||||
sub D0Ar2, A0StP, #8
|
||||
|
||||
sub D1Ar3, A0FrP, #4
|
||||
|
||||
! D1Ar3 contains the address of the original D1Ar1 argument
|
||||
! We need to subtract #4 later on
|
||||
|
||||
! Preverve D0Ar2
|
||||
mov D0.5, D0Ar2
|
||||
|
||||
#ifdef __PIC__
|
||||
callr D1RtP, CNAME(ffi_closure_SYSV_inner@PLT)
|
||||
#else
|
||||
callr D1RtP, CNAME(ffi_closure_SYSV_inner)
|
||||
#endif
|
||||
|
||||
! Check the return value and store it to D0.5
|
||||
cmp D0Re0, #FFI_TYPE_INT
|
||||
beq .Lretint
|
||||
cmp D0Re0, #FFI_TYPE_DOUBLE
|
||||
beq .Lretdouble
|
||||
.Lclosure_epilogue:
|
||||
sub A0StP, A0StP, #8
|
||||
RET_REGS "D1.5, D0.5"
|
||||
RET_ARGS
|
||||
swap D1RtP, PC
|
||||
|
||||
.Lretint:
|
||||
setd [D0.5], D0Re0
|
||||
b .Lclosure_epilogue
|
||||
.Lretdouble:
|
||||
setl [D0.5++], D0Re0, D1Re0
|
||||
b .Lclosure_epilogue
|
||||
.ffi_closure_SYSV_end:
|
||||
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
|
||||
|
||||
ENTRY(ffi_metag_trampoline)
|
||||
SAVE_ARGS
|
||||
! New frame
|
||||
mov A0FrP, A0StP
|
||||
SAVE_REGS "D1.5, D0.5"
|
||||
mov D0.5, PC
|
||||
! Load D1Ar1 the value of ffi_metag_trampoline
|
||||
getd D1Ar1, [D0.5 + #8]
|
||||
! Jump to ffi_closure_SYSV
|
||||
getd PC, [D0.5 + #12]
|
||||
|
|
@ -670,16 +670,9 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
|||
if (cif->abi != FFI_O32 && cif->abi != FFI_O32_SOFT_FLOAT)
|
||||
return FFI_BAD_ABI;
|
||||
fn = ffi_closure_O32;
|
||||
#else
|
||||
#if _MIPS_SIM ==_ABIN32
|
||||
if (cif->abi != FFI_N32
|
||||
&& cif->abi != FFI_N32_SOFT_FLOAT)
|
||||
#else /* FFI_MIPS_N32 */
|
||||
if (cif->abi != FFI_N32 && cif->abi != FFI_N64)
|
||||
return FFI_BAD_ABI;
|
||||
#else
|
||||
if (cif->abi != FFI_N64
|
||||
&& cif->abi != FFI_N64_SOFT_FLOAT)
|
||||
return FFI_BAD_ABI;
|
||||
#endif
|
||||
fn = ffi_closure_N32;
|
||||
#endif /* FFI_MIPS_O32 */
|
||||
|
||||
|
|
|
|||
|
|
@ -48,11 +48,6 @@ enum {
|
|||
|
||||
FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */
|
||||
|
||||
FLAG_SYSV_SMST_R4 = 1 << (31-26), /* use r4 for FFI_SYSV 8 byte
|
||||
structs. */
|
||||
FLAG_SYSV_SMST_R3 = 1 << (31-25), /* use r3 for FFI_SYSV 4 byte
|
||||
structs. */
|
||||
|
||||
FLAG_ARG_NEEDS_COPY = 1 << (31- 7),
|
||||
#ifndef __NO_FPRS__
|
||||
FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */
|
||||
|
|
@ -372,12 +367,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
|
|||
/* Check that we didn't overrun the stack... */
|
||||
FFI_ASSERT (copy_space.c >= next_arg.c);
|
||||
FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS);
|
||||
/* The assert below is testing that the number of integer arguments agrees
|
||||
with the number found in ffi_prep_cif_machdep(). However, intarg_count
|
||||
is incremeneted whenever we place an FP arg on the stack, so account for
|
||||
that before our assert test. */
|
||||
if (fparg_count > NUM_FPR_ARG_REGISTERS)
|
||||
intarg_count -= fparg_count - NUM_FPR_ARG_REGISTERS;
|
||||
#ifndef __NO_FPRS__
|
||||
FFI_ASSERT (fpr_base.u
|
||||
<= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS);
|
||||
|
|
@ -675,11 +664,9 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
|||
switch (type)
|
||||
{
|
||||
#ifndef __NO_FPRS__
|
||||
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
|
||||
case FFI_TYPE_LONGDOUBLE:
|
||||
flags |= FLAG_RETURNS_128BITS;
|
||||
/* Fall through. */
|
||||
#endif
|
||||
case FFI_TYPE_DOUBLE:
|
||||
flags |= FLAG_RETURNS_64BITS;
|
||||
/* Fall through. */
|
||||
|
|
@ -697,35 +684,18 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
|||
break;
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
if (cif->abi == FFI_SYSV)
|
||||
{
|
||||
/* The final SYSV ABI says that structures smaller or equal 8 bytes
|
||||
are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them
|
||||
in memory. */
|
||||
|
||||
/* Treat structs with size <= 8 bytes. */
|
||||
if (size <= 8)
|
||||
{
|
||||
flags |= FLAG_RETURNS_SMST;
|
||||
/* These structs are returned in r3. We pack the type and the
|
||||
precalculated shift value (needed in the sysv.S) into flags.
|
||||
The same applies for the structs returned in r3/r4. */
|
||||
if (size <= 4)
|
||||
{
|
||||
flags |= FLAG_SYSV_SMST_R3;
|
||||
flags |= 8 * (4 - size) << 8;
|
||||
break;
|
||||
}
|
||||
/* These structs are returned in r3 and r4. See above. */
|
||||
if (size <= 8)
|
||||
{
|
||||
flags |= FLAG_SYSV_SMST_R3 | FLAG_SYSV_SMST_R4;
|
||||
flags |= 8 * (8 - size) << 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The final SYSV ABI says that structures smaller or equal 8 bytes
|
||||
* are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them
|
||||
* in memory.
|
||||
*
|
||||
* NOTE: The assembly code can safely assume that it just needs to
|
||||
* store both r3 and r4 into a 8-byte word-aligned buffer, as
|
||||
* we allocate a temporary buffer in ffi_call() if this flag is
|
||||
* set.
|
||||
*/
|
||||
if (cif->abi == FFI_SYSV && size <= 8)
|
||||
flags |= FLAG_RETURNS_SMST;
|
||||
intarg_count++;
|
||||
flags |= FLAG_RETVAL_REFERENCE;
|
||||
/* Fall through. */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
ffi.c - Copyright (c) 2011, 2013 Anthony Green
|
||||
ffi.c - Copyright (c) 2011 Anthony Green
|
||||
Copyright (c) 1996, 2003-2004, 2007-2008 Red Hat, Inc.
|
||||
|
||||
SPARC Foreign Function Interface
|
||||
|
|
@ -376,10 +376,6 @@ extern int ffi_call_v8(void *, extended_cif *, unsigned,
|
|||
unsigned, unsigned *, void (*fn)(void));
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
void ffi_flush_icache (void *, size_t);
|
||||
#endif
|
||||
|
||||
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||
{
|
||||
extended_cif ecif;
|
||||
|
|
@ -421,7 +417,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
|||
/* behind "call", so we alloc some executable space for it. */
|
||||
/* l7 is used, we need to make sure v8.S doesn't use %l7. */
|
||||
unsigned int *call_struct = NULL;
|
||||
ffi_closure_alloc(32, (void **)&call_struct);
|
||||
ffi_closure_alloc(32, &call_struct);
|
||||
if (call_struct)
|
||||
{
|
||||
unsigned long f = (unsigned long)fn;
|
||||
|
|
@ -436,14 +432,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
|||
call_struct[5] = 0x01000000; /* nop */
|
||||
call_struct[6] = 0x81c7e008; /* ret */
|
||||
call_struct[7] = 0xbe100017; /* mov %l7, %i7 */
|
||||
#ifdef __GNUC__
|
||||
asm volatile ("iflush %0; iflush %0+8; iflush %0+16; iflush %0+24" : :
|
||||
"r" (call_struct) : "memory");
|
||||
/* SPARC v8 requires 5 instructions for flush to be visible */
|
||||
asm volatile ("nop; nop; nop; nop; nop");
|
||||
#else
|
||||
ffi_flush_icache (call_struct, 32);
|
||||
#endif
|
||||
ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes,
|
||||
cif->flags, rvalue, call_struct);
|
||||
ffi_closure_free(call_struct);
|
||||
|
|
@ -521,7 +513,6 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
|||
closure->user_data = user_data;
|
||||
|
||||
/* Flush the Icache. closure is 8 bytes aligned. */
|
||||
#ifdef __GNUC__
|
||||
#ifdef SPARC64
|
||||
asm volatile ("flush %0; flush %0+8" : : "r" (closure) : "memory");
|
||||
#else
|
||||
|
|
@ -529,9 +520,6 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
|||
/* SPARC v8 requires 5 instructions for flush to be visible */
|
||||
asm volatile ("nop; nop; nop; nop; nop");
|
||||
#endif
|
||||
#else
|
||||
ffi_flush_icache (closure, 16);
|
||||
#endif
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,9 +315,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
|||
cif->bytes += 4 * sizeof(ffi_arg);
|
||||
#endif
|
||||
|
||||
#ifdef X86_DARWIN
|
||||
cif->bytes = (cif->bytes + 15) & ~0xF;
|
||||
#endif
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
ffi64.c - Copyright (c) 2013 The Written Word, Inc.
|
||||
Copyright (c) 2011 Anthony Green
|
||||
ffi64.c - Copyright (c) 20011 Anthony Green
|
||||
Copyright (c) 2008, 2010 Red Hat, Inc.
|
||||
Copyright (c) 2002, 2007 Bo Thorsen <bo@suse.de>
|
||||
|
||||
|
|
@ -38,29 +37,17 @@
|
|||
#define MAX_GPR_REGS 6
|
||||
#define MAX_SSE_REGS 8
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
#ifdef __INTEL_COMPILER
|
||||
#define UINT128 __m128
|
||||
#else
|
||||
#if defined(__SUNPRO_C)
|
||||
#include <sunmedia_types.h>
|
||||
#define UINT128 __m128i
|
||||
#else
|
||||
#define UINT128 __int128_t
|
||||
#endif
|
||||
#endif
|
||||
|
||||
union big_int_union
|
||||
{
|
||||
UINT32 i32;
|
||||
UINT64 i64;
|
||||
UINT128 i128;
|
||||
};
|
||||
|
||||
struct register_args
|
||||
{
|
||||
/* Registers for argument passing. */
|
||||
UINT64 gpr[MAX_GPR_REGS];
|
||||
union big_int_union sse[MAX_SSE_REGS];
|
||||
UINT128 sse[MAX_SSE_REGS];
|
||||
};
|
||||
|
||||
extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
|
||||
|
|
@ -484,33 +471,16 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
|||
{
|
||||
case X86_64_INTEGER_CLASS:
|
||||
case X86_64_INTEGERSI_CLASS:
|
||||
/* Sign-extend integer arguments passed in general
|
||||
purpose registers, to cope with the fact that
|
||||
LLVM incorrectly assumes that this will be done
|
||||
(the x86-64 PS ABI does not specify this). */
|
||||
switch (arg_types[i]->type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
*(SINT64 *)®_args->gpr[gprcount] = (SINT64) *((SINT8 *) a);
|
||||
break;
|
||||
case FFI_TYPE_SINT16:
|
||||
*(SINT64 *)®_args->gpr[gprcount] = (SINT64) *((SINT16 *) a);
|
||||
break;
|
||||
case FFI_TYPE_SINT32:
|
||||
*(SINT64 *)®_args->gpr[gprcount] = (SINT64) *((SINT32 *) a);
|
||||
break;
|
||||
default:
|
||||
reg_args->gpr[gprcount] = 0;
|
||||
memcpy (®_args->gpr[gprcount], a, size < 8 ? size : 8);
|
||||
}
|
||||
reg_args->gpr[gprcount] = 0;
|
||||
memcpy (®_args->gpr[gprcount], a, size < 8 ? size : 8);
|
||||
gprcount++;
|
||||
break;
|
||||
case X86_64_SSE_CLASS:
|
||||
case X86_64_SSEDF_CLASS:
|
||||
reg_args->sse[ssecount++].i64 = *(UINT64 *) a;
|
||||
reg_args->sse[ssecount++] = *(UINT64 *) a;
|
||||
break;
|
||||
case X86_64_SSESF_CLASS:
|
||||
reg_args->sse[ssecount++].i32 = *(UINT32 *) a;
|
||||
reg_args->sse[ssecount++] = *(UINT32 *) a;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
|
|
|
|||
|
|
@ -61,9 +61,8 @@ typedef unsigned long long ffi_arg;
|
|||
typedef long long ffi_sarg;
|
||||
#endif
|
||||
#else
|
||||
#if defined __x86_64__ && defined __ILP32__
|
||||
#if defined __x86_64__ && !defined __LP64__
|
||||
#define FFI_SIZEOF_ARG 8
|
||||
#define FFI_SIZEOF_JAVA_RAW 4
|
||||
typedef unsigned long long ffi_arg;
|
||||
typedef long long ffi_sarg;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
sysv.S - Copyright (c) 2013 The Written Word, Inc.
|
||||
- Copyright (c) 1996,1998,2001-2003,2005,2008,2010 Red Hat, Inc.
|
||||
sysv.S - Copyright (c) 1996, 1998, 2001-2003, 2005, 2008, 2010 Red Hat, Inc.
|
||||
|
||||
X86 Foreign Function Interface
|
||||
|
||||
|
|
@ -182,19 +181,9 @@ ffi_closure_SYSV:
|
|||
leal -24(%ebp), %edx
|
||||
movl %edx, -12(%ebp) /* resp */
|
||||
leal 8(%ebp), %edx
|
||||
#ifdef __SUNPRO_C
|
||||
/* The SUNPRO compiler doesn't support GCC's regparm function
|
||||
attribute, so we have to pass all three arguments to
|
||||
ffi_closure_SYSV_inner on the stack. */
|
||||
movl %edx, 8(%esp) /* args = __builtin_dwarf_cfa () */
|
||||
leal -12(%ebp), %edx
|
||||
movl %edx, 4(%esp) /* &resp */
|
||||
movl %eax, (%esp) /* closure */
|
||||
#else
|
||||
movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */
|
||||
leal -12(%ebp), %edx
|
||||
movl %edx, (%esp) /* &resp */
|
||||
#endif
|
||||
#if defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE || !defined __PIC__
|
||||
call ffi_closure_SYSV_inner
|
||||
#else
|
||||
|
|
@ -339,9 +328,6 @@ ffi_closure_raw_SYSV:
|
|||
.size ffi_closure_raw_SYSV, .-ffi_closure_raw_SYSV
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__
|
||||
/* Only emit dwarf unwind info when building with GNU toolchain. */
|
||||
|
||||
#if defined __PIC__
|
||||
# if defined __sun__ && defined __svr4__
|
||||
/* 32-bit Solaris 2/x86 uses datarel encoding for PIC. GNU ld before 2.22
|
||||
|
|
@ -473,7 +459,6 @@ ffi_closure_raw_SYSV:
|
|||
.align 4
|
||||
.LEFDE3:
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* ifndef __x86_64__ */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* -----------------------------------------------------------------------
|
||||
unix64.S - Copyright (c) 2013 The Written Word, Inc.
|
||||
- Copyright (c) 2008 Red Hat, Inc
|
||||
- Copyright (c) 2002 Bo Thorsen <bo@suse.de>
|
||||
unix64.S - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
|
||||
Copyright (c) 2008 Red Hat, Inc
|
||||
|
||||
x86-64 Foreign Function Interface
|
||||
|
||||
|
|
@ -325,9 +324,6 @@ ffi_closure_unix64:
|
|||
.LUW9:
|
||||
.size ffi_closure_unix64,.-ffi_closure_unix64
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* Only emit DWARF unwind info when building with the GNU toolchain. */
|
||||
|
||||
#ifdef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
|
||||
.section .eh_frame,"a",@unwind
|
||||
#else
|
||||
|
|
@ -423,8 +419,6 @@ ffi_closure_unix64:
|
|||
.align 8
|
||||
.LEFDE3:
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#if defined __ELF__ && defined __linux__
|
||||
|
|
|
|||
1
Modules/_ctypes/libffi/stamp-h.in
Normal file
1
Modules/_ctypes/libffi/stamp-h.in
Normal file
|
|
@ -0,0 +1 @@
|
|||
timestamp
|
||||
|
|
@ -13,82 +13,73 @@ RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
|
|||
|
||||
AM_RUNTESTFLAGS =
|
||||
|
||||
EXTRA_DEJAGNU_SITE_CONFIG=../local.exp
|
||||
|
||||
CLEANFILES = *.exe core* *.log *.sum
|
||||
|
||||
EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \
|
||||
libffi.call/cls_align_longdouble_split.c \
|
||||
libffi.call/closure_loc_fn0.c libffi.call/cls_schar.c \
|
||||
libffi.call/closure_fn1.c libffi.call/many2_win32.c \
|
||||
libffi.call/return_ul.c libffi.call/cls_align_double.c \
|
||||
libffi.call/return_fl2.c libffi.call/cls_1_1byte.c \
|
||||
libffi.call/cls_64byte.c libffi.call/nested_struct7.c \
|
||||
libffi.call/cls_align_sint32.c libffi.call/nested_struct2.c \
|
||||
libffi.call/ffitest.h libffi.call/nested_struct4.c \
|
||||
libffi.call/cls_multi_ushort.c libffi.call/struct3.c \
|
||||
libffi.call/cls_3byte1.c libffi.call/cls_16byte.c \
|
||||
libffi.call/struct8.c libffi.call/nested_struct8.c \
|
||||
libffi.call/cls_multi_sshort.c libffi.call/cls_3byte2.c \
|
||||
libffi.call/fastthis2_win32.c libffi.call/cls_pointer.c \
|
||||
libffi.call/err_bad_typedef.c libffi.call/cls_4_1byte.c \
|
||||
libffi.call/cls_9byte2.c libffi.call/cls_multi_schar.c \
|
||||
libffi.call/stret_medium2.c libffi.call/cls_5_1_byte.c \
|
||||
libffi.call/call.exp libffi.call/cls_double.c \
|
||||
libffi.call/cls_align_sint16.c libffi.call/cls_uint.c \
|
||||
libffi.call/return_ll1.c libffi.call/nested_struct3.c \
|
||||
libffi.call/cls_20byte1.c libffi.call/closure_fn4.c \
|
||||
libffi.call/cls_uchar.c libffi.call/struct2.c libffi.call/cls_7byte.c \
|
||||
libffi.call/strlen.c libffi.call/many.c libffi.call/testclosure.c \
|
||||
libffi.call/return_fl.c libffi.call/struct5.c \
|
||||
libffi.call/cls_12byte.c libffi.call/cls_multi_sshortchar.c \
|
||||
libffi.call/cls_align_longdouble_split2.c libffi.call/return_dbl2.c \
|
||||
libffi.call/return_fl3.c libffi.call/stret_medium.c \
|
||||
libffi.call/nested_struct6.c libffi.call/closure_fn3.c \
|
||||
libffi.call/float3.c libffi.call/many2.c \
|
||||
libffi.call/closure_stdcall.c libffi.call/cls_align_uint16.c \
|
||||
libffi.call/cls_9byte1.c libffi.call/closure_fn6.c \
|
||||
libffi.call/cls_double_va.c libffi.call/cls_align_pointer.c \
|
||||
libffi.call/cls_align_longdouble.c libffi.call/closure_fn2.c \
|
||||
libffi.call/cls_sshort.c libffi.call/many_win32.c \
|
||||
libffi.call/nested_struct.c libffi.call/cls_20byte.c \
|
||||
libffi.call/cls_longdouble.c libffi.call/cls_multi_uchar.c \
|
||||
libffi.call/return_uc.c libffi.call/closure_thiscall.c \
|
||||
libffi.call/cls_18byte.c libffi.call/cls_8byte.c \
|
||||
libffi.call/promotion.c libffi.call/struct1_win32.c \
|
||||
libffi.call/return_dbl.c libffi.call/cls_24byte.c \
|
||||
libffi.call/struct4.c libffi.call/cls_6byte.c \
|
||||
libffi.call/cls_align_uint32.c libffi.call/float.c \
|
||||
libffi.call/float1.c libffi.call/float_va.c libffi.call/negint.c \
|
||||
libffi.call/return_dbl1.c libffi.call/cls_3_1byte.c \
|
||||
libffi.call/cls_align_float.c libffi.call/return_fl1.c \
|
||||
libffi.call/nested_struct10.c libffi.call/nested_struct5.c \
|
||||
libffi.call/fastthis1_win32.c libffi.call/cls_align_sint64.c \
|
||||
libffi.call/stret_large2.c libffi.call/return_sl.c \
|
||||
libffi.call/closure_fn0.c libffi.call/cls_5byte.c \
|
||||
libffi.call/cls_2byte.c libffi.call/float2.c \
|
||||
libffi.call/cls_dbls_struct.c libffi.call/cls_sint.c \
|
||||
libffi.call/stret_large.c libffi.call/cls_ulonglong.c \
|
||||
libffi.call/cls_ushort.c libffi.call/nested_struct1.c \
|
||||
libffi.call/err_bad_abi.c libffi.call/cls_longdouble_va.c \
|
||||
libffi.call/cls_float.c libffi.call/cls_pointer_stack.c \
|
||||
libffi.call/pyobjc-tc.c libffi.call/cls_multi_ushortchar.c \
|
||||
libffi.call/struct1.c libffi.call/nested_struct9.c \
|
||||
libffi.call/huge_struct.c libffi.call/problem1.c \
|
||||
libffi.call/float4.c libffi.call/fastthis3_win32.c \
|
||||
libffi.call/return_ldl.c libffi.call/strlen2_win32.c \
|
||||
libffi.call/closure_fn5.c libffi.call/struct2_win32.c \
|
||||
libffi.call/struct6.c libffi.call/return_ll.c libffi.call/struct9.c \
|
||||
libffi.call/return_sc.c libffi.call/struct7.c \
|
||||
libffi.call/cls_align_uint64.c libffi.call/cls_4byte.c \
|
||||
libffi.call/strlen_win32.c libffi.call/cls_6_1_byte.c \
|
||||
libffi.call/cls_7_1_byte.c libffi.special/unwindtest.cc \
|
||||
libffi.special/special.exp libffi.special/unwindtest_ffi_call.cc \
|
||||
libffi.special/ffitestcxx.h lib/wrapper.exp lib/target-libpath.exp \
|
||||
lib/libffi.exp libffi.call/cls_struct_va1.c \
|
||||
libffi.call/cls_uchar_va.c libffi.call/cls_uint_va.c \
|
||||
libffi.call/cls_ulong_va.c libffi.call/cls_ushort_va.c \
|
||||
libffi.call/nested_struct11.c libffi.call/uninitialized.c \
|
||||
libffi.call/va_1.c libffi.call/va_struct1.c libffi.call/va_struct2.c \
|
||||
libffi.call/va_struct3.c
|
||||
|
||||
EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \
|
||||
libffi.call/cls_align_longdouble_split.c libffi.call/closure_loc_fn0.c \
|
||||
libffi.call/cls_schar.c libffi.call/closure_fn1.c \
|
||||
libffi.call/many2_win32.c libffi.call/return_ul.c \
|
||||
libffi.call/cls_align_double.c libffi.call/return_fl2.c \
|
||||
libffi.call/cls_1_1byte.c libffi.call/cls_64byte.c \
|
||||
libffi.call/nested_struct7.c libffi.call/cls_align_sint32.c \
|
||||
libffi.call/nested_struct2.c libffi.call/ffitest.h \
|
||||
libffi.call/nested_struct4.c libffi.call/cls_multi_ushort.c \
|
||||
libffi.call/struct3.c libffi.call/cls_3byte1.c \
|
||||
libffi.call/cls_16byte.c libffi.call/struct8.c \
|
||||
libffi.call/nested_struct8.c libffi.call/cls_multi_sshort.c \
|
||||
libffi.call/cls_3byte2.c libffi.call/fastthis2_win32.c \
|
||||
libffi.call/cls_pointer.c libffi.call/err_bad_typedef.c \
|
||||
libffi.call/cls_4_1byte.c libffi.call/cls_9byte2.c \
|
||||
libffi.call/cls_multi_schar.c libffi.call/stret_medium2.c \
|
||||
libffi.call/cls_5_1_byte.c libffi.call/call.exp \
|
||||
libffi.call/cls_double.c libffi.call/cls_align_sint16.c \
|
||||
libffi.call/cls_uint.c libffi.call/return_ll1.c \
|
||||
libffi.call/nested_struct3.c libffi.call/cls_20byte1.c \
|
||||
libffi.call/closure_fn4.c libffi.call/cls_uchar.c \
|
||||
libffi.call/struct2.c libffi.call/cls_7byte.c libffi.call/strlen.c \
|
||||
libffi.call/many.c libffi.call/testclosure.c libffi.call/return_fl.c \
|
||||
libffi.call/struct5.c libffi.call/cls_12byte.c \
|
||||
libffi.call/cls_multi_sshortchar.c \
|
||||
libffi.call/cls_align_longdouble_split2.c libffi.call/return_dbl2.c \
|
||||
libffi.call/return_fl3.c libffi.call/stret_medium.c \
|
||||
libffi.call/nested_struct6.c libffi.call/a.out \
|
||||
libffi.call/closure_fn3.c libffi.call/float3.c libffi.call/many2.c \
|
||||
libffi.call/closure_stdcall.c libffi.call/cls_align_uint16.c \
|
||||
libffi.call/cls_9byte1.c libffi.call/closure_fn6.c \
|
||||
libffi.call/cls_double_va.c libffi.call/cls_align_pointer.c \
|
||||
libffi.call/cls_align_longdouble.c libffi.call/closure_fn2.c \
|
||||
libffi.call/cls_sshort.c libffi.call/many_win32.c \
|
||||
libffi.call/nested_struct.c libffi.call/cls_20byte.c \
|
||||
libffi.call/cls_longdouble.c libffi.call/cls_multi_uchar.c \
|
||||
libffi.call/return_uc.c libffi.call/closure_thiscall.c \
|
||||
libffi.call/cls_18byte.c libffi.call/cls_8byte.c \
|
||||
libffi.call/promotion.c libffi.call/struct1_win32.c \
|
||||
libffi.call/return_dbl.c libffi.call/cls_24byte.c \
|
||||
libffi.call/struct4.c libffi.call/cls_6byte.c \
|
||||
libffi.call/cls_align_uint32.c libffi.call/float.c \
|
||||
libffi.call/float1.c libffi.call/float_va.c libffi.call/negint.c \
|
||||
libffi.call/return_dbl1.c libffi.call/cls_3_1byte.c \
|
||||
libffi.call/cls_align_float.c libffi.call/return_fl1.c \
|
||||
libffi.call/nested_struct10.c libffi.call/nested_struct5.c \
|
||||
libffi.call/fastthis1_win32.c libffi.call/cls_align_sint64.c \
|
||||
libffi.call/stret_large2.c libffi.call/return_sl.c \
|
||||
libffi.call/closure_fn0.c libffi.call/cls_5byte.c \
|
||||
libffi.call/cls_2byte.c libffi.call/float2.c \
|
||||
libffi.call/cls_dbls_struct.c libffi.call/cls_sint.c \
|
||||
libffi.call/stret_large.c libffi.call/cls_ulonglong.c \
|
||||
libffi.call/cls_ushort.c libffi.call/nested_struct1.c \
|
||||
libffi.call/err_bad_abi.c libffi.call/cls_longdouble_va.c \
|
||||
libffi.call/cls_float.c libffi.call/cls_pointer_stack.c \
|
||||
libffi.call/pyobjc-tc.c libffi.call/cls_multi_ushortchar.c \
|
||||
libffi.call/struct1.c libffi.call/nested_struct9.c \
|
||||
libffi.call/huge_struct.c libffi.call/problem1.c libffi.call/float4.c \
|
||||
libffi.call/fastthis3_win32.c libffi.call/return_ldl.c \
|
||||
libffi.call/strlen2_win32.c libffi.call/closure_fn5.c \
|
||||
libffi.call/struct2_win32.c libffi.call/struct6.c \
|
||||
libffi.call/return_ll.c libffi.call/struct9.c libffi.call/return_sc.c \
|
||||
libffi.call/struct7.c libffi.call/cls_align_uint64.c \
|
||||
libffi.call/cls_4byte.c libffi.call/strlen_win32.c \
|
||||
libffi.call/cls_6_1_byte.c libffi.call/cls_7_1_byte.c \
|
||||
libffi.special/unwindtest.cc libffi.special/special.exp \
|
||||
libffi.special/unwindtest_ffi_call.cc libffi.special/ffitestcxx.h \
|
||||
lib/wrapper.exp lib/target-libpath.exp lib/libffi.exp
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -14,23 +15,6 @@
|
|||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -53,19 +37,7 @@ target_triplet = @target@
|
|||
subdir = testsuite
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
||||
$(top_srcdir)/m4/ax_append_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_configure_args.m4 \
|
||||
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
|
|
@ -75,11 +47,6 @@ CONFIG_CLEAN_FILES =
|
|||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
DEJATOOL = $(PACKAGE)
|
||||
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
|
@ -147,7 +114,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
|
@ -168,7 +134,6 @@ am__leading_dot = @am__leading_dot@
|
|||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
|
@ -204,7 +169,6 @@ psdir = @psdir@
|
|||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
|
|
@ -227,82 +191,75 @@ RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
|
|||
echo $(top_srcdir)/../dejagnu/runtest ; \
|
||||
else echo runtest; fi`
|
||||
|
||||
EXTRA_DEJAGNU_SITE_CONFIG = ../local.exp
|
||||
CLEANFILES = *.exe core* *.log *.sum
|
||||
EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \
|
||||
libffi.call/cls_align_longdouble_split.c \
|
||||
libffi.call/closure_loc_fn0.c libffi.call/cls_schar.c \
|
||||
libffi.call/closure_fn1.c libffi.call/many2_win32.c \
|
||||
libffi.call/return_ul.c libffi.call/cls_align_double.c \
|
||||
libffi.call/return_fl2.c libffi.call/cls_1_1byte.c \
|
||||
libffi.call/cls_64byte.c libffi.call/nested_struct7.c \
|
||||
libffi.call/cls_align_sint32.c libffi.call/nested_struct2.c \
|
||||
libffi.call/ffitest.h libffi.call/nested_struct4.c \
|
||||
libffi.call/cls_multi_ushort.c libffi.call/struct3.c \
|
||||
libffi.call/cls_3byte1.c libffi.call/cls_16byte.c \
|
||||
libffi.call/struct8.c libffi.call/nested_struct8.c \
|
||||
libffi.call/cls_multi_sshort.c libffi.call/cls_3byte2.c \
|
||||
libffi.call/fastthis2_win32.c libffi.call/cls_pointer.c \
|
||||
libffi.call/err_bad_typedef.c libffi.call/cls_4_1byte.c \
|
||||
libffi.call/cls_9byte2.c libffi.call/cls_multi_schar.c \
|
||||
libffi.call/stret_medium2.c libffi.call/cls_5_1_byte.c \
|
||||
libffi.call/call.exp libffi.call/cls_double.c \
|
||||
libffi.call/cls_align_sint16.c libffi.call/cls_uint.c \
|
||||
libffi.call/return_ll1.c libffi.call/nested_struct3.c \
|
||||
libffi.call/cls_20byte1.c libffi.call/closure_fn4.c \
|
||||
libffi.call/cls_uchar.c libffi.call/struct2.c libffi.call/cls_7byte.c \
|
||||
libffi.call/strlen.c libffi.call/many.c libffi.call/testclosure.c \
|
||||
libffi.call/return_fl.c libffi.call/struct5.c \
|
||||
libffi.call/cls_12byte.c libffi.call/cls_multi_sshortchar.c \
|
||||
libffi.call/cls_align_longdouble_split2.c libffi.call/return_dbl2.c \
|
||||
libffi.call/return_fl3.c libffi.call/stret_medium.c \
|
||||
libffi.call/nested_struct6.c libffi.call/closure_fn3.c \
|
||||
libffi.call/float3.c libffi.call/many2.c \
|
||||
libffi.call/closure_stdcall.c libffi.call/cls_align_uint16.c \
|
||||
libffi.call/cls_9byte1.c libffi.call/closure_fn6.c \
|
||||
libffi.call/cls_double_va.c libffi.call/cls_align_pointer.c \
|
||||
libffi.call/cls_align_longdouble.c libffi.call/closure_fn2.c \
|
||||
libffi.call/cls_sshort.c libffi.call/many_win32.c \
|
||||
libffi.call/nested_struct.c libffi.call/cls_20byte.c \
|
||||
libffi.call/cls_longdouble.c libffi.call/cls_multi_uchar.c \
|
||||
libffi.call/return_uc.c libffi.call/closure_thiscall.c \
|
||||
libffi.call/cls_18byte.c libffi.call/cls_8byte.c \
|
||||
libffi.call/promotion.c libffi.call/struct1_win32.c \
|
||||
libffi.call/return_dbl.c libffi.call/cls_24byte.c \
|
||||
libffi.call/struct4.c libffi.call/cls_6byte.c \
|
||||
libffi.call/cls_align_uint32.c libffi.call/float.c \
|
||||
libffi.call/float1.c libffi.call/float_va.c libffi.call/negint.c \
|
||||
libffi.call/return_dbl1.c libffi.call/cls_3_1byte.c \
|
||||
libffi.call/cls_align_float.c libffi.call/return_fl1.c \
|
||||
libffi.call/nested_struct10.c libffi.call/nested_struct5.c \
|
||||
libffi.call/fastthis1_win32.c libffi.call/cls_align_sint64.c \
|
||||
libffi.call/stret_large2.c libffi.call/return_sl.c \
|
||||
libffi.call/closure_fn0.c libffi.call/cls_5byte.c \
|
||||
libffi.call/cls_2byte.c libffi.call/float2.c \
|
||||
libffi.call/cls_dbls_struct.c libffi.call/cls_sint.c \
|
||||
libffi.call/stret_large.c libffi.call/cls_ulonglong.c \
|
||||
libffi.call/cls_ushort.c libffi.call/nested_struct1.c \
|
||||
libffi.call/err_bad_abi.c libffi.call/cls_longdouble_va.c \
|
||||
libffi.call/cls_float.c libffi.call/cls_pointer_stack.c \
|
||||
libffi.call/pyobjc-tc.c libffi.call/cls_multi_ushortchar.c \
|
||||
libffi.call/struct1.c libffi.call/nested_struct9.c \
|
||||
libffi.call/huge_struct.c libffi.call/problem1.c \
|
||||
libffi.call/float4.c libffi.call/fastthis3_win32.c \
|
||||
libffi.call/return_ldl.c libffi.call/strlen2_win32.c \
|
||||
libffi.call/closure_fn5.c libffi.call/struct2_win32.c \
|
||||
libffi.call/struct6.c libffi.call/return_ll.c libffi.call/struct9.c \
|
||||
libffi.call/return_sc.c libffi.call/struct7.c \
|
||||
libffi.call/cls_align_uint64.c libffi.call/cls_4byte.c \
|
||||
libffi.call/strlen_win32.c libffi.call/cls_6_1_byte.c \
|
||||
libffi.call/cls_7_1_byte.c libffi.special/unwindtest.cc \
|
||||
libffi.special/special.exp libffi.special/unwindtest_ffi_call.cc \
|
||||
libffi.special/ffitestcxx.h lib/wrapper.exp lib/target-libpath.exp \
|
||||
lib/libffi.exp libffi.call/cls_struct_va1.c \
|
||||
libffi.call/cls_uchar_va.c libffi.call/cls_uint_va.c \
|
||||
libffi.call/cls_ulong_va.c libffi.call/cls_ushort_va.c \
|
||||
libffi.call/nested_struct11.c libffi.call/uninitialized.c \
|
||||
libffi.call/va_1.c libffi.call/va_struct1.c libffi.call/va_struct2.c \
|
||||
libffi.call/va_struct3.c
|
||||
EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \
|
||||
libffi.call/cls_align_longdouble_split.c libffi.call/closure_loc_fn0.c \
|
||||
libffi.call/cls_schar.c libffi.call/closure_fn1.c \
|
||||
libffi.call/many2_win32.c libffi.call/return_ul.c \
|
||||
libffi.call/cls_align_double.c libffi.call/return_fl2.c \
|
||||
libffi.call/cls_1_1byte.c libffi.call/cls_64byte.c \
|
||||
libffi.call/nested_struct7.c libffi.call/cls_align_sint32.c \
|
||||
libffi.call/nested_struct2.c libffi.call/ffitest.h \
|
||||
libffi.call/nested_struct4.c libffi.call/cls_multi_ushort.c \
|
||||
libffi.call/struct3.c libffi.call/cls_3byte1.c \
|
||||
libffi.call/cls_16byte.c libffi.call/struct8.c \
|
||||
libffi.call/nested_struct8.c libffi.call/cls_multi_sshort.c \
|
||||
libffi.call/cls_3byte2.c libffi.call/fastthis2_win32.c \
|
||||
libffi.call/cls_pointer.c libffi.call/err_bad_typedef.c \
|
||||
libffi.call/cls_4_1byte.c libffi.call/cls_9byte2.c \
|
||||
libffi.call/cls_multi_schar.c libffi.call/stret_medium2.c \
|
||||
libffi.call/cls_5_1_byte.c libffi.call/call.exp \
|
||||
libffi.call/cls_double.c libffi.call/cls_align_sint16.c \
|
||||
libffi.call/cls_uint.c libffi.call/return_ll1.c \
|
||||
libffi.call/nested_struct3.c libffi.call/cls_20byte1.c \
|
||||
libffi.call/closure_fn4.c libffi.call/cls_uchar.c \
|
||||
libffi.call/struct2.c libffi.call/cls_7byte.c libffi.call/strlen.c \
|
||||
libffi.call/many.c libffi.call/testclosure.c libffi.call/return_fl.c \
|
||||
libffi.call/struct5.c libffi.call/cls_12byte.c \
|
||||
libffi.call/cls_multi_sshortchar.c \
|
||||
libffi.call/cls_align_longdouble_split2.c libffi.call/return_dbl2.c \
|
||||
libffi.call/return_fl3.c libffi.call/stret_medium.c \
|
||||
libffi.call/nested_struct6.c libffi.call/a.out \
|
||||
libffi.call/closure_fn3.c libffi.call/float3.c libffi.call/many2.c \
|
||||
libffi.call/closure_stdcall.c libffi.call/cls_align_uint16.c \
|
||||
libffi.call/cls_9byte1.c libffi.call/closure_fn6.c \
|
||||
libffi.call/cls_double_va.c libffi.call/cls_align_pointer.c \
|
||||
libffi.call/cls_align_longdouble.c libffi.call/closure_fn2.c \
|
||||
libffi.call/cls_sshort.c libffi.call/many_win32.c \
|
||||
libffi.call/nested_struct.c libffi.call/cls_20byte.c \
|
||||
libffi.call/cls_longdouble.c libffi.call/cls_multi_uchar.c \
|
||||
libffi.call/return_uc.c libffi.call/closure_thiscall.c \
|
||||
libffi.call/cls_18byte.c libffi.call/cls_8byte.c \
|
||||
libffi.call/promotion.c libffi.call/struct1_win32.c \
|
||||
libffi.call/return_dbl.c libffi.call/cls_24byte.c \
|
||||
libffi.call/struct4.c libffi.call/cls_6byte.c \
|
||||
libffi.call/cls_align_uint32.c libffi.call/float.c \
|
||||
libffi.call/float1.c libffi.call/float_va.c libffi.call/negint.c \
|
||||
libffi.call/return_dbl1.c libffi.call/cls_3_1byte.c \
|
||||
libffi.call/cls_align_float.c libffi.call/return_fl1.c \
|
||||
libffi.call/nested_struct10.c libffi.call/nested_struct5.c \
|
||||
libffi.call/fastthis1_win32.c libffi.call/cls_align_sint64.c \
|
||||
libffi.call/stret_large2.c libffi.call/return_sl.c \
|
||||
libffi.call/closure_fn0.c libffi.call/cls_5byte.c \
|
||||
libffi.call/cls_2byte.c libffi.call/float2.c \
|
||||
libffi.call/cls_dbls_struct.c libffi.call/cls_sint.c \
|
||||
libffi.call/stret_large.c libffi.call/cls_ulonglong.c \
|
||||
libffi.call/cls_ushort.c libffi.call/nested_struct1.c \
|
||||
libffi.call/err_bad_abi.c libffi.call/cls_longdouble_va.c \
|
||||
libffi.call/cls_float.c libffi.call/cls_pointer_stack.c \
|
||||
libffi.call/pyobjc-tc.c libffi.call/cls_multi_ushortchar.c \
|
||||
libffi.call/struct1.c libffi.call/nested_struct9.c \
|
||||
libffi.call/huge_struct.c libffi.call/problem1.c libffi.call/float4.c \
|
||||
libffi.call/fastthis3_win32.c libffi.call/return_ldl.c \
|
||||
libffi.call/strlen2_win32.c libffi.call/closure_fn5.c \
|
||||
libffi.call/struct2_win32.c libffi.call/struct6.c \
|
||||
libffi.call/return_ll.c libffi.call/struct9.c libffi.call/return_sc.c \
|
||||
libffi.call/struct7.c libffi.call/cls_align_uint64.c \
|
||||
libffi.call/cls_4byte.c libffi.call/strlen_win32.c \
|
||||
libffi.call/cls_6_1_byte.c libffi.call/cls_7_1_byte.c \
|
||||
libffi.special/unwindtest.cc libffi.special/special.exp \
|
||||
libffi.special/unwindtest_ffi_call.cc libffi.special/ffitestcxx.h \
|
||||
lib/wrapper.exp lib/target-libpath.exp lib/libffi.exp
|
||||
|
||||
all: all-am
|
||||
|
||||
|
|
@ -349,8 +306,6 @@ TAGS:
|
|||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
check-DEJAGNU: site.exp
|
||||
srcdir='$(srcdir)'; export srcdir; \
|
||||
|
|
@ -361,11 +316,11 @@ check-DEJAGNU: site.exp
|
|||
if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
|
||||
then :; else exit_status=1; fi; \
|
||||
done; \
|
||||
else echo "WARNING: could not find 'runtest'" 1>&2; :;\
|
||||
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
||||
fi; \
|
||||
exit $$exit_status
|
||||
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
|
||||
@echo 'Making a new site.exp file ...'
|
||||
@echo 'Making a new site.exp file...'
|
||||
@echo '## these variables are automatically generated by make ##' >site.tmp
|
||||
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
|
||||
@echo '# edit the last section' >>site.tmp
|
||||
|
|
|
|||
|
|
@ -101,17 +101,9 @@ proc libffi-init { args } {
|
|||
global tool_root_dir
|
||||
global ld_library_path
|
||||
|
||||
global using_gcc
|
||||
|
||||
set blddirffi [pwd]/..
|
||||
verbose "libffi $blddirffi"
|
||||
|
||||
# Are we building with GCC?
|
||||
set tmp [grep ../config.status "GCC='yes'"]
|
||||
if { [string match $tmp "GCC='yes'"] } {
|
||||
|
||||
set using_gcc "yes"
|
||||
|
||||
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
|
||||
if {$gccdir != ""} {
|
||||
set gccdir [file dirname $gccdir]
|
||||
|
|
@ -135,13 +127,6 @@ proc libffi-init { args } {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
set using_gcc "no"
|
||||
|
||||
}
|
||||
|
||||
# add the library path for libffi.
|
||||
append ld_library_path ":${blddirffi}/.libs"
|
||||
|
||||
|
|
@ -218,10 +203,6 @@ proc libffi_target_compile { source dest type options } {
|
|||
|
||||
lappend options "libs= -lffi"
|
||||
|
||||
if { [string match "aarch64*-*-linux*" $target_triplet] } {
|
||||
lappend options "libs= -lpthread"
|
||||
}
|
||||
|
||||
verbose "options: $options"
|
||||
return [target_compile $source $dest $type $options]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@
|
|||
Originator: Blake Chaffin */
|
||||
|
||||
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
|
||||
/* This test is known to PASS on armv7l-unknown-linux-gnueabihf, so I have
|
||||
remove the xfail for arm*-*-* below, until we know more. */
|
||||
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
|
||||
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
|
||||
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#define MAX_ARGS 256
|
||||
|
||||
#define CHECK(x) !(x) ? (abort(), 1) : 0
|
||||
#define CHECK(x) !(x) ? abort() : 0
|
||||
|
||||
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
|
||||
#undef __UNUSED__
|
||||
|
|
@ -127,6 +127,44 @@
|
|||
#define PRId64 "I64d"
|
||||
#endif
|
||||
|
||||
#ifndef PRIuPTR
|
||||
#define PRIuPTR "u"
|
||||
#ifdef USING_MMAP
|
||||
static inline void *
|
||||
allocate_mmap (size_t size)
|
||||
{
|
||||
void *page;
|
||||
#if defined (HAVE_MMAP_DEV_ZERO)
|
||||
static int dev_zero_fd = -1;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMAP_DEV_ZERO
|
||||
if (dev_zero_fd == -1)
|
||||
{
|
||||
dev_zero_fd = open ("/dev/zero", O_RDONLY);
|
||||
if (dev_zero_fd == -1)
|
||||
{
|
||||
perror ("open /dev/zero: %m");
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_MMAP_ANON
|
||||
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
#endif
|
||||
#ifdef HAVE_MMAP_DEV_ZERO
|
||||
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
|
||||
MAP_PRIVATE, dev_zero_fd, 0);
|
||||
#endif
|
||||
|
||||
if (page == (void *) MAP_FAILED)
|
||||
{
|
||||
perror ("virtual memory exhausted");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ int main (void)
|
|||
* different. */
|
||||
/* Call it statically and then via ffi */
|
||||
resfp=float_va_fn(0,2.0);
|
||||
/* { dg-output "0: 2.0 : total: 2.0" } */
|
||||
// { dg-output "0: 2.0 : total: 2.0" }
|
||||
printf("compiled: %.1f\n", resfp);
|
||||
/* { dg-output "\ncompiled: 2.0" } */
|
||||
// { dg-output "\ncompiled: 2.0" }
|
||||
|
||||
arg_types[0] = &ffi_type_uint;
|
||||
arg_types[1] = &ffi_type_double;
|
||||
|
|
@ -71,16 +71,16 @@ int main (void)
|
|||
values[0] = &firstarg;
|
||||
values[1] = &doubles[0];
|
||||
ffi_call(&cif, FFI_FN(float_va_fn), &resfp, values);
|
||||
/* { dg-output "\n0: 2.0 : total: 2.0" } */
|
||||
// { dg-output "\n0: 2.0 : total: 2.0" }
|
||||
printf("ffi: %.1f\n", resfp);
|
||||
/* { dg-output "\nffi: 2.0" } */
|
||||
// { dg-output "\nffi: 2.0" }
|
||||
|
||||
/* Second test, float_va_fn(2,2.0,3.0,4.0), now with variadic params */
|
||||
/* Call it statically and then via ffi */
|
||||
resfp=float_va_fn(2,2.0,3.0,4.0);
|
||||
/* { dg-output "\n2: 2.0 : 0:3.0 1:4.0 total: 11.0" } */
|
||||
// { dg-output "\n2: 2.0 : 0:3.0 1:4.0 total: 11.0" }
|
||||
printf("compiled: %.1f\n", resfp);
|
||||
/* { dg-output "\ncompiled: 11.0" } */
|
||||
// { dg-output "\ncompiled: 11.0" }
|
||||
|
||||
arg_types[0] = &ffi_type_uint;
|
||||
arg_types[1] = &ffi_type_double;
|
||||
|
|
@ -99,9 +99,9 @@ int main (void)
|
|||
values[2] = &doubles[1];
|
||||
values[3] = &doubles[2];
|
||||
ffi_call(&cif, FFI_FN(float_va_fn), &resfp, values);
|
||||
/* { dg-output "\n2: 2.0 : 0:3.0 1:4.0 total: 11.0" } */
|
||||
// { dg-output "\n2: 2.0 : 0:3.0 1:4.0 total: 11.0" }
|
||||
printf("ffi: %.1f\n", resfp);
|
||||
/* { dg-output "\nffi: 11.0" } */
|
||||
// { dg-output "\nffi: 11.0" }
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
|
||||
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
|
||||
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
|
||||
/* { dg-options -Wformat=0 { target moxie*-*-elf } } */
|
||||
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
|
@ -296,7 +295,7 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
|
|||
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 50, &ret_struct_type, argTypes) == FFI_OK);
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_large_fn), &retVal, argValues);
|
||||
/* { dg-output "1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" } */
|
||||
// { dg-output "1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
printf("res: %" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
|
||||
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
|
||||
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
|
||||
|
|
@ -309,7 +308,7 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
|
|||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned long)retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned long)retVal.vv, retVal.ww, retVal.xx);
|
||||
/* { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" } */
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_large_fn, NULL, code) == FFI_OK);
|
||||
|
||||
|
|
@ -324,7 +323,7 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
|
|||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
|
||||
ui8, si8);
|
||||
/* { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" } */
|
||||
// { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
printf("res: %" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
|
||||
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
|
||||
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
|
||||
|
|
@ -337,7 +336,7 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
|
|||
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned long)retVal.jj,
|
||||
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
|
||||
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned long)retVal.vv, retVal.ww, retVal.xx);
|
||||
/* { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" } */
|
||||
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@
|
|||
|
||||
typedef unsigned char u8;
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
uint8_t
|
||||
__attribute__((noinline)) uint8_t
|
||||
foo (uint8_t a, uint8_t b, uint8_t c, uint8_t d,
|
||||
uint8_t e, uint8_t f, uint8_t g)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue