Update missing changes for 3.0.9r4.

This commit is contained in:
Anthony Green
2009-12-24 00:22:00 -05:00
parent f8c7a245bf
commit 115ab36fce
88 changed files with 19142 additions and 22010 deletions

131
ChangeLog
View File

@@ -1,3 +1,134 @@
2009-12-21 Andreas Tobler <a.tobler@schweiz.org>
* configure.ac: Make i?86 build on FreeBSD and OpenBSD.
* configure: Regenerate.
2009-12-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* testsuite/libffi.call/ffitest.h: Define PRIuPTR on PA HP-UX.
2009-12-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* src/pa/ffi.c (ffi_closure_inner_pa32): Handle FFI_TYPE_LONGDOUBLE
type on HP-UX.
2009-12-11 Eric Botcazou <ebotcazou@adacore.com>
* src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
double' arguments.
2009-12-11 Eric Botcazou <ebotcazou@adacore.com>
* testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
2009-12-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libffi/40700
* src/closures.c [X86_64 && __sun__ && __svr4__]
(FFI_MMAP_EXEC_WRIT): Define.
2009-12-08 David Daney <ddaney@caviumnetworks.com>
* testsuite/libffi.call/stret_medium.c: Remove xfail for mips*-*-*
* testsuite/libffi.call/cls_align_longdouble_split2.c: Same.
* testsuite/libffi.call/stret_large.c: Same.
* testsuite/libffi.call/cls_align_longdouble_split.c: Same.
* testsuite/libffi.call/stret_large2.c: Same.
* testsuite/libffi.call/stret_medium2.c: Same.
2009-12-07 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/aix_closure.S (libffi_closure_ASM): Fix tablejump
typo.
2009-12-05 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/aix.S: Update AIX32 code to be consistent with AIX64
code.
* src/powerpc/aix_closure.S: Same.
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
* configure: Regenerate.
* include/Makefile.in: Regenerate.
* man/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2009-12-04 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/aix_closure.S: Reorganize 64-bit code to match
linux64_closure.S.
2009-12-04 Uros Bizjak <ubizjak@gmail.com>
PR libffi/41908
* src/x86/ffi64.c (classify_argument): Update from
gcc/config/i386/i386.c.
(ffi_closure_unix64_inner): Do not use the address of two consecutive
SSE registers directly.
* testsuite/libffi.call/cls_dbls_struct.c (main): Remove xfail
for x86_64 linux targets.
2009-12-04 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/ffi_darwin.c (ffi_closure_helper_DARWIN): Increment
pfr for long double split between fpr13 and stack.
2009-12-03 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/ffi_darwin.c (ffi_prep_args): Increment next_arg and
fparg_count twice for long double.
2009-12-03 David Edelsohn <edelsohn@gnu.org>
PR libffi/42243
* src/powerpc/ffi_darwin.c (ffi_prep_args): Remove extra parentheses.
2009-12-03 Uros Bizjak <ubizjak@gmail.com>
* testsuite/libffi.call/cls_longdouble_va.c (main): Fix format string.
Remove xfails for x86 linux targets.
2009-12-02 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/ffi_darwin.c (ffi_prep_args): Fix typo in INT64
case.
2009-12-01 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/aix.S (ffi_call_AIX): Convert to more standard
register usage. Call ffi_prep_args directly. Add long double
return value support.
* src/powerpc/ffi_darwin.c (ffi_prep_args): Double arg increment
applies to FFI_TYPE_DOUBLE. Correct fpr_base increment typo.
Separate FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases.
(ffi_prep_cif_machdep): Only 16 byte stack alignment in 64 bit
mode.
(ffi_closure_helper_DARWIN): Remove nf and ng counters. Move temp
into case.
* src/powerpc/aix_closure.S: Maintain 16 byte stack alignment.
Allocate result area between params and FPRs.
2009-11-30 David Edelsohn <edelsohn@gnu.org>
PR target/35484
* src/powerpc/ffitarget.h (POWERPC64): Define for PPC64 Linux and
AIX64.
* src/powerpc/aix.S: Implement AIX64 version.
* src/powerpc/aix_closure.S: Implement AIX64 version.
(ffi_closure_ASM): Use extsb, lha and displament addresses.
* src/powerpc/ffi_darwin.c (ffi_prep_args): Implement AIX64
support.
(ffi_prep_cif_machdep): Same.
(ffi_call): Same.
(ffi_closure_helper_DARWIN): Same.
2009-11-02 Andreas Tobler <a.tobler@schweiz.org>
PR libffi/41908
* testsuite/libffi.call/testclosure.c: New test.
2009-09-28 Kai Tietz <kai.tietz@onevision.com>
* src/x86/win64.S (_ffi_call_win64 stack): Remove for gnu

View File

@@ -1,3 +1,49 @@
2009-10-11 Matthias Klose <doko@ubuntu.com>
* man/ffi_call.3: Fix #include in examples.
* doc/libffi.texi: Add dircategory.
2009-10-23 Frank Everdij <f.p.x.everdij@tudelft.nl>
* include/ffi.h.in: Placed '__GNUC__' ifdef around
'__attribute__((aligned(8)))' in ffi_closure, fixes compile for
IRIX MIPSPro c99.
* include/ffi_common.h: Added '__sgi' define to non
'__attribute__((__mode__()))' integer typedefs.
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
FFI_LONGDOUBLE support and alignment(N32 only).
* src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
fixed non '__attribute__((__mode__()))' integer typedefs.
* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
since they are Linux/GNU Assembler specific.
2009-10-27 Abdulaziz Ghuloum <aghuloum@gmail.com>
* configure.ac (FFI_MMAP_EXEC_WRIT): Define for snow
leopard (i?86-apple-darwin10*).
* configure: Rebuilt.
* fficonfig.h.in: Rebuilt.
* src/closures.c (dlmmap): Define version for snow leopard.
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
* configure.ac, Makefile.am, src/avr32/ffi.c,
src/avr32/ffitarget.h,
src/avr32/sysv.S: Add AVR32 port.
* testsuite/libffi.call/cls_dbls_struct.c,
testsuite/libffi.call/cls_double_va.c,
testsuite/libffi.call/cls_longdouble_va.c,
testsuite/libffi.call/huge_struct.c: Mark expected failures on
AVR32.
2009-10-27 Samuli Suominen <ssuominen@gentoo.org>
* configure.ac: Undefine _AC_ARG_VAR_PRECIOUS for autoconf 2.64.
* configure: Rebuilt.
* fficonfig.h.in: Rebuilt.
2009-06-16 Andrew Haley <aph@redhat.com>
* testsuite/libffi.call/cls_align_sint64.c,

View File

@@ -80,6 +80,8 @@ AM_MAKEFLAGS = \
MAKEOVERRIDES=
ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
lib_LTLIBRARIES = libffi.la
noinst_LTLIBRARIES = libffi_convenience.la

File diff suppressed because it is too large Load Diff

9568
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

17015
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
dnl Process this with autoconf to create configure
AC_PREREQ(2.59)
AC_PREREQ(2.63)
AC_INIT([libffi], [3.0.9rc1], [http://gcc.gnu.org/bugs.html])
AC_INIT([libffi], [3.0.9rc4], [http://gcc.gnu.org/bugs.html])
AC_CONFIG_HEADERS([fficonfig.h])
AC_CANONICAL_SYSTEM
@@ -27,6 +27,7 @@ AC_SUBST(CFLAGS)
AM_PROG_AS
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
@@ -49,10 +50,6 @@ case "$host" in
TARGET=ARM; TARGETDIR=arm
;;
avr32-*-*)
TARGET=AVR32; TARGETDIR=avr32
;;
amd64-*-freebsd*)
TARGET=X86_64; TARGETDIR=x86
;;
@@ -61,6 +58,10 @@ case "$host" in
TARGET=X86_64; TARGETDIR=x86
;;
avr32*-*-*)
TARGET=AVR32; TARGETDIR=avr32
;;
cris-*-*)
TARGET=LIBFFI_CRIS; TARGETDIR=cris
;;

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/doc
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/doc
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.272552Z
2c36d1d9259ed7b885ff66784a65d3a0
2009-06-09T10:21:19.356122Z
148309
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.272552Z
7123a892595757886f0ee120347f9565
2009-06-09T10:21:19.356122Z
148309
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.272552Z
5f18f2f020ebe104a830fecfe6f6bb22
2009-06-09T10:21:19.356122Z
148309
@@ -134,7 +134,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.273568Z
7123a892595757886f0ee120347f9565
2009-06-09T10:21:19.356122Z
148309

View File

@@ -1,7 +1,7 @@
This is doc/libffi.info, produced by makeinfo version 4.8 from
./doc/libffi.texi.
This is ../plibffi/doc/libffi.info, produced by makeinfo version 4.13
from ../plibffi/doc/libffi.texi.
This manual is for Libffi, a portable foreign-function interface
This manual is for Libffi, a portable foreign-function interface
library.
Copyright (C) 2008 Red Hat, Inc.
@@ -13,7 +13,7 @@ library.
included in the section entitled "GNU General Public License".
INFO-DIR-SECTION
INFO-DIR-SECTION Development
START-INFO-DIR-ENTRY
* libffi: (libffi). Portable foreign-function interface library.
END-INFO-DIR-ENTRY
@@ -111,10 +111,10 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
This initializes CIF according to the given parameters.
ABI is the ABI to use; normally `FFI_DEFAULT_ABI' is what you
want. *Note Multiple ABIs:: for more information.
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
`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
@@ -516,18 +516,18 @@ Index

Tag Table:
Node: Top672
Node: Introduction1408
Node: Using libffi3044
Node: The Basics3479
Node: Simple Example6086
Node: Types7113
Node: Primitive Types7396
Node: Structures9216
Node: Type Example10076
Node: Multiple ABIs11299
Node: The Closure API11670
Node: Missing Features14590
Node: Index15083
Node: Top702
Node: Introduction1438
Node: Using libffi3074
Node: The Basics3509
Node: Simple Example6116
Node: Types7143
Node: Primitive Types7426
Node: Structures9246
Node: Type Example10106
Node: Multiple ABIs11329
Node: The Closure API11700
Node: Missing Features14620
Node: Index15113

End Tag Table

View File

@@ -31,7 +31,7 @@ section entitled ``GNU General Public License''.
@end quotation
@end copying
@dircategory
@dircategory Development
@direntry
* libffi: (libffi). Portable foreign-function interface library.
@end direntry

View File

@@ -1,4 +1,4 @@
@set UPDATED 4 October 2009
@set UPDATED-MONTH October 2009
@set EDITION 3.0.9rc1
@set VERSION 3.0.9rc1
@set UPDATED 23 December 2009
@set UPDATED-MONTH December 2009
@set EDITION 3.0.9rc4
@set VERSION 3.0.9rc4

View File

@@ -1,4 +1,4 @@
@set UPDATED 4 October 2009
@set UPDATED-MONTH October 2009
@set EDITION 3.0.9rc1
@set VERSION 3.0.9rc1
@set UPDATED 23 December 2009
@set UPDATED-MONTH December 2009
@set EDITION 3.0.9rc4
@set VERSION 3.0.9rc4

View File

@@ -1,14 +1,14 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/include
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/include
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-08-22T13:22:20.806489Z
151014
2009-12-05T17:18:53.298892Z
155012
rwild
@@ -32,7 +32,7 @@ file
2009-06-20T15:53:35.000000Z
2009-12-20T06:01:52.296563Z
ec6d4ca2bd2cdaa6a515412cedd717a1
2009-06-12T15:57:58.721771Z
148433
@@ -66,10 +66,10 @@ file
2009-09-10T17:50:58.000000Z
519b93a77f732942ff2c6e947e00ec9d
2009-08-22T13:22:20.806489Z
151014
2009-12-20T06:01:52.296563Z
bc7944b6049d3417505b65c0d178c0db
2009-12-05T17:18:53.298892Z
155012
rwild
@@ -92,7 +92,7 @@ rwild
14583
14563
ffi_common.h
file
@@ -100,7 +100,7 @@ file
2009-06-20T15:53:35.000000Z
2009-12-20T06:01:52.297561Z
5bffed11a81aed973aeec1041d96e2bc
2009-06-12T15:57:58.721771Z
148433
@@ -134,7 +134,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:52.297561Z
f165b6fb33a20fdd5f1eeffbafa83d78
2006-09-12T16:51:43.967870Z
116893

View File

@@ -185,7 +185,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@

View File

@@ -5,5 +5,8 @@ AUTOMAKE_OPTIONS=foreign
DISTCLEANFILES=ffitarget.h
EXTRA_DIST=ffi.h.in ffi_common.h
includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
nodist_includes_HEADERS = ffi.h ffitarget.h
# Where generated headers like ffitarget.h get installed.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
toollibffi_HEADERS = ffi.h ffitarget.h

View File

@@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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,15 +15,12 @@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -39,7 +37,7 @@ host_triplet = @host@
target_triplet = @target@
subdir = include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/ffi.h.in
$(srcdir)/ffi.h.in $(toollibffi_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
@@ -48,6 +46,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES = ffi.h ffitarget.h
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -55,83 +54,79 @@ am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(includesdir)"
nodist_includesHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(nodist_includes_HEADERS)
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(toollibffidir)"
HEADERS = $(toollibffi_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALPHA_FALSE = @ALPHA_FALSE@
ALPHA_TRUE = @ALPHA_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
AR = @AR@
ARM_FALSE = @ARM_FALSE@
ARM_TRUE = @ARM_TRUE@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVR32_FALSE = @AVR32_FALSE@
AVR32_TRUE = @AVR32_TRUE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FRV_FALSE = @FRV_FALSE@
FRV_TRUE = @FRV_TRUE@
FGREP = @FGREP@
GREP = @GREP@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
IA64_FALSE = @IA64_FALSE@
IA64_TRUE = @IA64_TRUE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M32R_FALSE = @M32R_FALSE@
M32R_TRUE = @M32R_TRUE@
M68K_FALSE = @M68K_FALSE@
M68K_TRUE = @M68K_TRUE@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MIPS_FALSE = @MIPS_FALSE@
MIPS_TRUE = @MIPS_TRUE@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -139,55 +134,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PA_HPUX_FALSE = @PA_HPUX_FALSE@
PA_HPUX_TRUE = @PA_HPUX_TRUE@
PA_LINUX_FALSE = @PA_LINUX_FALSE@
PA_LINUX_TRUE = @PA_LINUX_TRUE@
POWERPC_AIX_FALSE = @POWERPC_AIX_FALSE@
POWERPC_AIX_TRUE = @POWERPC_AIX_TRUE@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
POWERPC_FALSE = @POWERPC_FALSE@
POWERPC_FREEBSD_FALSE = @POWERPC_FREEBSD_FALSE@
POWERPC_FREEBSD_TRUE = @POWERPC_FREEBSD_TRUE@
POWERPC_TRUE = @POWERPC_TRUE@
RANLIB = @RANLIB@
S390_FALSE = @S390_FALSE@
S390_TRUE = @S390_TRUE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SH64_FALSE = @SH64_FALSE@
SH64_TRUE = @SH64_TRUE@
SHELL = @SHELL@
SH_FALSE = @SH_FALSE@
SH_TRUE = @SH_TRUE@
SPARC_FALSE = @SPARC_FALSE@
SPARC_TRUE = @SPARC_TRUE@
STRIP = @STRIP@
TARGET = @TARGET@
TARGETDIR = @TARGETDIR@
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
VERSION = @VERSION@
X86_64_FALSE = @X86_64_FALSE@
X86_64_TRUE = @X86_64_TRUE@
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@
X86_FALSE = @X86_FALSE@
X86_FREEBSD_FALSE = @X86_FREEBSD_FALSE@
X86_FREEBSD_TRUE = @X86_FREEBSD_TRUE@
X86_TRUE = @X86_TRUE@
X86_WIN32_FALSE = @X86_WIN32_FALSE@
X86_WIN32_TRUE = @X86_WIN32_TRUE@
X86_WIN64_FALSE = @X86_WIN64_FALSE@
X86_WIN64_TRUE = @X86_WIN64_TRUE@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -199,6 +159,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -217,6 +178,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -226,6 +188,7 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -234,11 +197,17 @@ target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = ffitarget.h
EXTRA_DIST = ffi.h.in ffi_common.h
includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
nodist_includes_HEADERS = ffi.h ffitarget.h
# Where generated headers like ffitarget.h get installed.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
toollibffi_HEADERS = ffi.h ffitarget.h
all: all-am
.SUFFIXES:
@@ -246,14 +215,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign include/Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -271,6 +240,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
ffi.h: $(top_builddir)/config.status $(srcdir)/ffi.h.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@@ -279,100 +249,106 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-nodist_includesHEADERS: $(nodist_includes_HEADERS)
install-toollibffiHEADERS: $(toollibffi_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includesdir)" || $(mkdir_p) "$(DESTDIR)$(includesdir)"
@list='$(nodist_includes_HEADERS)'; for p in $$list; do \
test -z "$(toollibffidir)" || $(MKDIR_P) "$(DESTDIR)$(toollibffidir)"
@list='$(toollibffi_HEADERS)'; test -n "$(toollibffidir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(nodist_includesHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includesdir)/$$f'"; \
$(nodist_includesHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includesdir)/$$f"; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(toollibffidir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(toollibffidir)" || exit $$?; \
done
uninstall-nodist_includesHEADERS:
uninstall-toollibffiHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(nodist_includes_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includesdir)/$$f'"; \
rm -f "$(DESTDIR)$(includesdir)/$$f"; \
done
@list='$(toollibffi_HEADERS)'; test -n "$(toollibffidir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(toollibffidir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(toollibffidir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -380,8 +356,8 @@ check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(includesdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
for dir in "$(DESTDIR)$(toollibffidir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -403,6 +379,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -414,8 +391,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
@@ -423,18 +399,38 @@ dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-nodist_includesHEADERS
install-data-am: install-toollibffiHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -453,19 +449,24 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-nodist_includesHEADERS
uninstall-am: uninstall-toollibffiHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-nodist_includesHEADERS \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-nodist_includesHEADERS
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip \
install-toollibffiHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags uninstall uninstall-am \
uninstall-toollibffiHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -256,7 +256,11 @@ typedef struct {
ffi_cif *cif;
void (*fun)(ffi_cif*,void*,void**,void*);
void *user_data;
#ifdef __GNUC__
} ffi_closure __attribute__((aligned (8)));
#else
} ffi_closure;
#endif
void *ffi_closure_alloc (size_t size, void **code);
void ffi_closure_free (void *);

View File

@@ -84,15 +84,21 @@ typedef struct
} extended_cif;
/* Terse sized type definitions. */
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__sgi)
typedef unsigned char UINT8;
typedef signed char SINT8;
typedef unsigned short UINT16;
typedef signed short SINT16;
typedef unsigned int UINT32;
typedef signed int SINT32;
# ifdef _MSC_VER
typedef unsigned __int64 UINT64;
typedef signed __int64 SINT64;
# else
# include <inttypes.h>
typedef uint64_t UINT64;
typedef int64_t SINT64;
# endif
#else
typedef unsigned int UINT8 __attribute__((__mode__(__QI__)));
typedef signed int SINT8 __attribute__((__mode__(__QI__)));

8527
ltmain.sh

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,14 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/man
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/man
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-08-22T13:22:20.806489Z
151014
2009-12-05T17:18:53.298892Z
155012
rwild
@@ -32,7 +32,7 @@ file
2009-06-20T15:53:37.000000Z
2009-12-20T06:01:58.333556Z
77a8c0a182b31529309b91d3aa9d7a35
2009-06-12T15:57:58.721771Z
148433
@@ -66,10 +66,10 @@ file
2009-09-10T17:50:58.000000Z
87172890fb72428d6e5110dda6aaabf2
2009-08-22T13:22:20.806489Z
151014
2009-12-20T06:01:58.334555Z
05c58ceade6051d8b2ff7afc80cbb9c3
2009-12-05T17:18:53.298892Z
155012
rwild
@@ -92,7 +92,7 @@ rwild
13776
13756
ffi.3
file
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.334555Z
0bf19cd396787816bfd443fe9f6b0097
2009-06-09T10:21:19.356122Z
148309
@@ -134,7 +134,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.334555Z
c391cfc49d2e85ab3b248011c21038cd
2009-06-09T10:21:19.356122Z
148309
@@ -168,7 +168,7 @@ file
2009-06-10T05:25:05.000000Z
2009-12-20T06:01:58.335555Z
ba320392aee6dfa2e896e6deb7205815
2009-06-09T10:21:19.356122Z
148309

View File

@@ -183,7 +183,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@

View File

@@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
@@ -13,15 +14,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -46,8 +44,30 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man3dir = $(mandir)/man3
am__installdirs = "$(DESTDIR)$(man3dir)"
NROFF = nroff
@@ -55,74 +75,56 @@ MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALPHA_FALSE = @ALPHA_FALSE@
ALPHA_TRUE = @ALPHA_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
AR = @AR@
ARM_FALSE = @ARM_FALSE@
ARM_TRUE = @ARM_TRUE@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVR32_FALSE = @AVR32_FALSE@
AVR32_TRUE = @AVR32_TRUE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FRV_FALSE = @FRV_FALSE@
FRV_TRUE = @FRV_TRUE@
FGREP = @FGREP@
GREP = @GREP@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
IA64_FALSE = @IA64_FALSE@
IA64_TRUE = @IA64_TRUE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M32R_FALSE = @M32R_FALSE@
M32R_TRUE = @M32R_TRUE@
M68K_FALSE = @M68K_FALSE@
M68K_TRUE = @M68K_TRUE@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MIPS_FALSE = @MIPS_FALSE@
MIPS_TRUE = @MIPS_TRUE@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -130,55 +132,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PA_HPUX_FALSE = @PA_HPUX_FALSE@
PA_HPUX_TRUE = @PA_HPUX_TRUE@
PA_LINUX_FALSE = @PA_LINUX_FALSE@
PA_LINUX_TRUE = @PA_LINUX_TRUE@
POWERPC_AIX_FALSE = @POWERPC_AIX_FALSE@
POWERPC_AIX_TRUE = @POWERPC_AIX_TRUE@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
POWERPC_FALSE = @POWERPC_FALSE@
POWERPC_FREEBSD_FALSE = @POWERPC_FREEBSD_FALSE@
POWERPC_FREEBSD_TRUE = @POWERPC_FREEBSD_TRUE@
POWERPC_TRUE = @POWERPC_TRUE@
RANLIB = @RANLIB@
S390_FALSE = @S390_FALSE@
S390_TRUE = @S390_TRUE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SH64_FALSE = @SH64_FALSE@
SH64_TRUE = @SH64_TRUE@
SHELL = @SHELL@
SH_FALSE = @SH_FALSE@
SH_TRUE = @SH_TRUE@
SPARC_FALSE = @SPARC_FALSE@
SPARC_TRUE = @SPARC_TRUE@
STRIP = @STRIP@
TARGET = @TARGET@
TARGETDIR = @TARGETDIR@
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
VERSION = @VERSION@
X86_64_FALSE = @X86_64_FALSE@
X86_64_TRUE = @X86_64_TRUE@
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@
X86_FALSE = @X86_FALSE@
X86_FREEBSD_FALSE = @X86_FREEBSD_FALSE@
X86_FREEBSD_TRUE = @X86_FREEBSD_TRUE@
X86_TRUE = @X86_TRUE@
X86_WIN32_FALSE = @X86_WIN32_FALSE@
X86_WIN32_TRUE = @X86_WIN32_TRUE@
X86_WIN64_FALSE = @X86_WIN64_FALSE@
X86_WIN64_TRUE = @X86_WIN64_TRUE@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -190,6 +157,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -208,6 +176,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -217,6 +186,7 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -225,6 +195,9 @@ target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3
man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3
@@ -235,14 +208,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign man/Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign man/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -260,61 +233,51 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man3: $(man3_MANS) $(man_MANS)
install-man3: $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.3*) list="$$list $$i" ;; \
esac; \
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
@list=''; test -n "$(man3dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.3[a-z]*$$/p'; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
done
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
done; }
uninstall-man3:
@$(NORMAL_UNINSTALL)
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.3*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
done
@list=''; test -n "$(man3dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.3[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
tags: TAGS
TAGS:
@@ -323,29 +286,45 @@ CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -354,7 +333,7 @@ check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man3dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -376,6 +355,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -386,7 +366,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
distclean-am: clean-am distclean-generic
dvi: dvi-am
@@ -394,18 +374,38 @@ dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man3
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -424,20 +424,24 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-man
uninstall-am: uninstall-man
uninstall-man: uninstall-man3
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man3 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am uninstall-man \
uninstall-man3
uninstall uninstall-am uninstall-man uninstall-man3
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -43,7 +43,7 @@ integral type must be used to hold
the return value.
.Sh EXAMPLES
.Bd -literal
#include <ffi/ffi.h>
#include <ffi.h>
#include <stdio.h>
unsigned char

View File

@@ -1,15 +1,15 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-09-28T22:26:25.100883Z
152256
ktietz
2009-12-14T02:42:18.232982Z
155205
danglin
@@ -38,11 +38,11 @@ file
2009-09-10T17:50:58.000000Z
3c6816c5a57dc7a877a092b6c1403929
2009-07-24T10:12:16.542948Z
150042
davek
2009-12-20T06:01:56.058555Z
c36f20ce319c714943a9f8272a1ec6c7
2009-12-10T10:09:17.074519Z
155124
ro
@@ -64,7 +64,7 @@ davek
16348
16543
m32r
dir
@@ -72,22 +72,13 @@ dir
sh64
dir
x86
dir
alpha
dir
m68k
dir
types.c
file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.059556Z
50ac67d061e9312c64b3ed7662b64e13
2009-06-04T15:11:12.475454Z
148171
@@ -115,6 +106,15 @@ aph
2904
x86
dir
alpha
dir
m68k
dir
frv
dir
@@ -127,16 +127,13 @@ dir
pa
dir
ia64
dir
raw_api.c
file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.059556Z
a9086fc5c1b5440f02dcbc425f093ae5
2009-06-04T15:43:03.499507Z
148172
@@ -164,13 +161,16 @@ aph
6067
ia64
dir
java_raw_api.c
file
2009-09-16T16:25:59.000000Z
2009-12-20T06:01:56.060556Z
797fe5e8686ab2b9f496e7c991ad685e
2009-09-15T17:15:33.045042Z
151726
@@ -204,7 +204,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.060556Z
02e0fc4e091091ebd2f78437bfd37d1b
2009-06-04T15:11:12.475454Z
148171
@@ -244,7 +244,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.061555Z
38a061bf43e144832f0aa2542dab6efb
2009-06-04T15:11:12.475454Z
148171
@@ -278,7 +278,7 @@ file
2009-06-20T15:53:35.000000Z
2009-12-20T06:01:56.063556Z
f5cc93a1921927f21dc08d81a631981d
2009-06-12T15:57:58.721771Z
148433

View File

@@ -1,6 +1,6 @@
/* -----------------------------------------------------------------------
closures.c - Copyright (c) 2007 Red Hat, Inc.
Copyright (C) 2007 Free Software Foundation, Inc
Copyright (C) 2007, 2009 Free Software Foundation, Inc
Code to allocate and deallocate memory for closures.
@@ -50,6 +50,11 @@
executable memory. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
instead. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
#endif
#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/alpha
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/alpha
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.917555Z
d8ebc1ade0e8f0fa0cd86048ad927b6c
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.918555Z
6c0cd4327058ec8585b09041f1501c2c
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.919555Z
1c2284340e3ec316407056831adf7780
2009-06-04T15:43:03.499507Z
148172

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/arm
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/arm
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:00.000000Z
2009-12-20T06:01:52.915555Z
7d755bdfcc6115d45d2547cf7a149df4
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:00.000000Z
2009-12-20T06:01:52.915555Z
a0ee6e86ca97fcdd084efc21500ebccd
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-09-27T03:30:26.000000Z
2009-12-20T06:01:52.916555Z
4d876a004cbf93486edab24a0c84a4d8
2009-09-23T14:50:35.044390Z
152075

View File

@@ -1,6 +1,6 @@
/* -----------------------------------------------------------------------
closures.c - Copyright (c) 2007 Red Hat, Inc.
Copyright (C) 2007 Free Software Foundation, Inc
Copyright (C) 2007, 2009 Free Software Foundation, Inc
Code to allocate and deallocate memory for closures.
@@ -50,6 +50,11 @@
executable memory. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
instead. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
#endif
#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX
@@ -210,6 +215,7 @@ static int dlmunmap(void *, size_t);
#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__)
#if FFI_MMAP_EXEC_SELINUX
/* A mutex used to synchronize access to *exec* variables in this file. */
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/cris
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/cris
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.240556Z
b0de7e4f36e492338d0076bd66610cd0
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:55.241580Z
5d7af3480697d2ceab7f4ec35baa9d26
2007-03-07T07:27:25.150115Z
122652
@@ -100,7 +100,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:55.241580Z
b17e59bf6ba716c77cd9ca7a4e39e672
2005-04-18T17:08:58.000000Z
98332

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/frv
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/frv
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:55.052556Z
b9ecce87980cf9448d35f168d0b12575
2007-04-13T07:21:04.913930Z
123776
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.053555Z
7e0905257934522b5eacfc1bbf5bb459
2009-06-04T15:11:12.475454Z
148171
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.054555Z
cd95ee2906582020737463464ea8806b
2009-06-04T15:43:03.499507Z
148172

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/ia64
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/ia64
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.350555Z
6705dee4ee4609cc805413bc439c20ae
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.351555Z
8e5389d0a78a91c44ad3532ef97779da
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.351555Z
7ca86e7025e65dd69d1ed227e9fe964e
2009-06-04T15:43:03.499507Z
148172
@@ -134,7 +134,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.352555Z
6598837388b91973b3e6193968357fdb
2009-06-04T15:11:12.475454Z
148171

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/m32r
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/m32r
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:53.883567Z
1cf60578f42fad0141df7c5c8a43a407
2004-10-25T08:55:44.000000Z
89527
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:53.883567Z
1b85561d6e15d52975a28e0729d7d120
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:53.883567Z
fde1f5cb81ab7ce114af861c94c368c0
2004-10-13T17:20:24.000000Z
88993

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/m68k
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/m68k
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.955563Z
7466dbaa771ba740ab8801f3389643e9
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:54.955563Z
8d851db95dfd81e850d6032b8e2b9060
2007-05-10T21:29:04.628473Z
124601
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.955563Z
9de0630e99a0b634afe5519c60c2be86
2009-06-04T15:43:03.499507Z
148172

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/mips
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/mips
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-09-16T16:25:59.000000Z
2009-12-20T06:01:55.707555Z
fdf13476bd3e53815092fde3494d8fc9
2009-09-15T17:15:33.045042Z
151726
@@ -66,7 +66,7 @@ file
2009-09-16T16:25:59.000000Z
2009-12-20T06:01:55.708555Z
142328c284156e2c2ea05bbcbf19a163
2009-09-15T17:15:33.045042Z
151726
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.709555Z
46fc9e546cfb341f1ebf869bed97ebd4
2009-06-04T15:11:12.475454Z
148171
@@ -134,7 +134,7 @@ file
2009-09-16T16:25:59.000000Z
2009-12-20T06:01:55.709555Z
8ab6839e93489a8417539b6953934de1
2009-09-15T17:15:33.045042Z
151726

View File

@@ -625,7 +625,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{
rvalue_copy = alloca (8);
copy_rvalue = 1;
#ifdef __MIPSEB__
#if defined(__MIPSEB__) || defined(_MIPSEB)
copy_offset = 4;
#endif
}
@@ -772,9 +772,10 @@ ffi_closure_mips_inner_O32 (ffi_closure *closure,
{
if (i < 2 && !seen_int &&
(arg_types[i]->type == FFI_TYPE_FLOAT ||
arg_types[i]->type == FFI_TYPE_DOUBLE))
arg_types[i]->type == FFI_TYPE_DOUBLE ||
arg_types[i]->type == FFI_TYPE_LONGDOUBLE))
{
#ifdef __MIPSEB__
#if defined(__MIPSEB__) || defined(_MIPSEB)
if (arg_types[i]->type == FFI_TYPE_FLOAT)
avaluep[i] = ((char *) &fpr[i]) + sizeof (float);
else
@@ -931,10 +932,16 @@ ffi_closure_mips_inner_N32 (ffi_closure *closure,
while (i < avn)
{
if (arg_types[i]->type == FFI_TYPE_FLOAT
|| arg_types[i]->type == FFI_TYPE_DOUBLE)
|| arg_types[i]->type == FFI_TYPE_DOUBLE
|| arg_types[i]->type == FFI_TYPE_LONGDOUBLE)
{
argp = (argn >= 8 || soft_float) ? ar + argn : fpr + argn;
#ifdef __MIPSEB__
if ((arg_types[i]->type == FFI_TYPE_LONGDOUBLE) && ((unsigned)argp & (arg_types[i]->alignment-1)))
{
argp=(ffi_arg*)ALIGN(argp,arg_types[i]->alignment);
argn++;
}
#if defined(__MIPSEB__) || defined(_MIPSEB)
if (arg_types[i]->type == FFI_TYPE_FLOAT && argn < 8)
avaluep[i] = ((char *) argp) + sizeof (float);
else

View File

@@ -28,7 +28,10 @@
#define LIBFFI_TARGET_H
#ifdef linux
#include <asm/sgidefs.h>
# include <asm/sgidefs.h>
#else
# include <sgidefs.h>
#endif
# ifndef _ABIN32
# define _ABIN32 _MIPS_SIM_NABI32
# endif
@@ -38,7 +41,6 @@
# ifndef _ABIO32
# define _ABIO32 _MIPS_SIM_ABI32
# endif
#endif
#if !defined(_MIPS_SIM)
-- something is very wrong --
@@ -154,7 +156,8 @@
# endif /* _MIPS_SIM==_ABI64 */
#endif /* !FFI_MIPS_O32 */
#else /* !LIBFFI_ASM */
#ifdef FFI_MIPS_O32
# ifdef __GNUC__
# ifdef FFI_MIPS_O32
/* O32 stack frames have 32bit integer args */
typedef unsigned int ffi_arg __attribute__((__mode__(__SI__)));
typedef signed int ffi_sarg __attribute__((__mode__(__SI__)));
@@ -162,7 +165,18 @@ typedef signed int ffi_sarg __attribute__((__mode__(__SI__)));
/* N32 and N64 frames have 64bit integer args */
typedef unsigned int ffi_arg __attribute__((__mode__(__DI__)));
typedef signed int ffi_sarg __attribute__((__mode__(__DI__)));
#endif
# endif
# else
# ifdef FFI_MIPS_O32
/* O32 stack frames have 32bit integer args */
typedef __uint32_t ffi_arg;
typedef __int32_t ffi_sarg;
# else
/* N32 and N64 frames have 64bit integer args */
typedef __uint64_t ffi_arg;
typedef __int64_t ffi_sarg;
# endif
# endif /* __GNUC__ */
typedef enum ffi_abi {
FFI_FIRST_ABI = 0,

View File

@@ -40,7 +40,9 @@
#define SIZEOF_FRAME ( 8 * FFI_SIZEOF_ARG )
#ifdef linux
.abicalls
#endif
.text
.align 2
.globl ffi_call_N32
@@ -527,6 +529,7 @@ cls_epilogue:
.LFE2:
.end ffi_closure_N32
#ifdef linux
.section .eh_frame,"aw",@progbits
.Lframe1:
.4byte .LECIE1-.LSCIE1 # length
@@ -583,5 +586,6 @@ cls_epilogue:
.uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4
.align EH_FRAME_ALIGN
.LEFDE3:
#endif /* linux */
#endif

View File

@@ -1,15 +1,15 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/pa
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/pa
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-06-04T15:43:03.499507Z
148172
aph
2009-12-14T02:42:18.232982Z
155205
danglin
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.320573Z
a0da8c57c7ff9de674c6728fe321f0be
2009-06-04T15:43:03.499507Z
148172
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.320573Z
3a6fbb541af62fcd2ae81d874b0c4487
2009-06-04T15:11:12.475454Z
148171
@@ -100,11 +100,11 @@ file
2009-06-10T05:25:02.000000Z
7584ecb991cb652c6935e9f0069dfda3
2009-06-04T15:43:03.499507Z
148172
aph
2009-12-20T06:01:55.321563Z
46d11fefb8b36884e8d934a99ab5fb0b
2009-12-14T02:42:18.232982Z
155205
danglin
@@ -126,7 +126,7 @@ aph
19820
19978
hpux32.S
file
@@ -134,7 +134,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.321563Z
f3279dc3ee2648b08c274f2457d17660
2009-06-04T15:43:03.499507Z
148172

View File

@@ -492,6 +492,13 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
avalue[i] = (void *)(stack - slot);
break;
#ifdef PA_HPUX
case FFI_TYPE_LONGDOUBLE:
/* Long doubles are treated like a big structure. */
avalue[i] = (void *) *(stack - slot);
break;
#endif
case FFI_TYPE_STRUCT:
/* Structs smaller or equal than 4 bytes are passed in one
register. Structs smaller or equal 8 bytes are passed in two

View File

@@ -492,6 +492,13 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
avalue[i] = (void *)(stack - slot);
break;
#ifdef PA_HPUX
case FFI_TYPE_LONGDOUBLE:
/* Long doubles are treated like a big structure. */
avalue[i] = (void *) *(stack - slot);
break;
#endif
case FFI_TYPE_STRUCT:
/* Structs smaller or equal than 4 bytes are passed in one
register. Structs smaller or equal 8 bytes are passed in two

View File

@@ -1,15 +1,15 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/powerpc
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/powerpc
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-06-16T17:55:39.375944Z
148543
andreast
2009-12-08T00:41:10.883117Z
155070
dje
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:00.000000Z
2009-12-20T06:01:53.728555Z
688696f2414aa7866b7c92c8684718d4
2009-06-04T15:43:03.499507Z
148172
@@ -66,7 +66,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:53.729555Z
31cb78f1f10503180bd8dc1ea0076ad1
2005-03-24T00:45:38.000000Z
96967
@@ -100,11 +100,11 @@ file
2009-06-10T05:25:00.000000Z
b12a0e2e6ad83a41d1e1dd9eecb4141f
2009-06-04T15:11:12.475454Z
148171
aph
2009-12-20T06:01:53.729555Z
c07a6ebc629ba19daac8e64861b671e8
2009-11-30T23:34:33.372904Z
154855
dje
@@ -126,7 +126,7 @@ aph
3517
3697
aix.S
file
@@ -134,11 +134,11 @@ file
2009-04-24T17:46:15.000000Z
d23701ff3a05628dde1d8c18d2911662
2004-09-02T21:07:21.000000Z
86991
andreast
2009-12-20T06:01:53.729555Z
60858f5d753b23d596681fe4550557da
2009-12-05T21:48:58.742742Z
155016
dje
@@ -160,7 +160,7 @@ andreast
4763
6635
darwin.S
file
@@ -168,7 +168,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:53.729555Z
24ade1d97acb5fb9f4033f7266b5cede
2005-03-24T00:45:38.000000Z
96967
@@ -202,7 +202,7 @@ file
2009-06-20T15:53:35.000000Z
2009-12-20T06:01:53.730558Z
5e33e72fe5ecabf0a89cf4d5227cb1ca
2009-06-16T17:55:39.375944Z
148543
@@ -236,7 +236,7 @@ file
2009-06-20T15:53:35.000000Z
2009-12-20T06:01:53.730558Z
53da07be3982ee6cf80c7938c77e8ef7
2009-06-16T17:55:39.375944Z
148543
@@ -270,7 +270,7 @@ file
2009-04-24T17:46:15.000000Z
2009-12-20T06:01:53.730558Z
41549f68aeedd29e849159d4567ede07
2004-09-02T21:07:21.000000Z
86991
@@ -304,7 +304,7 @@ file
2009-06-10T05:25:00.000000Z
2009-12-20T06:01:53.730558Z
6fcea235a139c24a1ce2f1648875b50e
2009-06-04T15:43:03.499507Z
148172
@@ -338,11 +338,11 @@ file
2009-06-10T05:25:00.000000Z
99c864cc939078110592da3cedda290f
2009-06-04T15:43:03.499507Z
148172
aph
2009-12-20T06:01:53.730558Z
060e5d94c60a73470ae84eefddd59be0
2009-12-04T15:36:50.057287Z
154983
dje
@@ -364,7 +364,7 @@ aph
23367
24973
linux64.S
file
@@ -372,7 +372,7 @@ file
2009-06-10T05:25:00.000000Z
2009-12-20T06:01:53.731563Z
a7d09aad6ca2eb4358d7ad4bca4fdd7e
2009-06-04T15:43:03.499507Z
148172
@@ -406,11 +406,11 @@ file
2009-04-24T17:46:15.000000Z
049e042e968b560f48689cfc881d2db6
2004-09-02T21:07:21.000000Z
86991
andreast
2009-12-20T06:01:53.731563Z
8207431267046ac40ba651b36022b895
2009-12-08T00:41:10.883117Z
155070
dje
@@ -432,5 +432,5 @@ andreast
5613
8985

View File

@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
aix.S - Copyright (c) 2002 Free Software Foundation, Inc.
aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
based on darwin.S by John Hornkvist
PowerPC Assembly glue.
@@ -86,9 +86,13 @@
#define L(x) x
.file "aix.S"
.toc
.csect .text[PR]
.align 2
.globl ffi_prep_args
/* void ffi_call_AIX(extended_cif *ecif, unsigned long bytes,
* unsigned int flags, unsigned int *rvalue,
* void (*fn)(),
* void (*prep_args)(extended_cif*, unsigned *const));
* r3=ecif, r4=bytes, r5=flags, r6=rvalue, r7=fn, r8=prep_args
*/
.csect .text[PR]
.align 2
@@ -96,61 +100,151 @@
.globl .ffi_call_AIX
.csect ffi_call_AIX[DS]
ffi_call_AIX:
#ifdef __64BIT__
.llong .ffi_call_AIX, TOC[tc0], 0
.csect .text[PR]
.ffi_call_AIX:
/* Save registers we use. */
mflr r0
std r28,-32(r1)
std r29,-24(r1)
std r30,-16(r1)
std r31, -8(r1)
std r0, 16(r1)
mr r28, r1 /* our AP. */
stdux r1, r1, r4
/* Save arguments over call... */
mr r31, r5 /* flags, */
mr r30, r6 /* rvalue, */
mr r29, r7 /* function address. */
std r2, 40(r1)
/* Call ffi_prep_args. */
mr r4, r1
bl .ffi_prep_args
/* Now do the call. */
ld r0, 0(r29)
ld r2, 8(r29)
ld r11, 16(r29)
/* Set up cr1 with bits 4-7 of the flags. */
mtcrf 0x40, r31
mtctr r0
/* Load all those argument registers. */
// We have set up a nice stack frame, just load it into registers.
ld r3, 40+(1*8)(r1)
ld r4, 40+(2*8)(r1)
ld r5, 40+(3*8)(r1)
ld r6, 40+(4*8)(r1)
nop
ld r7, 40+(5*8)(r1)
ld r8, 40+(6*8)(r1)
ld r9, 40+(7*8)(r1)
ld r10,40+(8*8)(r1)
L1:
/* Load all the FP registers. */
bf 6,L2 // 2f + 0x18
lfd f1,-32-(13*8)(r28)
lfd f2,-32-(12*8)(r28)
lfd f3,-32-(11*8)(r28)
lfd f4,-32-(10*8)(r28)
nop
lfd f5,-32-(9*8)(r28)
lfd f6,-32-(8*8)(r28)
lfd f7,-32-(7*8)(r28)
lfd f8,-32-(6*8)(r28)
nop
lfd f9,-32-(5*8)(r28)
lfd f10,-32-(4*8)(r28)
lfd f11,-32-(3*8)(r28)
lfd f12,-32-(2*8)(r28)
nop
lfd f13,-32-(1*8)(r28)
L2:
/* Make the call. */
bctrl
ld r2, 40(r1)
/* Now, deal with the return value. */
mtcrf 0x01, r31
bt 30, L(done_return_value)
bt 29, L(fp_return_value)
std r3, 0(r30)
/* Fall through... */
L(done_return_value):
/* Restore the registers we used and return. */
mr r1, r28
ld r0, 16(r28)
ld r28, -32(r1)
mtlr r0
ld r29, -24(r1)
ld r30, -16(r1)
ld r31, -8(r1)
blr
L(fp_return_value):
bf 28, L(float_return_value)
stfd f1, 0(r30)
bf 31, L(done_return_value)
stfd f2, 8(r30)
b L(done_return_value)
L(float_return_value):
stfs f1, 0(r30)
b L(done_return_value)
#else /* ! __64BIT__ */
.long .ffi_call_AIX, TOC[tc0], 0
.csect .text[PR]
.ffi_call_AIX:
mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
/* Save the old stack pointer as AP. */
mr r8,r1
/* Allocate the stack space we need. */
stwux r1,r1,r4
/* Save registers we use. */
mflr r9
mflr r0
stw r28,-16(r8)
stw r29,-12(r8)
stw r30, -8(r8)
stw r31, -4(r8)
stw r28,-16(r1)
stw r29,-12(r1)
stw r30, -8(r1)
stw r31, -4(r1)
stw r9, 8(r8)
stw r2, 20(r1)
stw r0, 8(r1)
mr r28, r1 /* out AP. */
stwux r1, r1, r4
/* Save arguments over call... */
mr r31,r5 /* flags, */
mr r30,r6 /* rvalue, */
mr r29,r7 /* function address, */
mr r28,r8 /* our AP. */
mr r31, r5 /* flags, */
mr r30, r6 /* rvalue, */
mr r29, r7 /* function address, */
stw r2, 20(r1)
/* Call ffi_prep_args. */
mr r4,r1
li r9,0
lwz r2,4(r12)
lwz r12,0(r12)
mtctr r12 // r12 holds address of _ffi_prep_args
bctrl
lwz r2,20(r1)
mr r4, r1
bl .ffi_prep_args
/* Now do the call. */
lwz r12,0(r29)
lwz r0, 0(r29)
lwz r2, 4(r29)
lwz r11, 8(r29)
/* Set up cr1 with bits 4-7 of the flags. */
mtcrf 0x40,r31
stw r2,20(r1)
mtctr r12
lwz r2,4(r29)
mtcrf 0x40, r31
mtctr r0
/* Load all those argument registers. */
// We have set up a nice stack frame, just load it into registers.
lwz r3, 20+(1*4)(r1)
lwz r4, 20+(2*4)(r1)
lwz r5, 20+(3*4)(r1)
lwz r6, 20+(4*4)(r1)
lwz r3, 20+(1*4)(r1)
lwz r4, 20+(2*4)(r1)
lwz r5, 20+(3*4)(r1)
lwz r6, 20+(4*4)(r1)
nop
lwz r7, 20+(5*4)(r1)
lwz r8, 20+(6*4)(r1)
lwz r9, 20+(7*4)(r1)
lwz r10,20+(8*4)(r1)
lwz r7, 20+(5*4)(r1)
lwz r8, 20+(6*4)(r1)
lwz r9, 20+(7*4)(r1)
lwz r10,20+(8*4)(r1)
L1:
/* Load all the FP registers. */
@@ -165,47 +259,48 @@ L1:
lfd f7,-16-(7*8)(r28)
lfd f8,-16-(6*8)(r28)
nop
lfd f9,-16-(5*8)(r28)
lfd f10,-16-(4*8)(r28)
lfd f11,-16-(3*8)(r28)
lfd f12,-16-(2*8)(r28)
lfd f9,-16-(5*8)(r28)
lfd f10,-16-(4*8)(r28)
lfd f11,-16-(3*8)(r28)
lfd f12,-16-(2*8)(r28)
nop
lfd f13,-16-(1*8)(r28)
lfd f13,-16-(1*8)(r28)
L2:
/* Make the call. */
bctrl
lwz r2,20(r1)
lwz r2, 20(r1)
/* Now, deal with the return value. */
mtcrf 0x01,r31
mtcrf 0x01, r31
bt 30,L(done_return_value)
bt 29,L(fp_return_value)
stw r3,0(r30)
bf 28,L(done_return_value)
stw r4,4(r30)
bt 30, L(done_return_value)
bt 29, L(fp_return_value)
stw r3, 0(r30)
bf 28, L(done_return_value)
stw r4, 4(r30)
/* Fall through... */
L(done_return_value):
/* Restore the registers we used and return. */
lwz r9, 8(r28)
lwz r31, -4(r28)
mtlr r9
lwz r30, -8(r28)
lwz r29,-12(r28)
lwz r28,-16(r28)
lwz r1,0(r1)
mr r1, r28
lwz r0, 8(r28)
lwz r28,-16(r1)
mtlr r0
lwz r29,-12(r1)
lwz r30, -8(r1)
lwz r31, -4(r1)
blr
L(fp_return_value):
bf 28,L(float_return_value)
stfd f1,0(r30)
bf 28, L(float_return_value)
stfd f1, 0(r30)
b L(done_return_value)
L(float_return_value):
stfs f1,0(r30)
stfs f1, 0(r30)
b L(done_return_value)
#endif
.long 0
.byte 0,0,0,1,128,4,0,0
//END(ffi_call_AIX)
@@ -216,7 +311,11 @@ L(float_return_value):
.globl .ffi_call_DARWIN
.csect ffi_call_DARWIN[DS]
ffi_call_DARWIN:
#ifdef __64BIT__
.llong .ffi_call_DARWIN, TOC[tc0], 0
#else
.long .ffi_call_DARWIN, TOC[tc0], 0
#endif
.csect .text[PR]
.ffi_call_DARWIN:
blr

View File

@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
aix_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc.
aix_closure.S - Copyright (c) 2002, 2003, 2009 Free Software Foundation, Inc.
based on darwin_closure.S
PowerPC Assembly glue.
@@ -94,65 +94,66 @@ LC..60:
.globl ffi_closure_ASM
.globl .ffi_closure_ASM
.csect ffi_closure_ASM[DS]
ffi_closure_ASM:
.long .ffi_closure_ASM, TOC[tc0], 0
#ifdef __64BIT__
.llong .ffi_closure_ASM, TOC[tc0], 0
.csect .text[PR]
.ffi_closure_ASM:
mflr r0 /* extract return address */
stw r0, 8(r1) /* save the return address */
/* 24 Bytes (Linkage Area) */
/* 32 Bytes (params) */
/* 104 Bytes (13*8 from FPR) */
/* 8 Bytes (result) */
/* 168 Bytes */
stwu r1,-176(r1) /* skip over caller save area
keep stack aligned to 16 */
/* we want to build up an area for the parameters passed */
/* in registers (both floating point and integer) */
/* we store gpr 3 to gpr 10 (aligned to 4)
in the parents outgoing area */
stw r3, 200(r1)
stw r4, 204(r1)
stw r5, 208(r1)
stw r6, 212(r1)
stw r7, 216(r1)
stw r8, 220(r1)
stw r9, 224(r1)
stw r10, 228(r1)
std r3, 48+(0*8)(r1)
std r4, 48+(1*8)(r1)
std r5, 48+(2*8)(r1)
std r6, 48+(3*8)(r1)
mflr r0
std r7, 48+(4*8)(r1)
std r8, 48+(5*8)(r1)
std r9, 48+(6*8)(r1)
std r10, 48+(7*8)(r1)
std r0, 16(r1) /* save the return address */
/* 48 Bytes (Linkage Area) */
/* 64 Bytes (params) */
/* 16 Bytes (result) */
/* 104 Bytes (13*8 from FPR) */
/* 8 Bytes (alignment) */
/* 240 Bytes */
stdu r1, -240(r1) /* skip over caller save area
keep stack aligned to 16 */
/* next save fpr 1 to fpr 13 (aligned to 8) */
stfd f1, 56(r1)
stfd f2, 64(r1)
stfd f3, 72(r1)
stfd f4, 80(r1)
stfd f5, 88(r1)
stfd f6, 96(r1)
stfd f7, 104(r1)
stfd f8, 112(r1)
stfd f9, 120(r1)
stfd f10, 128(r1)
stfd f11, 136(r1)
stfd f12, 144(r1)
stfd f13, 152(r1)
stfd f1, 128+(0*8)(r1)
stfd f2, 128+(1*8)(r1)
stfd f3, 128+(2*8)(r1)
stfd f4, 128+(3*8)(r1)
stfd f5, 128+(4*8)(r1)
stfd f6, 128+(5*8)(r1)
stfd f7, 128+(6*8)(r1)
stfd f8, 128+(7*8)(r1)
stfd f9, 128+(8*8)(r1)
stfd f10, 128+(9*8)(r1)
stfd f11, 128+(10*8)(r1)
stfd f12, 128+(11*8)(r1)
stfd f13, 128+(12*8)(r1)
/* set up registers for the routine that actually does the work */
/* get the context pointer from the trampoline */
mr r3,r11
mr r3, r11
/* now load up the pointer to the result storage */
addi r4,r1,160
addi r4, r1, 112
/* now load up the pointer to the saved gpr registers */
addi r5,r1,200
addi r5, r1, 288
/* now load up the pointer to the saved fpr registers */
addi r6,r1,56
addi r6, r1, 128
/* make the call */
bl .ffi_closure_helper_DARWIN
@@ -164,84 +165,279 @@ ffi_closure_ASM:
/* look up the proper starting point in table */
/* by using return type as offset */
addi r5,r1,160 /* get pointer to results area */
lwz r4,LC..60(2) /* get address of jump table */
slwi r3,r3,2 /* now multiply return type by 4 */
lwzx r3,r4,r3 /* get the contents of that table value */
add r3,r3,r4 /* add contents of table to table address */
mtctr r3
ld r4, LC..60(2) /* get address of jump table */
sldi r3, r3, 4 /* now multiply return type by 16 */
ld r0, 240+16(r1) /* load return address */
add r3, r3, r4 /* add contents of table to table address */
mtctr r3
bctr /* jump to it */
/* Each fragment must be exactly 16 bytes long (4 instructions).
Align to 16 byte boundary for cache and dispatch efficiency. */
.align 4
L..60:
.long L..44-L..60 /* FFI_TYPE_VOID */
.long L..50-L..60 /* FFI_TYPE_INT */
.long L..47-L..60 /* FFI_TYPE_FLOAT */
.long L..46-L..60 /* FFI_TYPE_DOUBLE */
.long L..46-L..60 /* FFI_TYPE_LONGDOUBLE */
.long L..56-L..60 /* FFI_TYPE_UINT8 */
.long L..55-L..60 /* FFI_TYPE_SINT8 */
.long L..58-L..60 /* FFI_TYPE_UINT16 */
.long L..57-L..60 /* FFI_TYPE_SINT16 */
.long L..50-L..60 /* FFI_TYPE_UINT32 */
.long L..50-L..60 /* FFI_TYPE_SINT32 */
.long L..48-L..60 /* FFI_TYPE_UINT64 */
.long L..48-L..60 /* FFI_TYPE_SINT64 */
.long L..44-L..60 /* FFI_TYPE_STRUCT */
.long L..50-L..60 /* FFI_TYPE_POINTER */
/* case FFI_TYPE_VOID */
mtlr r0
addi r1, r1, 240
blr
nop
/* case double */
L..46:
lfd f1,0(r5)
b L..44
/* case float */
L..47:
lfs f1,0(r5)
b L..44
/* case long long */
L..48:
lwz r3,0(r5)
lwz r4,4(r5)
b L..44
/* case default / int32 / pointer */
L..50:
lwz r3,0(r5)
b L..44
/* case signed int8 */
L..55:
addi r5,r5,3
lbz r3,0(r5)
slwi r3,r3,24
srawi r3,r3,24
b L..44
/* case unsigned int8 */
L..56:
addi r5,r5,3
lbz r3,0(r5)
b L..44
/* case signed int16 */
L..57:
addi r5,r5,2
lhz r3,0(r5)
extsh r3,r3
b L..44
/* case unsigned int16 */
L..58:
addi r5,r5,2
lhz r3,0(r5)
/* case void / done */
L..44:
addi r1,r1,176 /* restore stack pointer */
lwz r0,8(r1) /* get return address */
mtlr r0 /* reset link register */
/* case FFI_TYPE_INT */
lwa r3, 112+4(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_FLOAT */
lfs f1, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_DOUBLE */
lfd f1, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_LONGDOUBLE */
lfd f1, 112+0(r1)
mtlr r0
lfd f2, 112+8(r1)
b L..finish
/* case FFI_TYPE_UINT8 */
lbz r3, 112+7(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT8 */
lbz r3, 112+7(r1)
mtlr r0
extsb r3, r3
b L..finish
/* case FFI_TYPE_UINT16 */
lhz r3, 112+6(r1)
mtlr r0
L..finish:
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT16 */
lha r3, 112+6(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_UINT32 */
lwz r3, 112+4(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT32 */
lwa r3, 112+4(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_UINT64 */
ld r3, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT64 */
ld r3, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_STRUCT */
mtlr r0
addi r1, r1, 240
blr
nop
/* case FFI_TYPE_POINTER */
ld r3, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
#else /* ! __64BIT__ */
.long .ffi_closure_ASM, TOC[tc0], 0
.csect .text[PR]
.ffi_closure_ASM:
/* we want to build up an area for the parameters passed */
/* in registers (both floating point and integer) */
/* we store gpr 3 to gpr 10 (aligned to 4)
in the parents outgoing area */
stw r3, 24+(0*4)(r1)
stw r4, 24+(1*4)(r1)
stw r5, 24+(2*4)(r1)
stw r6, 24+(3*4)(r1)
mflr r0
stw r7, 24+(4*4)(r1)
stw r8, 24+(5*4)(r1)
stw r9, 24+(6*4)(r1)
stw r10, 24+(7*4)(r1)
stw r0, 8(r1)
/* 24 Bytes (Linkage Area) */
/* 32 Bytes (params) */
/* 16 Bytes (result) */
/* 104 Bytes (13*8 from FPR) */
/* 176 Bytes */
stwu r1, -176(r1) /* skip over caller save area
keep stack aligned to 16 */
/* next save fpr 1 to fpr 13 (aligned to 8) */
stfd f1, 72+(0*8)(r1)
stfd f2, 72+(1*8)(r1)
stfd f3, 72+(2*8)(r1)
stfd f4, 72+(3*8)(r1)
stfd f5, 72+(4*8)(r1)
stfd f6, 72+(5*8)(r1)
stfd f7, 72+(6*8)(r1)
stfd f8, 72+(7*8)(r1)
stfd f9, 72+(8*8)(r1)
stfd f10, 72+(9*8)(r1)
stfd f11, 72+(10*8)(r1)
stfd f12, 72+(11*8)(r1)
stfd f13, 72+(12*8)(r1)
/* set up registers for the routine that actually does the work */
/* get the context pointer from the trampoline */
mr r3, r11
/* now load up the pointer to the result storage */
addi r4, r1, 56
/* now load up the pointer to the saved gpr registers */
addi r5, r1, 200
/* now load up the pointer to the saved fpr registers */
addi r6, r1, 72
/* make the call */
bl .ffi_closure_helper_DARWIN
nop
/* now r3 contains the return type */
/* so use it to look up in a table */
/* so we know how to deal with each type */
/* look up the proper starting point in table */
/* by using return type as offset */
lwz r4, LC..60(2) /* get address of jump table */
slwi r3, r3, 4 /* now multiply return type by 4 */
lwz r0, 176+8(r1) /* load return address */
add r3, r3, r4 /* add contents of table to table address */
mtctr r3
bctr /* jump to it */
/* Each fragment must be exactly 16 bytes long (4 instructions).
Align to 16 byte boundary for cache and dispatch efficiency. */
.align 4
L..60:
/* case FFI_TYPE_VOID */
mtlr r0
addi r1, r1, 176
blr
nop
/* case FFI_TYPE_INT */
lwz r3, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_FLOAT */
lfs f1, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_DOUBLE */
lfd f1, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_LONGDOUBLE */
lfd f1, 56+0(r1)
mtlr r0
lfd f2, 56+8(r1)
b L..finish
/* case FFI_TYPE_UINT8 */
lbz r3, 56+3(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_SINT8 */
lbz r3, 56+3(r1)
mtlr r0
extsb r3, r3
b L..finish
/* case FFI_TYPE_UINT16 */
lhz r3, 56+2(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_SINT16 */
lha r3, 56+2(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_UINT32 */
lwz r3, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_SINT32 */
lwz r3, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_UINT64 */
lwz r3, 56+0(r1)
mtlr r0
lwz r4, 56+4(r1)
b L..finish
/* case FFI_TYPE_SINT64 */
lwz r3, 56+0(r1)
mtlr r0
lwz r4, 56+4(r1)
b L..finish
/* case FFI_TYPE_STRUCT */
mtlr r0
addi r1, r1, 176
blr
nop
/* case FFI_TYPE_POINTER */
lwz r3, 56+0(r1)
mtlr r0
L..finish:
addi r1, r1, 176
blr
#endif
/* END(ffi_closure_ASM) */

View File

@@ -3,7 +3,7 @@
Copyright (C) 1998 Geoffrey Keating
Copyright (C) 2001 John Hornkvist
Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2002, 2006, 2007, 2009 Free Software Foundation, Inc.
FFI support for Darwin and AIX.
@@ -80,34 +80,34 @@ enum { ASM_NEEDS_REGISTERS = 4 };
*/
void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
{
const unsigned bytes = ecif->cif->bytes;
const unsigned flags = ecif->cif->flags;
/* 'stacktop' points at the previous backchain pointer. */
unsigned *const stacktop = stack + (bytes / sizeof(unsigned));
unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long));
/* 'fpr_base' points at the space for fpr1, and grows upwards as
we use FPR registers. */
double *fpr_base = (double*) (stacktop - ASM_NEEDS_REGISTERS) - NUM_FPR_ARG_REGISTERS;
double *fpr_base = (double *) (stacktop - ASM_NEEDS_REGISTERS) - NUM_FPR_ARG_REGISTERS;
int fparg_count = 0;
/* 'next_arg' grows up as we put parameters in it. */
unsigned *next_arg = stack + 6; /* 6 reserved positions. */
unsigned long *next_arg = stack + 6; /* 6 reserved positions. */
int i = ecif->cif->nargs;
int i;
double double_tmp;
void **p_argv = ecif->avalue;
unsigned gprvalue;
unsigned long gprvalue;
ffi_type** ptr = ecif->cif->arg_types;
char *dest_cpy;
unsigned size_al = 0;
/* Check that everything starts aligned properly. */
FFI_ASSERT(((unsigned)(char *)stack & 0xF) == 0);
FFI_ASSERT(((unsigned)(char *)stacktop & 0xF) == 0);
FFI_ASSERT(((unsigned) (char *) stack & 0xF) == 0);
FFI_ASSERT(((unsigned) (char *) stacktop & 0xF) == 0);
FFI_ASSERT((bytes & 0xF) == 0);
/* Deal with return values that are actually pass-by-reference.
@@ -115,12 +115,10 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
Return values are referenced by r3, so r4 is the first parameter. */
if (flags & FLAG_RETVAL_REFERENCE)
*next_arg++ = (unsigned)(char *)ecif->rvalue;
*next_arg++ = (unsigned long) (char *) ecif->rvalue;
/* Now for the arguments. */
for (;
i > 0;
i--, ptr++, p_argv++)
for (i = ecif->cif->nargs; i > 0; i--, ptr++, p_argv++)
{
switch ((*ptr)->type)
{
@@ -128,7 +126,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
purpose registers are filled, the corresponding GPRs that match
the size of the floating-point parameter are skipped. */
case FFI_TYPE_FLOAT:
double_tmp = *(float *)*p_argv;
double_tmp = *(float *) *p_argv;
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
else
@@ -139,12 +137,16 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
break;
case FFI_TYPE_DOUBLE:
double_tmp = *(double *)*p_argv;
double_tmp = *(double *) *p_argv;
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
else
*fpr_base++ = double_tmp;
#ifdef POWERPC64
next_arg++;
#else
next_arg += 2;
#endif
fparg_count++;
FFI_ASSERT(flags & FLAG_FP_ARGUMENTS);
break;
@@ -152,42 +154,71 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
double_tmp = ((double *)*p_argv)[0];
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
#ifdef POWERPC64
if (fparg_count < NUM_FPR_ARG_REGISTERS)
*(long double *) fpr_base++ = *(long double *) *p_argv;
else
*(long double *) next_arg = *(long double *) *p_argv;
next_arg += 2;
fparg_count += 2;
#else
double_tmp = ((double *) *p_argv)[0];
if (fparg_count < NUM_FPR_ARG_REGISTERS)
*fpr_base++ = double_tmp;
else
*(double *) next_arg = double_tmp;
next_arg += 2;
fparg_count++;
double_tmp = ((double *)*p_argv)[1];
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
else
double_tmp = ((double *) *p_argv)[1];
if (fparg_count < NUM_FPR_ARG_REGISTERS)
*fpr_base++ = double_tmp;
else
*(double *) next_arg = double_tmp;
next_arg += 2;
fparg_count++;
#endif
FFI_ASSERT(flags & FLAG_FP_ARGUMENTS);
break;
#endif
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
*(long long *)next_arg = *(long long *)*p_argv;
next_arg+=2;
#ifdef POWERPC64
gprvalue = *(long long *) *p_argv;
goto putgpr;
#else
*(long long *) next_arg = *(long long *) *p_argv;
next_arg += 2;
#endif
break;
case FFI_TYPE_POINTER:
gprvalue = *(unsigned long *) *p_argv;
goto putgpr;
case FFI_TYPE_UINT8:
gprvalue = *(unsigned char *)*p_argv;
gprvalue = *(unsigned char *) *p_argv;
goto putgpr;
case FFI_TYPE_SINT8:
gprvalue = *(signed char *)*p_argv;
gprvalue = *(signed char *) *p_argv;
goto putgpr;
case FFI_TYPE_UINT16:
gprvalue = *(unsigned short *)*p_argv;
gprvalue = *(unsigned short *) *p_argv;
goto putgpr;
case FFI_TYPE_SINT16:
gprvalue = *(signed short *)*p_argv;
gprvalue = *(signed short *) *p_argv;
goto putgpr;
case FFI_TYPE_STRUCT:
#ifdef POWERPC64
dest_cpy = (char *) next_arg;
size_al = (*ptr)->size;
if ((*ptr)->elements[0]->type == 3)
size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN)
dest_cpy += 4 - size_al;
memcpy ((char *) dest_cpy, (char *) *p_argv, size_al);
next_arg += (size_al + 7) / 8;
#else
dest_cpy = (char *) next_arg;
/* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
@@ -195,22 +226,24 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
Structures with 3 byte in size are padded upwards. */
size_al = (*ptr)->size;
/* If the first member of the struct is a double, then align
the struct to double-word.
Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */
if ((*ptr)->elements[0]->type == 3)
the struct to double-word. */
if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN)
dest_cpy += 4 - size_al;
memcpy((char *)dest_cpy, (char *)*p_argv, size_al);
memcpy((char *) dest_cpy, (char *) *p_argv, size_al);
next_arg += (size_al + 3) / 4;
#endif
break;
case FFI_TYPE_INT:
case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32:
case FFI_TYPE_POINTER:
gprvalue = *(unsigned *)*p_argv;
gprvalue = *(signed int *) *p_argv;
goto putgpr;
case FFI_TYPE_UINT32:
gprvalue = *(unsigned int *) *p_argv;
putgpr:
*next_arg++ = gprvalue;
break;
@@ -324,6 +357,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
#ifdef POWERPC64
case FFI_TYPE_POINTER:
#endif
flags |= FLAG_RETURNS_64BITS;
break;
@@ -387,11 +423,14 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
case FFI_TYPE_STRUCT:
size_al = (*ptr)->size;
/* If the first member of the struct is a double, then align
the struct to double-word.
Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */
if ((*ptr)->elements[0]->type == 3)
the struct to double-word. */
if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN((*ptr)->size, 8);
#ifdef POWERPC64
intarg_count += (size_al + 7) / 8;
#else
intarg_count += (size_al + 3) / 4;
#endif
break;
default:
@@ -410,8 +449,13 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
bytes += NUM_FPR_ARG_REGISTERS * sizeof(double);
/* Stack space. */
#ifdef POWERPC64
if ((intarg_count + fparg_count) > NUM_GPR_ARG_REGISTERS)
bytes += (intarg_count + fparg_count) * sizeof(long);
#else
if ((intarg_count + 2 * fparg_count) > NUM_GPR_ARG_REGISTERS)
bytes += (intarg_count + 2 * fparg_count) * sizeof(long);
#endif
else
bytes += NUM_GPR_ARG_REGISTERS * sizeof(long);
@@ -424,9 +468,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK;
}
extern void ffi_call_AIX(extended_cif *, unsigned, unsigned, unsigned *,
extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
void (*fn)(void), void (*fn2)(void));
extern void ffi_call_DARWIN(extended_cif *, unsigned, unsigned, unsigned *,
extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
void (*fn)(void), void (*fn2)(void));
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
@@ -450,11 +494,11 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
switch (cif->abi)
{
case FFI_AIX:
ffi_call_AIX(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_call_AIX(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_prep_args);
break;
case FFI_DARWIN:
ffi_call_DARWIN(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_call_DARWIN(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_prep_args);
break;
default:
@@ -645,26 +689,19 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
void ** avalue;
ffi_type ** arg_types;
long i, avn;
long nf; /* number of floating registers already used. */
long ng; /* number of general registers already used. */
ffi_cif * cif;
double temp;
ffi_dblfl * end_pfr = pfr + NUM_FPR_ARG_REGISTERS;
unsigned size_al;
union ldu temp_ld;
cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *));
nf = 0;
ng = 0;
/* Copy the caller's structure return value address so that the closure
returns the data directly to the caller. */
if (cif->rtype->type == FFI_TYPE_STRUCT)
{
rvalue = (void *) *pgr;
pgr++;
ng++;
}
i = 0;
@@ -678,58 +715,82 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
{
case FFI_TYPE_SINT8:
case FFI_TYPE_UINT8:
#ifdef POWERPC64
avalue[i] = (char *) pgr + 7;
#else
avalue[i] = (char *) pgr + 3;
ng++;
#endif
pgr++;
break;
case FFI_TYPE_SINT16:
case FFI_TYPE_UINT16:
#ifdef POWERPC64
avalue[i] = (char *) pgr + 6;
#else
avalue[i] = (char *) pgr + 2;
ng++;
#endif
pgr++;
break;
case FFI_TYPE_SINT32:
case FFI_TYPE_UINT32:
#ifdef POWERPC64
avalue[i] = (char *) pgr + 4;
#else
case FFI_TYPE_POINTER:
avalue[i] = pgr;
ng++;
#endif
pgr++;
break;
case FFI_TYPE_STRUCT:
#ifdef POWERPC64
size_al = arg_types[i]->size;
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN (arg_types[i]->size, 8);
if (size_al < 3 && cif->abi == FFI_DARWIN)
avalue[i] = (void *) pgr + 8 - size_al;
else
avalue[i] = (void *) pgr;
pgr += (size_al + 7) / 8;
#else
/* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
SI 4 bytes) are aligned as if they were those modes. */
size_al = arg_types[i]->size;
/* If the first member of the struct is a double, then align
the struct to double-word.
Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */
if (arg_types[i]->elements[0]->type == 3)
the struct to double-word. */
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN(arg_types[i]->size, 8);
if (size_al < 3 && cif->abi == FFI_DARWIN)
avalue[i] = (void*) pgr + 4 - size_al;
else
avalue[i] = (void*) pgr;
ng += (size_al + 3) / 4;
pgr += (size_al + 3) / 4;
#endif
break;
case FFI_TYPE_SINT64:
case FFI_TYPE_UINT64:
#ifdef POWERPC64
case FFI_TYPE_POINTER:
avalue[i] = pgr;
pgr++;
break;
#else
/* Long long ints are passed in two gpr's. */
avalue[i] = pgr;
ng += 2;
pgr += 2;
break;
#endif
case FFI_TYPE_FLOAT:
/* A float value consumes a GPR.
There are 13 64bit floating point registers. */
if (nf < NUM_FPR_ARG_REGISTERS)
if (pfr < end_pfr)
{
temp = pfr->d;
pfr->f = (float)temp;
double temp = pfr->d;
pfr->f = (float) temp;
avalue[i] = pfr;
pfr++;
}
@@ -737,15 +798,13 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
{
avalue[i] = pgr;
}
nf++;
ng++;
pgr++;
break;
case FFI_TYPE_DOUBLE:
/* A double value consumes two GPRs.
There are 13 64bit floating point registers. */
if (nf < NUM_FPR_ARG_REGISTERS)
if (pfr < end_pfr)
{
avalue[i] = pfr;
pfr++;
@@ -754,17 +813,36 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
{
avalue[i] = pgr;
}
nf++;
ng += 2;
#ifdef POWERPC64
pgr++;
#else
pgr += 2;
#endif
break;
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
#ifdef POWERPC64
if (pfr + 1 < end_pfr)
{
avalue[i] = pfr;
pfr += 2;
}
else
{
if (pfr < end_pfr)
{
*pgr = *(unsigned long *) pfr;
pfr++;
}
avalue[i] = pgr;
}
pgr += 2;
#else /* POWERPC64 */
/* A long double value consumes four GPRs and two FPRs.
There are 13 64bit floating point registers. */
if (nf < NUM_FPR_ARG_REGISTERS - 1)
if (pfr + 1 < end_pfr)
{
avalue[i] = pfr;
pfr += 2;
@@ -772,19 +850,20 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
/* Here we have the situation where one part of the long double
is stored in fpr13 and the other part is already on the stack.
We use a union to pass the long double to avalue[i]. */
else if (nf == NUM_FPR_ARG_REGISTERS - 1)
else if (pfr + 1 == end_pfr)
{
union ldu temp_ld;
memcpy (&temp_ld.lb[0], pfr, sizeof(ldbits));
memcpy (&temp_ld.lb[1], pgr + 2, sizeof(ldbits));
avalue[i] = &temp_ld.ld;
pfr++;
}
else
{
avalue[i] = pgr;
}
nf += 2;
ng += 4;
pgr += 4;
#endif /* POWERPC64 */
break;
#endif
default:

View File

@@ -30,7 +30,11 @@
/* ---- System specific configurations ----------------------------------- */
#if defined (POWERPC) && defined (__powerpc64__)
#if defined (POWERPC) && defined (__powerpc64__) /* linux64 */
#define POWERPC64
#elif defined (POWERPC_DARWIN) && defined (__ppc64__) /* Darwin */
#define POWERPC64
#elif defined (POWERPC_AIX) && defined (__64BIT__) /* AIX64 */
#define POWERPC64
#endif

View File

@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
aix.S - Copyright (c) 2002 Free Software Foundation, Inc.
aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
based on darwin.S by John Hornkvist
PowerPC Assembly glue.
@@ -86,9 +86,13 @@
#define L(x) x
.file "aix.S"
.toc
.csect .text[PR]
.align 2
.globl ffi_prep_args
/* void ffi_call_AIX(extended_cif *ecif, unsigned long bytes,
* unsigned int flags, unsigned int *rvalue,
* void (*fn)(),
* void (*prep_args)(extended_cif*, unsigned *const));
* r3=ecif, r4=bytes, r5=flags, r6=rvalue, r7=fn, r8=prep_args
*/
.csect .text[PR]
.align 2
@@ -96,65 +100,151 @@
.globl .ffi_call_AIX
.csect ffi_call_AIX[DS]
ffi_call_AIX:
#if defined(_ARCH_PPC64)
#ifdef __64BIT__
.llong .ffi_call_AIX, TOC[tc0], 0
#else
.long .ffi_call_AIX, TOC[tc0], 0
#endif
.csect .text[PR]
.csect .text[PR]
.ffi_call_AIX:
mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
/* Save the old stack pointer as AP. */
mr r8,r1
/* Allocate the stack space we need. */
stwux r1,r1,r4
/* Save registers we use. */
mflr r9
mflr r0
stw r28,-16(r8)
stw r29,-12(r8)
stw r30, -8(r8)
stw r31, -4(r8)
std r28,-32(r1)
std r29,-24(r1)
std r30,-16(r1)
std r31, -8(r1)
stw r9, 8(r8)
stw r2, 20(r1)
std r0, 16(r1)
mr r28, r1 /* our AP. */
stdux r1, r1, r4
/* Save arguments over call... */
mr r31,r5 /* flags, */
mr r30,r6 /* rvalue, */
mr r29,r7 /* function address, */
mr r28,r8 /* our AP. */
mr r31, r5 /* flags, */
mr r30, r6 /* rvalue, */
mr r29, r7 /* function address. */
std r2, 40(r1)
/* Call ffi_prep_args. */
mr r4,r1
li r9,0
lwz r2,4(r12)
lwz r12,0(r12)
mtctr r12 // r12 holds address of _ffi_prep_args
bctrl
lwz r2,20(r1)
mr r4, r1
bl .ffi_prep_args
/* Now do the call. */
lwz r12,0(r29)
ld r0, 0(r29)
ld r2, 8(r29)
ld r11, 16(r29)
/* Set up cr1 with bits 4-7 of the flags. */
mtcrf 0x40,r31
stw r2,20(r1)
mtctr r12
lwz r2,4(r29)
mtcrf 0x40, r31
mtctr r0
/* Load all those argument registers. */
// We have set up a nice stack frame, just load it into registers.
lwz r3, 20+(1*4)(r1)
lwz r4, 20+(2*4)(r1)
lwz r5, 20+(3*4)(r1)
lwz r6, 20+(4*4)(r1)
ld r3, 40+(1*8)(r1)
ld r4, 40+(2*8)(r1)
ld r5, 40+(3*8)(r1)
ld r6, 40+(4*8)(r1)
nop
lwz r7, 20+(5*4)(r1)
lwz r8, 20+(6*4)(r1)
lwz r9, 20+(7*4)(r1)
lwz r10,20+(8*4)(r1)
ld r7, 40+(5*8)(r1)
ld r8, 40+(6*8)(r1)
ld r9, 40+(7*8)(r1)
ld r10,40+(8*8)(r1)
L1:
/* Load all the FP registers. */
bf 6,L2 // 2f + 0x18
lfd f1,-32-(13*8)(r28)
lfd f2,-32-(12*8)(r28)
lfd f3,-32-(11*8)(r28)
lfd f4,-32-(10*8)(r28)
nop
lfd f5,-32-(9*8)(r28)
lfd f6,-32-(8*8)(r28)
lfd f7,-32-(7*8)(r28)
lfd f8,-32-(6*8)(r28)
nop
lfd f9,-32-(5*8)(r28)
lfd f10,-32-(4*8)(r28)
lfd f11,-32-(3*8)(r28)
lfd f12,-32-(2*8)(r28)
nop
lfd f13,-32-(1*8)(r28)
L2:
/* Make the call. */
bctrl
ld r2, 40(r1)
/* Now, deal with the return value. */
mtcrf 0x01, r31
bt 30, L(done_return_value)
bt 29, L(fp_return_value)
std r3, 0(r30)
/* Fall through... */
L(done_return_value):
/* Restore the registers we used and return. */
mr r1, r28
ld r0, 16(r28)
ld r28, -32(r1)
mtlr r0
ld r29, -24(r1)
ld r30, -16(r1)
ld r31, -8(r1)
blr
L(fp_return_value):
bf 28, L(float_return_value)
stfd f1, 0(r30)
bf 31, L(done_return_value)
stfd f2, 8(r30)
b L(done_return_value)
L(float_return_value):
stfs f1, 0(r30)
b L(done_return_value)
#else /* ! __64BIT__ */
.long .ffi_call_AIX, TOC[tc0], 0
.csect .text[PR]
.ffi_call_AIX:
/* Save registers we use. */
mflr r0
stw r28,-16(r1)
stw r29,-12(r1)
stw r30, -8(r1)
stw r31, -4(r1)
stw r0, 8(r1)
mr r28, r1 /* out AP. */
stwux r1, r1, r4
/* Save arguments over call... */
mr r31, r5 /* flags, */
mr r30, r6 /* rvalue, */
mr r29, r7 /* function address, */
stw r2, 20(r1)
/* Call ffi_prep_args. */
mr r4, r1
bl .ffi_prep_args
/* Now do the call. */
lwz r0, 0(r29)
lwz r2, 4(r29)
lwz r11, 8(r29)
/* Set up cr1 with bits 4-7 of the flags. */
mtcrf 0x40, r31
mtctr r0
/* Load all those argument registers. */
// We have set up a nice stack frame, just load it into registers.
lwz r3, 20+(1*4)(r1)
lwz r4, 20+(2*4)(r1)
lwz r5, 20+(3*4)(r1)
lwz r6, 20+(4*4)(r1)
nop
lwz r7, 20+(5*4)(r1)
lwz r8, 20+(6*4)(r1)
lwz r9, 20+(7*4)(r1)
lwz r10,20+(8*4)(r1)
L1:
/* Load all the FP registers. */
@@ -169,47 +259,48 @@ L1:
lfd f7,-16-(7*8)(r28)
lfd f8,-16-(6*8)(r28)
nop
lfd f9,-16-(5*8)(r28)
lfd f10,-16-(4*8)(r28)
lfd f11,-16-(3*8)(r28)
lfd f12,-16-(2*8)(r28)
lfd f9,-16-(5*8)(r28)
lfd f10,-16-(4*8)(r28)
lfd f11,-16-(3*8)(r28)
lfd f12,-16-(2*8)(r28)
nop
lfd f13,-16-(1*8)(r28)
lfd f13,-16-(1*8)(r28)
L2:
/* Make the call. */
bctrl
lwz r2,20(r1)
lwz r2, 20(r1)
/* Now, deal with the return value. */
mtcrf 0x01,r31
mtcrf 0x01, r31
bt 30,L(done_return_value)
bt 29,L(fp_return_value)
stw r3,0(r30)
bf 28,L(done_return_value)
stw r4,4(r30)
bt 30, L(done_return_value)
bt 29, L(fp_return_value)
stw r3, 0(r30)
bf 28, L(done_return_value)
stw r4, 4(r30)
/* Fall through... */
L(done_return_value):
/* Restore the registers we used and return. */
lwz r9, 8(r28)
lwz r31, -4(r28)
mtlr r9
lwz r30, -8(r28)
lwz r29,-12(r28)
lwz r28,-16(r28)
lwz r1,0(r1)
mr r1, r28
lwz r0, 8(r28)
lwz r28,-16(r1)
mtlr r0
lwz r29,-12(r1)
lwz r30, -8(r1)
lwz r31, -4(r1)
blr
L(fp_return_value):
bf 28,L(float_return_value)
stfd f1,0(r30)
bf 28, L(float_return_value)
stfd f1, 0(r30)
b L(done_return_value)
L(float_return_value):
stfs f1,0(r30)
stfs f1, 0(r30)
b L(done_return_value)
#endif
.long 0
.byte 0,0,0,1,128,4,0,0
//END(ffi_call_AIX)
@@ -220,7 +311,7 @@ L(float_return_value):
.globl .ffi_call_DARWIN
.csect ffi_call_DARWIN[DS]
ffi_call_DARWIN:
#if defined(_ARCH_PPC64)
#ifdef __64BIT__
.llong .ffi_call_DARWIN, TOC[tc0], 0
#else
.long .ffi_call_DARWIN, TOC[tc0], 0

View File

@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
aix_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc.
aix_closure.S - Copyright (c) 2002, 2003, 2009 Free Software Foundation, Inc.
based on darwin_closure.S
PowerPC Assembly glue.
@@ -84,7 +84,6 @@
#define L(x) x
.file "aix_closure.S"
.toc
.extern .ffi_closure_helper_DARWIN
LC..60:
.tc L..60[TC],L..60
.csect .text[PR]
@@ -95,69 +94,66 @@ LC..60:
.globl ffi_closure_ASM
.globl .ffi_closure_ASM
.csect ffi_closure_ASM[DS]
ffi_closure_ASM:
#if defined(_ARCH_PPC64)
#ifdef __64BIT__
.llong .ffi_closure_ASM, TOC[tc0], 0
#else
.long .ffi_closure_ASM, TOC[tc0], 0
#endif
.csect .text[PR]
.ffi_closure_ASM:
mflr r0 /* extract return address */
stw r0, 8(r1) /* save the return address */
/* 24 Bytes (Linkage Area) */
/* 32 Bytes (params) */
/* 104 Bytes (13*8 from FPR) */
/* 8 Bytes (result) */
/* 168 Bytes */
stwu r1,-176(r1) /* skip over caller save area
keep stack aligned to 16 */
/* we want to build up an area for the parameters passed */
/* in registers (both floating point and integer) */
/* we store gpr 3 to gpr 10 (aligned to 4)
in the parents outgoing area */
stw r3, 200(r1)
stw r4, 204(r1)
stw r5, 208(r1)
stw r6, 212(r1)
stw r7, 216(r1)
stw r8, 220(r1)
stw r9, 224(r1)
stw r10, 228(r1)
std r3, 48+(0*8)(r1)
std r4, 48+(1*8)(r1)
std r5, 48+(2*8)(r1)
std r6, 48+(3*8)(r1)
mflr r0
std r7, 48+(4*8)(r1)
std r8, 48+(5*8)(r1)
std r9, 48+(6*8)(r1)
std r10, 48+(7*8)(r1)
std r0, 16(r1) /* save the return address */
/* 48 Bytes (Linkage Area) */
/* 64 Bytes (params) */
/* 16 Bytes (result) */
/* 104 Bytes (13*8 from FPR) */
/* 8 Bytes (alignment) */
/* 240 Bytes */
stdu r1, -240(r1) /* skip over caller save area
keep stack aligned to 16 */
/* next save fpr 1 to fpr 13 (aligned to 8) */
stfd f1, 56(r1)
stfd f2, 64(r1)
stfd f3, 72(r1)
stfd f4, 80(r1)
stfd f5, 88(r1)
stfd f6, 96(r1)
stfd f7, 104(r1)
stfd f8, 112(r1)
stfd f9, 120(r1)
stfd f10, 128(r1)
stfd f11, 136(r1)
stfd f12, 144(r1)
stfd f13, 152(r1)
stfd f1, 128+(0*8)(r1)
stfd f2, 128+(1*8)(r1)
stfd f3, 128+(2*8)(r1)
stfd f4, 128+(3*8)(r1)
stfd f5, 128+(4*8)(r1)
stfd f6, 128+(5*8)(r1)
stfd f7, 128+(6*8)(r1)
stfd f8, 128+(7*8)(r1)
stfd f9, 128+(8*8)(r1)
stfd f10, 128+(9*8)(r1)
stfd f11, 128+(10*8)(r1)
stfd f12, 128+(11*8)(r1)
stfd f13, 128+(12*8)(r1)
/* set up registers for the routine that actually does the work */
/* get the context pointer from the trampoline */
mr r3,r11
mr r3, r11
/* now load up the pointer to the result storage */
addi r4,r1,160
addi r4, r1, 112
/* now load up the pointer to the saved gpr registers */
addi r5,r1,200
addi r5, r1, 288
/* now load up the pointer to the saved fpr registers */
addi r6,r1,56
addi r6, r1, 128
/* make the call */
bl .ffi_closure_helper_DARWIN
@@ -169,84 +165,279 @@ ffi_closure_ASM:
/* look up the proper starting point in table */
/* by using return type as offset */
addi r5,r1,160 /* get pointer to results area */
lwz r4,LC..60(2) /* get address of jump table */
slwi r3,r3,2 /* now multiply return type by 4 */
lwzx r3,r4,r3 /* get the contents of that table value */
add r3,r3,r4 /* add contents of table to table address */
mtctr r3
ld r4, LC..60(2) /* get address of jump table */
sldi r3, r3, 4 /* now multiply return type by 16 */
ld r0, 240+16(r1) /* load return address */
add r3, r3, r4 /* add contents of table to table address */
mtctr r3
bctr /* jump to it */
/* Each fragment must be exactly 16 bytes long (4 instructions).
Align to 16 byte boundary for cache and dispatch efficiency. */
.align 4
L..60:
.long L..44-L..60 /* FFI_TYPE_VOID */
.long L..50-L..60 /* FFI_TYPE_INT */
.long L..47-L..60 /* FFI_TYPE_FLOAT */
.long L..46-L..60 /* FFI_TYPE_DOUBLE */
.long L..46-L..60 /* FFI_TYPE_LONGDOUBLE */
.long L..56-L..60 /* FFI_TYPE_UINT8 */
.long L..55-L..60 /* FFI_TYPE_SINT8 */
.long L..58-L..60 /* FFI_TYPE_UINT16 */
.long L..57-L..60 /* FFI_TYPE_SINT16 */
.long L..50-L..60 /* FFI_TYPE_UINT32 */
.long L..50-L..60 /* FFI_TYPE_SINT32 */
.long L..48-L..60 /* FFI_TYPE_UINT64 */
.long L..48-L..60 /* FFI_TYPE_SINT64 */
.long L..44-L..60 /* FFI_TYPE_STRUCT */
.long L..50-L..60 /* FFI_TYPE_POINTER */
/* case FFI_TYPE_VOID */
mtlr r0
addi r1, r1, 240
blr
nop
/* case double */
L..46:
lfd f1,0(r5)
b L..44
/* case float */
L..47:
lfs f1,0(r5)
b L..44
/* case long long */
L..48:
lwz r3,0(r5)
lwz r4,4(r5)
b L..44
/* case default / int32 / pointer */
L..50:
lwz r3,0(r5)
b L..44
/* case signed int8 */
L..55:
addi r5,r5,3
lbz r3,0(r5)
slwi r3,r3,24
srawi r3,r3,24
b L..44
/* case unsigned int8 */
L..56:
addi r5,r5,3
lbz r3,0(r5)
b L..44
/* case signed int16 */
L..57:
addi r5,r5,2
lhz r3,0(r5)
extsh r3,r3
b L..44
/* case unsigned int16 */
L..58:
addi r5,r5,2
lhz r3,0(r5)
/* case void / done */
L..44:
addi r1,r1,176 /* restore stack pointer */
lwz r0,8(r1) /* get return address */
mtlr r0 /* reset link register */
/* case FFI_TYPE_INT */
lwa r3, 112+4(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_FLOAT */
lfs f1, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_DOUBLE */
lfd f1, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_LONGDOUBLE */
lfd f1, 112+0(r1)
mtlr r0
lfd f2, 112+8(r1)
b L..finish
/* case FFI_TYPE_UINT8 */
lbz r3, 112+7(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT8 */
lbz r3, 112+7(r1)
mtlr r0
extsb r3, r3
b L..finish
/* case FFI_TYPE_UINT16 */
lhz r3, 112+6(r1)
mtlr r0
L..finish:
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT16 */
lha r3, 112+6(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_UINT32 */
lwz r3, 112+4(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT32 */
lwa r3, 112+4(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_UINT64 */
ld r3, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_SINT64 */
ld r3, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
/* case FFI_TYPE_STRUCT */
mtlr r0
addi r1, r1, 240
blr
nop
/* case FFI_TYPE_POINTER */
ld r3, 112+0(r1)
mtlr r0
addi r1, r1, 240
blr
#else /* ! __64BIT__ */
.long .ffi_closure_ASM, TOC[tc0], 0
.csect .text[PR]
.ffi_closure_ASM:
/* we want to build up an area for the parameters passed */
/* in registers (both floating point and integer) */
/* we store gpr 3 to gpr 10 (aligned to 4)
in the parents outgoing area */
stw r3, 24+(0*4)(r1)
stw r4, 24+(1*4)(r1)
stw r5, 24+(2*4)(r1)
stw r6, 24+(3*4)(r1)
mflr r0
stw r7, 24+(4*4)(r1)
stw r8, 24+(5*4)(r1)
stw r9, 24+(6*4)(r1)
stw r10, 24+(7*4)(r1)
stw r0, 8(r1)
/* 24 Bytes (Linkage Area) */
/* 32 Bytes (params) */
/* 16 Bytes (result) */
/* 104 Bytes (13*8 from FPR) */
/* 176 Bytes */
stwu r1, -176(r1) /* skip over caller save area
keep stack aligned to 16 */
/* next save fpr 1 to fpr 13 (aligned to 8) */
stfd f1, 72+(0*8)(r1)
stfd f2, 72+(1*8)(r1)
stfd f3, 72+(2*8)(r1)
stfd f4, 72+(3*8)(r1)
stfd f5, 72+(4*8)(r1)
stfd f6, 72+(5*8)(r1)
stfd f7, 72+(6*8)(r1)
stfd f8, 72+(7*8)(r1)
stfd f9, 72+(8*8)(r1)
stfd f10, 72+(9*8)(r1)
stfd f11, 72+(10*8)(r1)
stfd f12, 72+(11*8)(r1)
stfd f13, 72+(12*8)(r1)
/* set up registers for the routine that actually does the work */
/* get the context pointer from the trampoline */
mr r3, r11
/* now load up the pointer to the result storage */
addi r4, r1, 56
/* now load up the pointer to the saved gpr registers */
addi r5, r1, 200
/* now load up the pointer to the saved fpr registers */
addi r6, r1, 72
/* make the call */
bl .ffi_closure_helper_DARWIN
nop
/* now r3 contains the return type */
/* so use it to look up in a table */
/* so we know how to deal with each type */
/* look up the proper starting point in table */
/* by using return type as offset */
lwz r4, LC..60(2) /* get address of jump table */
slwi r3, r3, 4 /* now multiply return type by 4 */
lwz r0, 176+8(r1) /* load return address */
add r3, r3, r4 /* add contents of table to table address */
mtctr r3
bctr /* jump to it */
/* Each fragment must be exactly 16 bytes long (4 instructions).
Align to 16 byte boundary for cache and dispatch efficiency. */
.align 4
L..60:
/* case FFI_TYPE_VOID */
mtlr r0
addi r1, r1, 176
blr
nop
/* case FFI_TYPE_INT */
lwz r3, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_FLOAT */
lfs f1, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_DOUBLE */
lfd f1, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_LONGDOUBLE */
lfd f1, 56+0(r1)
mtlr r0
lfd f2, 56+8(r1)
b L..finish
/* case FFI_TYPE_UINT8 */
lbz r3, 56+3(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_SINT8 */
lbz r3, 56+3(r1)
mtlr r0
extsb r3, r3
b L..finish
/* case FFI_TYPE_UINT16 */
lhz r3, 56+2(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_SINT16 */
lha r3, 56+2(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_UINT32 */
lwz r3, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_SINT32 */
lwz r3, 56+0(r1)
mtlr r0
addi r1, r1, 176
blr
/* case FFI_TYPE_UINT64 */
lwz r3, 56+0(r1)
mtlr r0
lwz r4, 56+4(r1)
b L..finish
/* case FFI_TYPE_SINT64 */
lwz r3, 56+0(r1)
mtlr r0
lwz r4, 56+4(r1)
b L..finish
/* case FFI_TYPE_STRUCT */
mtlr r0
addi r1, r1, 176
blr
nop
/* case FFI_TYPE_POINTER */
lwz r3, 56+0(r1)
mtlr r0
L..finish:
addi r1, r1, 176
blr
#endif
/* END(ffi_closure_ASM) */

View File

@@ -3,7 +3,7 @@
Copyright (C) 1998 Geoffrey Keating
Copyright (C) 2001 John Hornkvist
Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2002, 2006, 2007, 2009 Free Software Foundation, Inc.
FFI support for Darwin and AIX.
@@ -80,34 +80,34 @@ enum { ASM_NEEDS_REGISTERS = 4 };
*/
void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
{
const unsigned bytes = ecif->cif->bytes;
const unsigned flags = ecif->cif->flags;
/* 'stacktop' points at the previous backchain pointer. */
unsigned *const stacktop = stack + (bytes / sizeof(unsigned));
unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long));
/* 'fpr_base' points at the space for fpr1, and grows upwards as
we use FPR registers. */
double *fpr_base = (double*) (stacktop - ASM_NEEDS_REGISTERS) - NUM_FPR_ARG_REGISTERS;
double *fpr_base = (double *) (stacktop - ASM_NEEDS_REGISTERS) - NUM_FPR_ARG_REGISTERS;
int fparg_count = 0;
/* 'next_arg' grows up as we put parameters in it. */
unsigned *next_arg = stack + 6; /* 6 reserved positions. */
unsigned long *next_arg = stack + 6; /* 6 reserved positions. */
int i = ecif->cif->nargs;
int i;
double double_tmp;
void **p_argv = ecif->avalue;
unsigned gprvalue;
unsigned long gprvalue;
ffi_type** ptr = ecif->cif->arg_types;
char *dest_cpy;
unsigned size_al = 0;
/* Check that everything starts aligned properly. */
FFI_ASSERT(((unsigned)(char *)stack & 0xF) == 0);
FFI_ASSERT(((unsigned)(char *)stacktop & 0xF) == 0);
FFI_ASSERT(((unsigned) (char *) stack & 0xF) == 0);
FFI_ASSERT(((unsigned) (char *) stacktop & 0xF) == 0);
FFI_ASSERT((bytes & 0xF) == 0);
/* Deal with return values that are actually pass-by-reference.
@@ -115,12 +115,10 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
Return values are referenced by r3, so r4 is the first parameter. */
if (flags & FLAG_RETVAL_REFERENCE)
*next_arg++ = (unsigned)(char *)ecif->rvalue;
*next_arg++ = (unsigned long) (char *) ecif->rvalue;
/* Now for the arguments. */
for (;
i > 0;
i--, ptr++, p_argv++)
for (i = ecif->cif->nargs; i > 0; i--, ptr++, p_argv++)
{
switch ((*ptr)->type)
{
@@ -128,7 +126,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
purpose registers are filled, the corresponding GPRs that match
the size of the floating-point parameter are skipped. */
case FFI_TYPE_FLOAT:
double_tmp = *(float *)*p_argv;
double_tmp = *(float *) *p_argv;
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
else
@@ -139,12 +137,16 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
break;
case FFI_TYPE_DOUBLE:
double_tmp = *(double *)*p_argv;
double_tmp = *(double *) *p_argv;
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
else
*fpr_base++ = double_tmp;
#ifdef POWERPC64
next_arg++;
#else
next_arg += 2;
#endif
fparg_count++;
FFI_ASSERT(flags & FLAG_FP_ARGUMENTS);
break;
@@ -152,42 +154,71 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
double_tmp = ((double *)*p_argv)[0];
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
#ifdef POWERPC64
if (fparg_count < NUM_FPR_ARG_REGISTERS)
*(long double *) fpr_base++ = *(long double *) *p_argv;
else
*(long double *) next_arg = *(long double *) *p_argv;
next_arg += 2;
fparg_count += 2;
#else
double_tmp = ((double *) *p_argv)[0];
if (fparg_count < NUM_FPR_ARG_REGISTERS)
*fpr_base++ = double_tmp;
else
*(double *) next_arg = double_tmp;
next_arg += 2;
fparg_count++;
double_tmp = ((double *)*p_argv)[1];
if (fparg_count >= NUM_FPR_ARG_REGISTERS)
*(double *)next_arg = double_tmp;
else
double_tmp = ((double *) *p_argv)[1];
if (fparg_count < NUM_FPR_ARG_REGISTERS)
*fpr_base++ = double_tmp;
else
*(double *) next_arg = double_tmp;
next_arg += 2;
fparg_count++;
#endif
FFI_ASSERT(flags & FLAG_FP_ARGUMENTS);
break;
#endif
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
*(long long *)next_arg = *(long long *)*p_argv;
next_arg+=2;
#ifdef POWERPC64
gprvalue = *(long long *) *p_argv;
goto putgpr;
#else
*(long long *) next_arg = *(long long *) *p_argv;
next_arg += 2;
#endif
break;
case FFI_TYPE_POINTER:
gprvalue = *(unsigned long *) *p_argv;
goto putgpr;
case FFI_TYPE_UINT8:
gprvalue = *(unsigned char *)*p_argv;
gprvalue = *(unsigned char *) *p_argv;
goto putgpr;
case FFI_TYPE_SINT8:
gprvalue = *(signed char *)*p_argv;
gprvalue = *(signed char *) *p_argv;
goto putgpr;
case FFI_TYPE_UINT16:
gprvalue = *(unsigned short *)*p_argv;
gprvalue = *(unsigned short *) *p_argv;
goto putgpr;
case FFI_TYPE_SINT16:
gprvalue = *(signed short *)*p_argv;
gprvalue = *(signed short *) *p_argv;
goto putgpr;
case FFI_TYPE_STRUCT:
#ifdef POWERPC64
dest_cpy = (char *) next_arg;
size_al = (*ptr)->size;
if ((*ptr)->elements[0]->type == 3)
size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN)
dest_cpy += 4 - size_al;
memcpy ((char *) dest_cpy, (char *) *p_argv, size_al);
next_arg += (size_al + 7) / 8;
#else
dest_cpy = (char *) next_arg;
/* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
@@ -195,22 +226,24 @@ void ffi_prep_args(extended_cif *ecif, unsigned *const stack)
Structures with 3 byte in size are padded upwards. */
size_al = (*ptr)->size;
/* If the first member of the struct is a double, then align
the struct to double-word.
Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */
if ((*ptr)->elements[0]->type == 3)
the struct to double-word. */
if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN)
dest_cpy += 4 - size_al;
memcpy((char *)dest_cpy, (char *)*p_argv, size_al);
memcpy((char *) dest_cpy, (char *) *p_argv, size_al);
next_arg += (size_al + 3) / 4;
#endif
break;
case FFI_TYPE_INT:
case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32:
case FFI_TYPE_POINTER:
gprvalue = *(unsigned *)*p_argv;
gprvalue = *(signed int *) *p_argv;
goto putgpr;
case FFI_TYPE_UINT32:
gprvalue = *(unsigned int *) *p_argv;
putgpr:
*next_arg++ = gprvalue;
break;
@@ -324,6 +357,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
#ifdef POWERPC64
case FFI_TYPE_POINTER:
#endif
flags |= FLAG_RETURNS_64BITS;
break;
@@ -387,11 +423,14 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
case FFI_TYPE_STRUCT:
size_al = (*ptr)->size;
/* If the first member of the struct is a double, then align
the struct to double-word.
Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */
if ((*ptr)->elements[0]->type == 3)
the struct to double-word. */
if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN((*ptr)->size, 8);
#ifdef POWERPC64
intarg_count += (size_al + 7) / 8;
#else
intarg_count += (size_al + 3) / 4;
#endif
break;
default:
@@ -410,8 +449,13 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
bytes += NUM_FPR_ARG_REGISTERS * sizeof(double);
/* Stack space. */
#ifdef POWERPC64
if ((intarg_count + fparg_count) > NUM_GPR_ARG_REGISTERS)
bytes += (intarg_count + fparg_count) * sizeof(long);
#else
if ((intarg_count + 2 * fparg_count) > NUM_GPR_ARG_REGISTERS)
bytes += (intarg_count + 2 * fparg_count) * sizeof(long);
#endif
else
bytes += NUM_GPR_ARG_REGISTERS * sizeof(long);
@@ -424,9 +468,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK;
}
extern void ffi_call_AIX(extended_cif *, unsigned, unsigned, unsigned *,
extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
void (*fn)(void), void (*fn2)(void));
extern void ffi_call_DARWIN(extended_cif *, unsigned, unsigned, unsigned *,
extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
void (*fn)(void), void (*fn2)(void));
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
@@ -450,11 +494,11 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
switch (cif->abi)
{
case FFI_AIX:
ffi_call_AIX(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_call_AIX(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_prep_args);
break;
case FFI_DARWIN:
ffi_call_DARWIN(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_call_DARWIN(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
ffi_prep_args);
break;
default:
@@ -645,26 +689,19 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
void ** avalue;
ffi_type ** arg_types;
long i, avn;
long nf; /* number of floating registers already used. */
long ng; /* number of general registers already used. */
ffi_cif * cif;
double temp;
ffi_dblfl * end_pfr = pfr + NUM_FPR_ARG_REGISTERS;
unsigned size_al;
union ldu temp_ld;
cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *));
nf = 0;
ng = 0;
/* Copy the caller's structure return value address so that the closure
returns the data directly to the caller. */
if (cif->rtype->type == FFI_TYPE_STRUCT)
{
rvalue = (void *) *pgr;
pgr++;
ng++;
}
i = 0;
@@ -678,58 +715,82 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
{
case FFI_TYPE_SINT8:
case FFI_TYPE_UINT8:
#ifdef POWERPC64
avalue[i] = (char *) pgr + 7;
#else
avalue[i] = (char *) pgr + 3;
ng++;
#endif
pgr++;
break;
case FFI_TYPE_SINT16:
case FFI_TYPE_UINT16:
#ifdef POWERPC64
avalue[i] = (char *) pgr + 6;
#else
avalue[i] = (char *) pgr + 2;
ng++;
#endif
pgr++;
break;
case FFI_TYPE_SINT32:
case FFI_TYPE_UINT32:
#ifdef POWERPC64
avalue[i] = (char *) pgr + 4;
#else
case FFI_TYPE_POINTER:
avalue[i] = pgr;
ng++;
#endif
pgr++;
break;
case FFI_TYPE_STRUCT:
#ifdef POWERPC64
size_al = arg_types[i]->size;
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN (arg_types[i]->size, 8);
if (size_al < 3 && cif->abi == FFI_DARWIN)
avalue[i] = (void *) pgr + 8 - size_al;
else
avalue[i] = (void *) pgr;
pgr += (size_al + 7) / 8;
#else
/* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
SI 4 bytes) are aligned as if they were those modes. */
size_al = arg_types[i]->size;
/* If the first member of the struct is a double, then align
the struct to double-word.
Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */
if (arg_types[i]->elements[0]->type == 3)
the struct to double-word. */
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN(arg_types[i]->size, 8);
if (size_al < 3 && cif->abi == FFI_DARWIN)
avalue[i] = (void*) pgr + 4 - size_al;
else
avalue[i] = (void*) pgr;
ng += (size_al + 3) / 4;
pgr += (size_al + 3) / 4;
#endif
break;
case FFI_TYPE_SINT64:
case FFI_TYPE_UINT64:
#ifdef POWERPC64
case FFI_TYPE_POINTER:
avalue[i] = pgr;
pgr++;
break;
#else
/* Long long ints are passed in two gpr's. */
avalue[i] = pgr;
ng += 2;
pgr += 2;
break;
#endif
case FFI_TYPE_FLOAT:
/* A float value consumes a GPR.
There are 13 64bit floating point registers. */
if (nf < NUM_FPR_ARG_REGISTERS)
if (pfr < end_pfr)
{
temp = pfr->d;
pfr->f = (float)temp;
double temp = pfr->d;
pfr->f = (float) temp;
avalue[i] = pfr;
pfr++;
}
@@ -737,15 +798,13 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
{
avalue[i] = pgr;
}
nf++;
ng++;
pgr++;
break;
case FFI_TYPE_DOUBLE:
/* A double value consumes two GPRs.
There are 13 64bit floating point registers. */
if (nf < NUM_FPR_ARG_REGISTERS)
if (pfr < end_pfr)
{
avalue[i] = pfr;
pfr++;
@@ -754,17 +813,36 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
{
avalue[i] = pgr;
}
nf++;
ng += 2;
#ifdef POWERPC64
pgr++;
#else
pgr += 2;
#endif
break;
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
#ifdef POWERPC64
if (pfr + 1 < end_pfr)
{
avalue[i] = pfr;
pfr += 2;
}
else
{
if (pfr < end_pfr)
{
*pgr = *(unsigned long *) pfr;
pfr++;
}
avalue[i] = pgr;
}
pgr += 2;
#else /* POWERPC64 */
/* A long double value consumes four GPRs and two FPRs.
There are 13 64bit floating point registers. */
if (nf < NUM_FPR_ARG_REGISTERS - 1)
if (pfr + 1 < end_pfr)
{
avalue[i] = pfr;
pfr += 2;
@@ -772,19 +850,20 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
/* Here we have the situation where one part of the long double
is stored in fpr13 and the other part is already on the stack.
We use a union to pass the long double to avalue[i]. */
else if (nf == NUM_FPR_ARG_REGISTERS - 1)
else if (pfr + 1 == end_pfr)
{
union ldu temp_ld;
memcpy (&temp_ld.lb[0], pfr, sizeof(ldbits));
memcpy (&temp_ld.lb[1], pgr + 2, sizeof(ldbits));
avalue[i] = &temp_ld.ld;
pfr++;
}
else
{
avalue[i] = pgr;
}
nf += 2;
ng += 4;
pgr += 4;
#endif /* POWERPC64 */
break;
#endif
default:

View File

@@ -30,7 +30,11 @@
/* ---- System specific configurations ----------------------------------- */
#if defined (POWERPC) && defined (__powerpc64__)
#if defined (POWERPC) && defined (__powerpc64__) /* linux64 */
#define POWERPC64
#elif defined (POWERPC_DARWIN) && defined (__ppc64__) /* Darwin */
#define POWERPC64
#elif defined (POWERPC_AIX) && defined (__64BIT__) /* AIX64 */
#define POWERPC64
#endif

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/s390
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/s390
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.144568Z
1f71e34e447521ee847aa885d11d38cc
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.144568Z
b03c7644ee96611457e7eed78b58a9c0
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:02.000000Z
2009-12-20T06:01:55.145554Z
7e517d2afaece704e7af181367c01a76
2009-06-04T15:43:03.499507Z
148172

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/sh
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sh
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.054556Z
29f9e59db3e60996e10aa894d106e08a
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.055556Z
2d1bfc8959e6b3ba92e32cbad5ea94b6
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:56.056555Z
7e0990b03e6cff0ed4b1c69ca758a1fe
2009-06-04T15:11:12.475454Z
148171

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/sh64
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sh64
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.087555Z
86900415ba310dc614e41339d057ebc2
2009-06-04T15:11:12.475454Z
148171
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.088556Z
eb58c57943b4ed8a754ad8a673eab931
2009-06-04T15:43:03.499507Z
148172
@@ -100,7 +100,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.088556Z
981772e8eedf7ba19049819909040d94
2009-06-04T15:11:12.475454Z
148171

View File

@@ -1,15 +1,15 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/sparc
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sparc
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-06-04T15:43:03.499507Z
148172
aph
2009-12-11T10:06:18.498824Z
155152
ebotcazou
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.943772Z
cbae30a5242be298ba2710482e8737de
2009-06-04T15:43:03.499507Z
148172
@@ -66,7 +66,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.944568Z
256560b213d4d9f94a3c04149fb166ed
2009-06-04T15:11:12.475454Z
148171
@@ -100,11 +100,11 @@ file
2009-06-10T05:25:03.000000Z
6ed62c6ac9bf5b4e60fb5b06818a21b6
2009-06-04T15:43:03.499507Z
148172
aph
2009-12-20T06:01:55.945562Z
161fdea817d0877f3bfc580d04998bb9
2009-12-11T10:06:18.498824Z
155152
ebotcazou
@@ -126,7 +126,7 @@ aph
15558
15729
v8.S
file
@@ -134,7 +134,7 @@ file
2009-06-10T05:25:03.000000Z
2009-12-20T06:01:55.945562Z
02c27eadbf8a70a8217a89dd10955be0
2009-06-04T15:43:03.499507Z
148172

View File

@@ -599,6 +599,11 @@ ffi_closure_sparc_inner_v9(ffi_closure *closure,
/* Right-justify. */
argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
/* Align on a 16-byte boundary. */
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
if (arg_types[i]->type == FFI_TYPE_LONGDOUBLE && (argn % 2) != 0)
argn++;
#endif
if (i < fp_slot_max
&& (arg_types[i]->type == FFI_TYPE_FLOAT
|| arg_types[i]->type == FFI_TYPE_DOUBLE

View File

@@ -599,6 +599,11 @@ ffi_closure_sparc_inner_v9(ffi_closure *closure,
/* Right-justify. */
argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
/* Align on a 16-byte boundary. */
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
if (arg_types[i]->type == FFI_TYPE_LONGDOUBLE && (argn % 2) != 0)
argn++;
#endif
if (i < fp_slot_max
&& (arg_types[i]->type == FFI_TYPE_FLOAT
|| arg_types[i]->type == FFI_TYPE_DOUBLE

View File

@@ -1,15 +1,15 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/src/x86
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/x86
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-09-28T22:26:25.100883Z
152256
ktietz
2009-12-04T18:41:59.918480Z
154988
uros
@@ -32,7 +32,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.810555Z
241e0adeeeba9eb067412930a0229857
2009-06-04T15:43:03.499507Z
148172
@@ -66,11 +66,11 @@ file
2009-06-20T15:53:35.000000Z
4baf2cbce15603b292a1a20b70ae2e74
2009-06-12T15:57:58.721771Z
148433
aph
2009-12-20T06:01:54.810555Z
df9e516483d1f4778090c834c5151527
2009-12-04T18:41:59.918480Z
154988
uros
@@ -92,7 +92,7 @@ aph
16173
17340
ffitarget.h
file
@@ -100,7 +100,7 @@ file
2009-06-20T15:53:35.000000Z
2009-12-20T06:01:54.811555Z
5c6748898b1e0857b71f73ba95e2bdab
2009-06-12T15:57:58.721771Z
148433
@@ -134,7 +134,7 @@ file
2009-09-10T17:50:58.000000Z
2009-12-20T06:01:54.812555Z
16c9cbaa5aa2ba0ce316655706880b22
2009-07-24T10:12:16.542948Z
150042
@@ -168,7 +168,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.812555Z
e988aa92b714d72199c40b30edcaff89
2009-06-04T15:11:12.475454Z
148171
@@ -202,7 +202,7 @@ file
2009-09-27T03:30:27.000000Z
2009-12-20T06:01:54.813555Z
7a2064a18fae63fbf5b6ca3744372eb5
2009-09-17T20:54:56.860605Z
151819
@@ -236,7 +236,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.813555Z
c105ec7c2660ce57770538edd675ff47
2009-06-04T15:43:03.499507Z
148172
@@ -270,7 +270,7 @@ file
2009-09-29T17:13:25.000000Z
2009-12-20T06:01:54.814555Z
f8570e3f12f1eef57ed2bb940d829a22
2009-09-28T22:26:25.100883Z
152256
@@ -304,7 +304,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.814555Z
ac3a9a04135ada40ad3083503af485e3
2009-06-09T15:23:38.608509Z
148313
@@ -338,7 +338,7 @@ file
2009-06-10T05:25:01.000000Z
2009-12-20T06:01:54.815555Z
8794ca810e989bcfac2b06376c992b96
2009-06-04T15:43:03.499507Z
148172

View File

@@ -145,13 +145,35 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_POINTER:
if (byte_offset + type->size <= 4)
classes[0] = X86_64_INTEGERSI_CLASS;
else
classes[0] = X86_64_INTEGER_CLASS;
return 1;
{
int size = byte_offset + type->size;
if (size <= 4)
{
classes[0] = X86_64_INTEGERSI_CLASS;
return 1;
}
else if (size <= 8)
{
classes[0] = X86_64_INTEGER_CLASS;
return 1;
}
else if (size <= 12)
{
classes[0] = X86_64_INTEGER_CLASS;
classes[1] = X86_64_INTEGERSI_CLASS;
return 2;
}
else if (size <= 16)
{
classes[0] = classes[1] = X86_64_INTEGERSI_CLASS;
return 2;
}
else
FFI_ASSERT (0);
}
case FFI_TYPE_FLOAT:
if (byte_offset == 0)
if (!(byte_offset % 8))
classes[0] = X86_64_SSESF_CLASS;
else
classes[0] = X86_64_SSE_CLASS;
@@ -171,13 +193,21 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
int i;
enum x86_64_reg_class subclasses[MAX_CLASSES];
/* If the struct is larger than 16 bytes, pass it on the stack. */
if (type->size > 16)
/* If the struct is larger than 32 bytes, pass it on the stack. */
if (type->size > 32)
return 0;
for (i = 0; i < words; i++)
classes[i] = X86_64_NO_CLASS;
/* Zero sized arrays or structures are NO_CLASS. We return 0 to
signalize memory class, so handle it as special case. */
if (!words)
{
classes[0] = X86_64_NO_CLASS;
return 1;
}
/* Merge the fields of structure. */
for (ptr = type->elements; *ptr != NULL; ptr++)
{
@@ -198,6 +228,20 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
byte_offset += (*ptr)->size;
}
if (words > 2)
{
/* When size > 16 bytes, if the first one isn't
X86_64_SSE_CLASS or any other ones aren't
X86_64_SSEUP_CLASS, everything should be passed in
memory. */
if (classes[0] != X86_64_SSE_CLASS)
return 0;
for (i = 1; i < words; i++)
if (classes[i] != X86_64_SSEUP_CLASS)
return 0;
}
/* Final merger cleanup. */
for (i = 0; i < words; i++)
{
@@ -207,15 +251,25 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
return 0;
/* The X86_64_SSEUP_CLASS should be always preceded by
X86_64_SSE_CLASS. */
X86_64_SSE_CLASS or X86_64_SSEUP_CLASS. */
if (classes[i] == X86_64_SSEUP_CLASS
&& (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
classes[i] = X86_64_SSE_CLASS;
&& classes[i - 1] != X86_64_SSE_CLASS
&& classes[i - 1] != X86_64_SSEUP_CLASS)
{
/* The first one should never be X86_64_SSEUP_CLASS. */
FFI_ASSERT (i != 0);
classes[i] = X86_64_SSE_CLASS;
}
/* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
/* If X86_64_X87UP_CLASS isn't preceded by X86_64_X87_CLASS,
everything should be passed in memory. */
if (classes[i] == X86_64_X87UP_CLASS
&& (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
classes[i] = X86_64_SSE_CLASS;
&& (classes[i - 1] != X86_64_X87_CLASS))
{
/* The first one should never be X86_64_X87UP_CLASS. */
FFI_ASSERT (i != 0);
return 0;
}
}
return words;
}
@@ -528,10 +582,10 @@ ffi_closure_unix64_inner(ffi_closure *closure, void *rvalue,
argp += arg_types[i]->size;
}
/* If the argument is in a single register, or two consecutive
registers, then we can use that address directly. */
integer registers, then we can use that address directly. */
else if (n == 1
|| (n == 2
&& SSE_CLASS_P (classes[0]) == SSE_CLASS_P (classes[1])))
|| (n == 2 && !(SSE_CLASS_P (classes[0])
|| SSE_CLASS_P (classes[1]))))
{
/* The argument is in a single register. */
if (SSE_CLASS_P (classes[0]))

View File

@@ -145,13 +145,35 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_POINTER:
if (byte_offset + type->size <= 4)
classes[0] = X86_64_INTEGERSI_CLASS;
else
classes[0] = X86_64_INTEGER_CLASS;
return 1;
{
int size = byte_offset + type->size;
if (size <= 4)
{
classes[0] = X86_64_INTEGERSI_CLASS;
return 1;
}
else if (size <= 8)
{
classes[0] = X86_64_INTEGER_CLASS;
return 1;
}
else if (size <= 12)
{
classes[0] = X86_64_INTEGER_CLASS;
classes[1] = X86_64_INTEGERSI_CLASS;
return 2;
}
else if (size <= 16)
{
classes[0] = classes[1] = X86_64_INTEGERSI_CLASS;
return 2;
}
else
FFI_ASSERT (0);
}
case FFI_TYPE_FLOAT:
if (byte_offset == 0)
if (!(byte_offset % 8))
classes[0] = X86_64_SSESF_CLASS;
else
classes[0] = X86_64_SSE_CLASS;
@@ -171,13 +193,21 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
int i;
enum x86_64_reg_class subclasses[MAX_CLASSES];
/* If the struct is larger than 16 bytes, pass it on the stack. */
if (type->size > 16)
/* If the struct is larger than 32 bytes, pass it on the stack. */
if (type->size > 32)
return 0;
for (i = 0; i < words; i++)
classes[i] = X86_64_NO_CLASS;
/* Zero sized arrays or structures are NO_CLASS. We return 0 to
signalize memory class, so handle it as special case. */
if (!words)
{
classes[0] = X86_64_NO_CLASS;
return 1;
}
/* Merge the fields of structure. */
for (ptr = type->elements; *ptr != NULL; ptr++)
{
@@ -198,6 +228,20 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
byte_offset += (*ptr)->size;
}
if (words > 2)
{
/* When size > 16 bytes, if the first one isn't
X86_64_SSE_CLASS or any other ones aren't
X86_64_SSEUP_CLASS, everything should be passed in
memory. */
if (classes[0] != X86_64_SSE_CLASS)
return 0;
for (i = 1; i < words; i++)
if (classes[i] != X86_64_SSEUP_CLASS)
return 0;
}
/* Final merger cleanup. */
for (i = 0; i < words; i++)
{
@@ -207,15 +251,25 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
return 0;
/* The X86_64_SSEUP_CLASS should be always preceded by
X86_64_SSE_CLASS. */
X86_64_SSE_CLASS or X86_64_SSEUP_CLASS. */
if (classes[i] == X86_64_SSEUP_CLASS
&& (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
classes[i] = X86_64_SSE_CLASS;
&& classes[i - 1] != X86_64_SSE_CLASS
&& classes[i - 1] != X86_64_SSEUP_CLASS)
{
/* The first one should never be X86_64_SSEUP_CLASS. */
FFI_ASSERT (i != 0);
classes[i] = X86_64_SSE_CLASS;
}
/* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
/* If X86_64_X87UP_CLASS isn't preceded by X86_64_X87_CLASS,
everything should be passed in memory. */
if (classes[i] == X86_64_X87UP_CLASS
&& (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
classes[i] = X86_64_SSE_CLASS;
&& (classes[i - 1] != X86_64_X87_CLASS))
{
/* The first one should never be X86_64_X87UP_CLASS. */
FFI_ASSERT (i != 0);
return 0;
}
}
return words;
}
@@ -528,10 +582,10 @@ ffi_closure_unix64_inner(ffi_closure *closure, void *rvalue,
argp += arg_types[i]->size;
}
/* If the argument is in a single register, or two consecutive
registers, then we can use that address directly. */
integer registers, then we can use that address directly. */
else if (n == 1
|| (n == 2
&& SSE_CLASS_P (classes[0]) == SSE_CLASS_P (classes[1])))
|| (n == 2 && !(SSE_CLASS_P (classes[0])
|| SSE_CLASS_P (classes[1]))))
{
/* The argument is in a single register. */
if (SSE_CLASS_P (classes[0]))

View File

@@ -1,15 +1,15 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/testsuite
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite
svn+ssh://green@gcc.gnu.org/svn/gcc
2009-08-22T13:22:20.806489Z
151014
rwild
2009-12-15T23:55:56.203674Z
155277
danglin
@@ -32,10 +32,10 @@ file
2009-09-10T17:50:58.000000Z
a850c31dce6bb3dab9a9c6eeed45b473
2009-08-22T13:22:20.806489Z
151014
2009-12-20T06:01:58.004568Z
df80bf4b915a2a2ea84b85d1004cd2b6
2009-12-05T17:18:53.298892Z
155012
rwild
@@ -58,7 +58,7 @@ rwild
12288
12268
config
dir
@@ -75,7 +75,7 @@ file
2009-04-24T17:46:16.000000Z
2009-12-20T06:01:58.004568Z
04e06926cecf1198af45894dc46ffd39
2003-09-04T14:49:22.000000Z
71069

View File

@@ -160,7 +160,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@

View File

@@ -16,56 +16,56 @@ AM_RUNTESTFLAGS =
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = config/default.exp lib/libffi-dg.exp \
lib/target-libpath.exp lib/wrapper.exp libffi.call/call.exp \
libffi.call/closure_fn0.c libffi.call/closure_fn1.c \
libffi.call/closure_fn2.c libffi.call/closure_fn3.c \
libffi.call/closure_fn4.c libffi.call/closure_fn5.c \
libffi.call/closure_fn6.c libffi.call/closure_stdcall.c \
libffi.call/cls_1_1byte.c libffi.call/cls_12byte.c \
libffi.call/cls_16byte.c libffi.call/cls_18byte.c \
libffi.call/cls_19byte.c libffi.call/cls_20byte1.c \
libffi.call/cls_20byte.c libffi.call/cls_24byte.c \
libffi.call/cls_2byte.c libffi.call/cls_3_1byte.c \
libffi.call/cls_3byte1.c libffi.call/cls_3byte2.c \
libffi.call/cls_4_1byte.c libffi.call/cls_4byte.c \
libffi.call/cls_5_1_byte.c libffi.call/cls_5byte.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_64byte.c \
libffi.call/cls_6byte.c libffi.call/cls_7_1_byte.c \
libffi.call/cls_7byte.c libffi.call/cls_8byte.c \
libffi.call/cls_9byte1.c libffi.call/cls_9byte2.c \
libffi.call/cls_align_double.c libffi.call/cls_align_float.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_align_pointer.c \
libffi.call/cls_align_sint16.c libffi.call/cls_align_sint32.c \
libffi.call/cls_align_sint64.c libffi.call/cls_align_uint16.c \
libffi.call/cls_align_uint32.c libffi.call/cls_align_uint64.c \
libffi.call/cls_double.c libffi.call/cls_float.c \
libffi.call/cls_multi_schar.c libffi.call/cls_multi_sshort.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_uchar.c \
libffi.call/cls_multi_ushort.c libffi.call/cls_multi_ushortchar.c \
libffi.call/cls_schar.c libffi.call/cls_sint.c \
libffi.call/cls_sshort.c libffi.call/cls_uchar.c \
libffi.call/cls_uint.c libffi.call/cls_ulonglong.c \
libffi.call/cls_ushort.c libffi.call/ffitest.h libffi.call/float1.c \
libffi.call/float2.c libffi.call/float3.c libffi.call/float4.c \
libffi.call/float.c libffi.call/many.c libffi.call/many_win32.c \
libffi.call/negint.c libffi.call/nested_struct10.c \
libffi.call/nested_struct1.c libffi.call/nested_struct2.c \
libffi.call/nested_struct3.c libffi.call/nested_struct4.c \
libffi.call/nested_struct5.c libffi.call/nested_struct6.c \
libffi.call/nested_struct7.c libffi.call/nested_struct8.c \
libffi.call/nested_struct9.c libffi.call/nested_struct.c \
libffi.call/problem1.c libffi.call/promotion.c \
libffi.call/pyobjc-tc.c libffi.call/return_dbl1.c \
libffi.call/return_dbl2.c libffi.call/return_dbl.c \
libffi.call/return_fl1.c libffi.call/return_fl2.c \
libffi.call/return_fl3.c libffi.call/return_fl.c \
libffi.call/return_ldl.c libffi.call/return_ll1.c \
libffi.call/return_ll.c libffi.call/return_sc.c \
libffi.call/return_sl.c libffi.call/return_uc.c \
libffi.call/return_ul.c libffi.call/strlen.c \
libffi.call/strlen_win32.c libffi.call/struct1.c \
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
libffi.call/struct8.c libffi.call/struct9.c \
libffi.special/ffitestcxx.h libffi.special/special.exp \
libffi.special/unwindtest.cc libffi.special/unwindtest_ffi_call.cc
lib/target-libpath.exp lib/wrapper.exp libffi.call/call.exp \
libffi.call/closure_fn0.c libffi.call/closure_fn1.c \
libffi.call/closure_fn2.c libffi.call/closure_fn3.c \
libffi.call/closure_fn4.c libffi.call/closure_fn5.c \
libffi.call/closure_fn6.c libffi.call/closure_stdcall.c \
libffi.call/cls_1_1byte.c libffi.call/cls_12byte.c \
libffi.call/cls_16byte.c libffi.call/cls_18byte.c \
libffi.call/cls_19byte.c libffi.call/cls_20byte1.c \
libffi.call/cls_20byte.c libffi.call/cls_24byte.c \
libffi.call/cls_2byte.c libffi.call/cls_3_1byte.c \
libffi.call/cls_3byte1.c libffi.call/cls_3byte2.c \
libffi.call/cls_4_1byte.c libffi.call/cls_4byte.c \
libffi.call/cls_5_1_byte.c libffi.call/cls_5byte.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_64byte.c \
libffi.call/cls_6byte.c libffi.call/cls_7_1_byte.c \
libffi.call/cls_7byte.c libffi.call/cls_8byte.c \
libffi.call/cls_9byte1.c libffi.call/cls_9byte2.c \
libffi.call/cls_align_double.c libffi.call/cls_align_float.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_align_pointer.c \
libffi.call/cls_align_sint16.c libffi.call/cls_align_sint32.c \
libffi.call/cls_align_sint64.c libffi.call/cls_align_uint16.c \
libffi.call/cls_align_uint32.c libffi.call/cls_align_uint64.c \
libffi.call/cls_double.c libffi.call/cls_float.c \
libffi.call/cls_multi_schar.c libffi.call/cls_multi_sshort.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_uchar.c \
libffi.call/cls_multi_ushort.c libffi.call/cls_multi_ushortchar.c \
libffi.call/cls_schar.c libffi.call/cls_sint.c \
libffi.call/cls_sshort.c libffi.call/cls_uchar.c \
libffi.call/cls_uint.c libffi.call/cls_ulonglong.c \
libffi.call/cls_ushort.c libffi.call/ffitest.h libffi.call/float1.c \
libffi.call/float2.c libffi.call/float3.c libffi.call/float4.c \
libffi.call/float.c libffi.call/many.c libffi.call/many_win32.c \
libffi.call/negint.c libffi.call/nested_struct10.c \
libffi.call/nested_struct1.c libffi.call/nested_struct2.c \
libffi.call/nested_struct3.c libffi.call/nested_struct4.c \
libffi.call/nested_struct5.c libffi.call/nested_struct6.c \
libffi.call/nested_struct7.c libffi.call/nested_struct8.c \
libffi.call/nested_struct9.c libffi.call/nested_struct.c \
libffi.call/problem1.c libffi.call/promotion.c \
libffi.call/pyobjc-tc.c libffi.call/return_dbl1.c \
libffi.call/return_dbl2.c libffi.call/return_dbl.c \
libffi.call/return_fl1.c libffi.call/return_fl2.c \
libffi.call/return_fl3.c libffi.call/return_fl.c \
libffi.call/return_ldl.c libffi.call/return_ll1.c \
libffi.call/return_ll.c libffi.call/return_sc.c \
libffi.call/return_sl.c libffi.call/return_uc.c \
libffi.call/return_ul.c libffi.call/strlen.c \
libffi.call/strlen_win32.c libffi.call/struct1.c \
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
libffi.call/struct8.c libffi.call/struct9.c \
libffi.special/ffitestcxx.h libffi.special/special.exp \
libffi.special/unwindtest.cc libffi.special/unwindtest_ffi_call.cc

View File

@@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
@@ -13,15 +14,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -46,6 +44,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DEJATOOL = $(PACKAGE)
@@ -53,74 +52,56 @@ RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALPHA_FALSE = @ALPHA_FALSE@
ALPHA_TRUE = @ALPHA_TRUE@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AM_RUNTESTFLAGS =
AR = @AR@
ARM_FALSE = @ARM_FALSE@
ARM_TRUE = @ARM_TRUE@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVR32_FALSE = @AVR32_FALSE@
AVR32_TRUE = @AVR32_TRUE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FRV_FALSE = @FRV_FALSE@
FRV_TRUE = @FRV_TRUE@
FGREP = @FGREP@
GREP = @GREP@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
IA64_FALSE = @IA64_FALSE@
IA64_TRUE = @IA64_TRUE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M32R_FALSE = @M32R_FALSE@
M32R_TRUE = @M32R_TRUE@
M68K_FALSE = @M68K_FALSE@
M68K_TRUE = @M68K_TRUE@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MIPS_FALSE = @MIPS_FALSE@
MIPS_TRUE = @MIPS_TRUE@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -128,55 +109,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PA_HPUX_FALSE = @PA_HPUX_FALSE@
PA_HPUX_TRUE = @PA_HPUX_TRUE@
PA_LINUX_FALSE = @PA_LINUX_FALSE@
PA_LINUX_TRUE = @PA_LINUX_TRUE@
POWERPC_AIX_FALSE = @POWERPC_AIX_FALSE@
POWERPC_AIX_TRUE = @POWERPC_AIX_TRUE@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
POWERPC_FALSE = @POWERPC_FALSE@
POWERPC_FREEBSD_FALSE = @POWERPC_FREEBSD_FALSE@
POWERPC_FREEBSD_TRUE = @POWERPC_FREEBSD_TRUE@
POWERPC_TRUE = @POWERPC_TRUE@
RANLIB = @RANLIB@
S390_FALSE = @S390_FALSE@
S390_TRUE = @S390_TRUE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SH64_FALSE = @SH64_FALSE@
SH64_TRUE = @SH64_TRUE@
SHELL = @SHELL@
SH_FALSE = @SH_FALSE@
SH_TRUE = @SH_TRUE@
SPARC_FALSE = @SPARC_FALSE@
SPARC_TRUE = @SPARC_TRUE@
STRIP = @STRIP@
TARGET = @TARGET@
TARGETDIR = @TARGETDIR@
TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
VERSION = @VERSION@
X86_64_FALSE = @X86_64_FALSE@
X86_64_TRUE = @X86_64_TRUE@
X86_DARWIN_FALSE = @X86_DARWIN_FALSE@
X86_DARWIN_TRUE = @X86_DARWIN_TRUE@
X86_FALSE = @X86_FALSE@
X86_FREEBSD_FALSE = @X86_FREEBSD_FALSE@
X86_FREEBSD_TRUE = @X86_FREEBSD_TRUE@
X86_TRUE = @X86_TRUE@
X86_WIN32_FALSE = @X86_WIN32_FALSE@
X86_WIN32_TRUE = @X86_WIN32_TRUE@
X86_WIN64_FALSE = @X86_WIN64_FALSE@
X86_WIN64_TRUE = @X86_WIN64_TRUE@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -188,6 +134,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -206,6 +153,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -215,6 +163,7 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -223,6 +172,9 @@ target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign dejagnu
# Setup the testing framework, if you have one
@@ -236,59 +188,59 @@ RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = config/default.exp lib/libffi-dg.exp \
lib/target-libpath.exp lib/wrapper.exp libffi.call/call.exp \
libffi.call/closure_fn0.c libffi.call/closure_fn1.c \
libffi.call/closure_fn2.c libffi.call/closure_fn3.c \
libffi.call/closure_fn4.c libffi.call/closure_fn5.c \
libffi.call/closure_fn6.c libffi.call/closure_stdcall.c \
libffi.call/cls_1_1byte.c libffi.call/cls_12byte.c \
libffi.call/cls_16byte.c libffi.call/cls_18byte.c \
libffi.call/cls_19byte.c libffi.call/cls_20byte1.c \
libffi.call/cls_20byte.c libffi.call/cls_24byte.c \
libffi.call/cls_2byte.c libffi.call/cls_3_1byte.c \
libffi.call/cls_3byte1.c libffi.call/cls_3byte2.c \
libffi.call/cls_4_1byte.c libffi.call/cls_4byte.c \
libffi.call/cls_5_1_byte.c libffi.call/cls_5byte.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_64byte.c \
libffi.call/cls_6byte.c libffi.call/cls_7_1_byte.c \
libffi.call/cls_7byte.c libffi.call/cls_8byte.c \
libffi.call/cls_9byte1.c libffi.call/cls_9byte2.c \
libffi.call/cls_align_double.c libffi.call/cls_align_float.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_align_pointer.c \
libffi.call/cls_align_sint16.c libffi.call/cls_align_sint32.c \
libffi.call/cls_align_sint64.c libffi.call/cls_align_uint16.c \
libffi.call/cls_align_uint32.c libffi.call/cls_align_uint64.c \
libffi.call/cls_double.c libffi.call/cls_float.c \
libffi.call/cls_multi_schar.c libffi.call/cls_multi_sshort.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_uchar.c \
libffi.call/cls_multi_ushort.c libffi.call/cls_multi_ushortchar.c \
libffi.call/cls_schar.c libffi.call/cls_sint.c \
libffi.call/cls_sshort.c libffi.call/cls_uchar.c \
libffi.call/cls_uint.c libffi.call/cls_ulonglong.c \
libffi.call/cls_ushort.c libffi.call/ffitest.h libffi.call/float1.c \
libffi.call/float2.c libffi.call/float3.c libffi.call/float4.c \
libffi.call/float.c libffi.call/many.c libffi.call/many_win32.c \
libffi.call/negint.c libffi.call/nested_struct10.c \
libffi.call/nested_struct1.c libffi.call/nested_struct2.c \
libffi.call/nested_struct3.c libffi.call/nested_struct4.c \
libffi.call/nested_struct5.c libffi.call/nested_struct6.c \
libffi.call/nested_struct7.c libffi.call/nested_struct8.c \
libffi.call/nested_struct9.c libffi.call/nested_struct.c \
libffi.call/problem1.c libffi.call/promotion.c \
libffi.call/pyobjc-tc.c libffi.call/return_dbl1.c \
libffi.call/return_dbl2.c libffi.call/return_dbl.c \
libffi.call/return_fl1.c libffi.call/return_fl2.c \
libffi.call/return_fl3.c libffi.call/return_fl.c \
libffi.call/return_ldl.c libffi.call/return_ll1.c \
libffi.call/return_ll.c libffi.call/return_sc.c \
libffi.call/return_sl.c libffi.call/return_uc.c \
libffi.call/return_ul.c libffi.call/strlen.c \
libffi.call/strlen_win32.c libffi.call/struct1.c \
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
libffi.call/struct8.c libffi.call/struct9.c \
libffi.special/ffitestcxx.h libffi.special/special.exp \
libffi.special/unwindtest.cc libffi.special/unwindtest_ffi_call.cc
lib/target-libpath.exp lib/wrapper.exp libffi.call/call.exp \
libffi.call/closure_fn0.c libffi.call/closure_fn1.c \
libffi.call/closure_fn2.c libffi.call/closure_fn3.c \
libffi.call/closure_fn4.c libffi.call/closure_fn5.c \
libffi.call/closure_fn6.c libffi.call/closure_stdcall.c \
libffi.call/cls_1_1byte.c libffi.call/cls_12byte.c \
libffi.call/cls_16byte.c libffi.call/cls_18byte.c \
libffi.call/cls_19byte.c libffi.call/cls_20byte1.c \
libffi.call/cls_20byte.c libffi.call/cls_24byte.c \
libffi.call/cls_2byte.c libffi.call/cls_3_1byte.c \
libffi.call/cls_3byte1.c libffi.call/cls_3byte2.c \
libffi.call/cls_4_1byte.c libffi.call/cls_4byte.c \
libffi.call/cls_5_1_byte.c libffi.call/cls_5byte.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_64byte.c \
libffi.call/cls_6byte.c libffi.call/cls_7_1_byte.c \
libffi.call/cls_7byte.c libffi.call/cls_8byte.c \
libffi.call/cls_9byte1.c libffi.call/cls_9byte2.c \
libffi.call/cls_align_double.c libffi.call/cls_align_float.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_align_pointer.c \
libffi.call/cls_align_sint16.c libffi.call/cls_align_sint32.c \
libffi.call/cls_align_sint64.c libffi.call/cls_align_uint16.c \
libffi.call/cls_align_uint32.c libffi.call/cls_align_uint64.c \
libffi.call/cls_double.c libffi.call/cls_float.c \
libffi.call/cls_multi_schar.c libffi.call/cls_multi_sshort.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_uchar.c \
libffi.call/cls_multi_ushort.c libffi.call/cls_multi_ushortchar.c \
libffi.call/cls_schar.c libffi.call/cls_sint.c \
libffi.call/cls_sshort.c libffi.call/cls_uchar.c \
libffi.call/cls_uint.c libffi.call/cls_ulonglong.c \
libffi.call/cls_ushort.c libffi.call/ffitest.h libffi.call/float1.c \
libffi.call/float2.c libffi.call/float3.c libffi.call/float4.c \
libffi.call/float.c libffi.call/many.c libffi.call/many_win32.c \
libffi.call/negint.c libffi.call/nested_struct10.c \
libffi.call/nested_struct1.c libffi.call/nested_struct2.c \
libffi.call/nested_struct3.c libffi.call/nested_struct4.c \
libffi.call/nested_struct5.c libffi.call/nested_struct6.c \
libffi.call/nested_struct7.c libffi.call/nested_struct8.c \
libffi.call/nested_struct9.c libffi.call/nested_struct.c \
libffi.call/problem1.c libffi.call/promotion.c \
libffi.call/pyobjc-tc.c libffi.call/return_dbl1.c \
libffi.call/return_dbl2.c libffi.call/return_dbl.c \
libffi.call/return_fl1.c libffi.call/return_fl2.c \
libffi.call/return_fl3.c libffi.call/return_fl.c \
libffi.call/return_ldl.c libffi.call/return_ll1.c \
libffi.call/return_ll.c libffi.call/return_sc.c \
libffi.call/return_sl.c libffi.call/return_uc.c \
libffi.call/return_ul.c libffi.call/strlen.c \
libffi.call/strlen_win32.c libffi.call/struct1.c \
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
libffi.call/struct8.c libffi.call/struct9.c \
libffi.special/ffitestcxx.h libffi.special/special.exp \
libffi.special/unwindtest.cc libffi.special/unwindtest_ffi_call.cc
all: all-am
@@ -297,14 +249,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign testsuite/Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign testsuite/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -322,16 +274,13 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
@@ -344,11 +293,13 @@ check-DEJAGNU: site.exp
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
l='$(DEJATOOL)'; for tool in $$l; do \
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
fi; \
exit $$exit_status
site.exp: Makefile
@echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@@ -376,30 +327,32 @@ distclean-DEJAGNU:
done
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/config $(distdir)/lib $(distdir)/libffi.call $(distdir)/libffi.special
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -429,6 +382,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -439,8 +393,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-DEJAGNU distclean-generic \
distclean-libtool
distclean-am: clean-am distclean-DEJAGNU distclean-generic
dvi: dvi-am
@@ -448,18 +401,38 @@ dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -478,17 +451,22 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
clean-libtool distclean distclean-DEJAGNU distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am
uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/config
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/config
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-04-24T17:46:16.000000Z
2009-12-20T06:01:56.316555Z
dce80ba7e038ca18591aabc6d3d2582c
2003-09-04T14:49:22.000000Z
71069

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/lib
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/lib
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-07-14T13:03:55.000000Z
2009-12-20T06:01:57.963803Z
806ba5a25b0a14fdf53823cdb63a6c4f
2009-07-11T06:10:49.813211Z
149508

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */

View File

@@ -6,7 +6,7 @@
*/
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */

View File

@@ -57,7 +57,7 @@ int main(int argc __UNUSED__, char** argv __UNUSED__)
CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_gn, NULL, code) == FFI_OK);
((void*(*)(Dbls))(code))(arg);
/* { dg-output "1.0 2.0\n" { xfail x86_64-*-linux-* } } */
/* { dg-output "1.0 2.0\n" } */
closure_test_fn(arg);
/* { dg-output "1.0 2.0\n" } */

View File

@@ -26,7 +26,7 @@ int main (void)
void* args[3];
ffi_type* arg_types[3];
char* format = "%L.1f\n";
char* format = "%.1Lf\n";
long double ldArg = 7;
ffi_arg res = 0;
@@ -42,9 +42,9 @@ int main (void)
args[2] = NULL;
ffi_call(&cif, FFI_FN(printf), &res, args);
// { dg-output "7.0" { xfail i*86-*-linux-* x86_64-*-linux-* } }
// { dg-output "7.0" }
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" { xfail i*86-*-linux-* x86_64-*-linux-* } }
// { dg-output "\nres: 4" }
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_longdouble_va_fn, NULL, code) == FFI_OK);

View File

@@ -54,6 +54,20 @@
#define PRIuLL "llu"
#endif
/* PA HP-UX kludge. */
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
#define PRIuPTR "lu"
#endif
/* Solaris < 10 kludge. */
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
#if defined(__arch64__) || defined (__x86_64__)
#define PRIuPTR "lu"
#else
#define PRIuPTR "u"
#endif
#endif
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
// 13 FPRs: 104 bytes

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
// 13 FPRs: 104 bytes

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
typedef struct struct_72byte {

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
typedef struct struct_72byte {

View File

@@ -1,8 +1,8 @@
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
# Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -11,8 +11,8 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# libffi testsuite that uses the 'dg.exp' driver.

View File

@@ -5,7 +5,7 @@
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */

View File

@@ -6,7 +6,7 @@
*/
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */

View File

@@ -57,7 +57,7 @@ int main(int argc __UNUSED__, char** argv __UNUSED__)
CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_gn, NULL, code) == FFI_OK);
((void*(*)(Dbls))(code))(arg);
/* { dg-output "1.0 2.0\n" { xfail avr32-*-* x86_64-*-linux-* } } */
/* { dg-output "1.0 2.0\n" } */
closure_test_fn(arg);
/* { dg-output "1.0 2.0\n" } */

View File

@@ -5,7 +5,6 @@
Originator: Blake Chaffin 6/6/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-output "" { xfail avr32-*-* } } */
#include "ffitest.h"
static void

View File

@@ -5,7 +5,7 @@
Originator: Blake Chaffin 6/6/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-output "" { xfail avr32-*-* x86_64-*-mingw* } } */
/* { dg-output "" { xfail x86_64-*-mingw* } } */
#include "ffitest.h"
static void
@@ -26,7 +26,7 @@ int main (void)
void* args[3];
ffi_type* arg_types[3];
char* format = "%L.1f\n";
char* format = "%.1Lf\n";
long double ldArg = 7;
ffi_arg res = 0;
@@ -42,9 +42,9 @@ int main (void)
args[2] = NULL;
ffi_call(&cif, FFI_FN(printf), &res, args);
// { dg-output "7.0" { xfail i*86-*-linux-* x86_64-*-linux-* } }
// { dg-output "7.0" }
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" { xfail i*86-*-linux-* x86_64-*-linux-* } }
// { dg-output "\nres: 4" }
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_longdouble_va_fn, NULL, code) == FFI_OK);

View File

@@ -54,6 +54,20 @@
#define PRIuLL "llu"
#endif
/* PA HP-UX kludge. */
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
#define PRIuPTR "lu"
#endif
/* Solaris < 10 kludge. */
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
#if defined(__arch64__) || defined (__x86_64__)
#define PRIuPTR "lu"
#else
#define PRIuPTR "u"
#endif
#endif
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)

View File

@@ -4,7 +4,7 @@
PR: none.
Originator: From the original ffitest.c */
/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-excess-errors "fails" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
#include "ffitest.h"

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
// 13 FPRs: 104 bytes

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
// 13 FPRs: 104 bytes

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
typedef struct struct_72byte {

View File

@@ -6,7 +6,7 @@
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
/* { dg-do run { xfail arm*-*-* strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
typedef struct struct_72byte {

View File

@@ -1,9 +1,9 @@
10
dir
152280
svn://gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/libffi.special
svn://gcc.gnu.org/svn/gcc
155449
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/libffi.special
svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -32,7 +32,7 @@ file
2009-04-24T17:46:17.000000Z
2009-12-20T06:01:58.001555Z
185d0795017fbbe253a13db8e34085f9
2007-08-10T15:38:23.042961Z
127337
@@ -66,7 +66,7 @@ file
2009-06-20T15:53:37.000000Z
2009-12-20T06:01:58.002569Z
c5774898ee6afc81a2f2f50ef5a63b69
2009-06-12T15:57:58.721771Z
148433
@@ -100,7 +100,7 @@ file
2009-04-24T17:46:17.000000Z
2009-12-20T06:01:58.002569Z
92f1548985e720c30797e9e403807475
2009-04-09T15:00:19.611803Z
145841
@@ -134,7 +134,7 @@ file
2009-06-20T15:53:37.000000Z
2009-12-20T06:01:58.002569Z
bf9da8a285fef56aae7657c0982b9b8b
2009-06-16T10:15:31.432585Z
148521

View File

@@ -1,8 +1,8 @@
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
# Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -11,9 +11,8 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# libffi testsuite that uses the 'dg.exp' driver.
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
load_lib libffi-dg.exp