Many changes.
This commit is contained in:
@@ -1,3 +1,30 @@
|
||||
Sat Apr 14 20:49:46 2001 Anthony Green <green@cygnus.com>
|
||||
|
||||
* mips/ffi.c: Include mips/mips.h.
|
||||
* mips/o32.S: Ditto.
|
||||
* mips/n32.S: Ditto.
|
||||
* mips/o32.s: Deleted.
|
||||
* mips/n32.s: Deleted.
|
||||
|
||||
Sat Apr 14 20:47:13 2001 Anthony Green <green@cygnus.com>
|
||||
|
||||
* mips/mips.h: Moved from include/ffi_mips.h.
|
||||
|
||||
Sat Apr 14 20:09:05 2001 Anthony Green <green@cygnus.com>
|
||||
|
||||
* powerpc/asm.h: Remove rcs id.
|
||||
|
||||
Sat Apr 14 15:04:08 2001 Anthony Green <green@cygnus.com>
|
||||
|
||||
* configure.in: Use AC_COMPILE_CHECK_SIZEOF and
|
||||
AC_C_BIGENDIAN_CROSS.
|
||||
|
||||
Sat Apr 14 15:02:53 2001 Anthony Green <green@cygnus.com>
|
||||
|
||||
* aclocal.m4: Rebuilt.
|
||||
* acinclude.m4: New file. Add AC_COMPILE_CHECK_SIZEOF and
|
||||
AC_C_BIGENDIAN_CROSS.
|
||||
|
||||
2001-04-8 Neale Ferguson <Neale.Ferguson@softwareAG-usa.com>
|
||||
|
||||
* src/s390/ffi.c: New file.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
## Process this with automake to create Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
AUTOMAKE_OPTIONS = foreign no-installinfo
|
||||
|
||||
EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
|
||||
src/mips/n32.s src/mips/o32.S src/mips/o32.s \
|
||||
src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
|
||||
src/x86/ffi.c src/x86/sysv.S \
|
||||
src/alpha/ffi.c src/alpha/osf.S \
|
||||
src/m68k/ffi.c src/m68k/sysv.S \
|
||||
src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/asm.h \
|
||||
src/arm/ffi.c src/arm/sysv.S
|
||||
if TESTSUBDIR
|
||||
SUBDIRS = testsuite
|
||||
endif
|
||||
|
||||
VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
|
||||
EXTRA_DIST = LICENSE README ChangeLog.v1 alpha/ffi.c arm/ffi.c \
|
||||
ia64/ffi.c m68k/ffi.c mips/ffi.c powerpc/ffi.c s390/ffi.c \
|
||||
sparc/ffi.c x86/ffi.c alpha/osf.S arm/sysv.S ia64/unix.S \
|
||||
m68k/sysv.S mips/n32.S mips/o32.S \
|
||||
powerpc/sysv.S s390/sysv.S sparc/v8.S sparc/v9.S x86/win32.S \
|
||||
x86/sysv.S
|
||||
|
||||
# Multilib support variables.
|
||||
MULTISRCTOP =
|
||||
@@ -32,52 +32,10 @@ endif
|
||||
|
||||
toolexeclib_LTLIBRARIES = libffi.la
|
||||
|
||||
noinst_PROGRAMS = ffitest
|
||||
|
||||
ffitest_SOURCES = src/ffitest.c
|
||||
ffitest_LDADD = libffi.la
|
||||
|
||||
TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
|
||||
TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
|
||||
TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
|
||||
TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
|
||||
TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
|
||||
TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
|
||||
TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
|
||||
TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S
|
||||
TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
|
||||
|
||||
##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
|
||||
## Work around automake deficiency
|
||||
libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
|
||||
src/raw_api.c src/java_raw_api.c
|
||||
if MIPS_GCC
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
|
||||
endif
|
||||
if MIPS_SGI
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
|
||||
endif
|
||||
if X86
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
|
||||
endif
|
||||
if SPARC
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
|
||||
endif
|
||||
if ALPHA
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
|
||||
endif
|
||||
if IA64
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
|
||||
endif
|
||||
if M68K
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
|
||||
endif
|
||||
if POWERPC
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
|
||||
endif
|
||||
if ARM
|
||||
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
|
||||
endif
|
||||
nodist_libffi_la_SOURCES = t-ffi.c t-asm.S
|
||||
libffi_la_SOURCES = debug.c prep_cif.c types.c \
|
||||
raw_api.c java_raw_api.c $(nodist_libffi_la_SOURCES)
|
||||
|
||||
AM_CFLAGS = -fexceptions
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
97
libffi/acinclude.m4
Normal file
97
libffi/acinclude.m4
Normal file
@@ -0,0 +1,97 @@
|
||||
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
||||
AC_TRY_COMPILE([#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([AC_C_BIGENDIAN_CROSS],
|
||||
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
|
||||
[ac_cv_c_bigendian=unknown
|
||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/param.h>], [
|
||||
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||
bogus endian macros
|
||||
#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/param.h>], [
|
||||
#if BYTE_ORDER != BIG_ENDIAN
|
||||
not big endian
|
||||
#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
AC_TRY_RUN([main () {
|
||||
/* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{
|
||||
long l;
|
||||
char c[sizeof (long)];
|
||||
} u;
|
||||
u.l = 1;
|
||||
exit (u.c[sizeof (long) - 1] == 1);
|
||||
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
|
||||
[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
|
||||
fi])
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
AC_MSG_CHECKING(to probe for byte ordering)
|
||||
[
|
||||
cat >conftest.c <<EOF
|
||||
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
|
||||
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
|
||||
void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
|
||||
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
|
||||
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
|
||||
void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
|
||||
int main() { _ascii (); _ebcdic (); return 0; }
|
||||
EOF
|
||||
] if test -f conftest.c ; then
|
||||
if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
|
||||
if test `grep -l BIGenDianSyS conftest.o` ; then
|
||||
echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
|
||||
ac_cv_c_bigendian=yes
|
||||
fi
|
||||
if test `grep -l LiTTleEnDian conftest.o` ; then
|
||||
echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
|
||||
if test $ac_cv_c_bigendian = yes ; then
|
||||
ac_cv_c_bigendian=unknown;
|
||||
else
|
||||
ac_cv_c_bigendian=no
|
||||
fi
|
||||
fi
|
||||
echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_c_bigendian)
|
||||
fi
|
||||
if test $ac_cv_c_bigendian = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
|
||||
BYTEORDER=4321
|
||||
else
|
||||
BYTEORDER=1234
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
|
||||
fi
|
||||
])
|
||||
|
||||
118
libffi/aclocal.m4
vendored
118
libffi/aclocal.m4
vendored
@@ -10,6 +10,104 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
||||
AC_TRY_COMPILE([#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([AC_C_BIGENDIAN_CROSS],
|
||||
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
|
||||
[ac_cv_c_bigendian=unknown
|
||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/param.h>], [
|
||||
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||
bogus endian macros
|
||||
#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/param.h>], [
|
||||
#if BYTE_ORDER != BIG_ENDIAN
|
||||
not big endian
|
||||
#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
AC_TRY_RUN([main () {
|
||||
/* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{
|
||||
long l;
|
||||
char c[sizeof (long)];
|
||||
} u;
|
||||
u.l = 1;
|
||||
exit (u.c[sizeof (long) - 1] == 1);
|
||||
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
|
||||
[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
|
||||
fi])
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
AC_MSG_CHECKING(to probe for byte ordering)
|
||||
[
|
||||
cat >conftest.c <<EOF
|
||||
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
|
||||
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
|
||||
void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
|
||||
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
|
||||
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
|
||||
void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
|
||||
int main() { _ascii (); _ebcdic (); return 0; }
|
||||
EOF
|
||||
] if test -f conftest.c ; then
|
||||
if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
|
||||
if test `grep -l BIGenDianSyS conftest.o` ; then
|
||||
echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
|
||||
ac_cv_c_bigendian=yes
|
||||
fi
|
||||
if test `grep -l LiTTleEnDian conftest.o` ; then
|
||||
echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
|
||||
if test $ac_cv_c_bigendian = yes ; then
|
||||
ac_cv_c_bigendian=unknown;
|
||||
else
|
||||
ac_cv_c_bigendian=no
|
||||
fi
|
||||
fi
|
||||
echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_c_bigendian)
|
||||
fi
|
||||
if test $ac_cv_c_bigendian = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
|
||||
BYTEORDER=4321
|
||||
else
|
||||
BYTEORDER=1234
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
|
||||
if test $ac_cv_c_bigendian = unknown; then
|
||||
AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
@@ -172,7 +270,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
@@ -204,13 +302,13 @@ AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
#
|
||||
# the following will cause an existing older ltconfig to fail, so
|
||||
# we ignore this at the expense of the cache file... Checking this
|
||||
# will just take longer ... bummer!
|
||||
#libtool_flags="--cache-file=$cache_file"
|
||||
#
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
@@ -227,7 +325,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
@@ -443,6 +541,7 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
@@ -488,13 +587,14 @@ else
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
|
||||
247
libffi/alpha/ffi.c
Normal file
247
libffi/alpha/ffi.c
Normal file
@@ -0,0 +1,247 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
ffi.c - Copyright (c) 1998 Cygnus Solutions
|
||||
|
||||
Alpha Foreign Function Interface
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#include <ffi.h>
|
||||
#include <ffi_common.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)());
|
||||
extern void ffi_closure_osf(void);
|
||||
|
||||
|
||||
ffi_status
|
||||
ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
{
|
||||
/* Adjust cif->bytes to represent a minimum 6 words for the temporary
|
||||
register argument loading area. */
|
||||
if (cif->bytes < 6*SIZEOF_ARG)
|
||||
cif->bytes = 6*SIZEOF_ARG;
|
||||
|
||||
/* Set the return type flag */
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_STRUCT:
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
cif->flags = cif->rtype->type;
|
||||
break;
|
||||
|
||||
default:
|
||||
cif->flags = FFI_TYPE_INT;
|
||||
break;
|
||||
}
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
void
|
||||
ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
|
||||
{
|
||||
unsigned long *stack, *argp;
|
||||
long i, avn;
|
||||
ffi_type **arg_types;
|
||||
|
||||
FFI_ASSERT (cif->abi == FFI_OSF);
|
||||
|
||||
/* If the return value is a struct and we don't have a return
|
||||
value address then we need to make one. */
|
||||
if (rvalue == NULL && cif->flags == FFI_TYPE_STRUCT)
|
||||
rvalue = alloca(cif->rtype->size);
|
||||
|
||||
/* Allocate the space for the arguments, plus 4 words of temp
|
||||
space for ffi_call_osf. */
|
||||
argp = stack = alloca(cif->bytes + 4*SIZEOF_ARG);
|
||||
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
*(void **) argp++ = rvalue;
|
||||
|
||||
i = 0;
|
||||
avn = cif->nargs;
|
||||
arg_types = cif->arg_types;
|
||||
|
||||
while (i < avn)
|
||||
{
|
||||
switch ((*arg_types)->type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
*(SINT64 *) argp = *(SINT8 *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT8:
|
||||
*(SINT64 *) argp = *(UINT8 *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT16:
|
||||
*(SINT64 *) argp = *(SINT16 *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_UINT16:
|
||||
*(SINT64 *) argp = *(UINT16 *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT32:
|
||||
case FFI_TYPE_UINT32:
|
||||
/* Note that unsigned 32-bit quantities are sign extended. */
|
||||
*(SINT64 *) argp = *(SINT32 *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
*(UINT64 *) argp = *(UINT64 *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
if (argp - stack < 6)
|
||||
{
|
||||
/* Note the conversion -- all the fp regs are loaded as
|
||||
doubles. The in-register format is the same. */
|
||||
*(double *) argp = *(float *)(* avalue);
|
||||
}
|
||||
else
|
||||
*(float *) argp = *(float *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_DOUBLE:
|
||||
*(double *) argp = *(double *)(* avalue);
|
||||
break;
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
memcpy(argp, *avalue, (*arg_types)->size);
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
|
||||
argp += ALIGN((*arg_types)->size, SIZEOF_ARG) / SIZEOF_ARG;
|
||||
i++, arg_types++, avalue++;
|
||||
}
|
||||
|
||||
ffi_call_osf(stack, cif->bytes, cif->flags, rvalue, fn);
|
||||
}
|
||||
|
||||
|
||||
ffi_status
|
||||
ffi_prep_closure (ffi_closure* closure,
|
||||
ffi_cif* cif,
|
||||
void (*fun)(ffi_cif*, void*, void**, void*),
|
||||
void *user_data)
|
||||
{
|
||||
unsigned int *tramp;
|
||||
|
||||
FFI_ASSERT (cif->abi == FFI_OSF);
|
||||
|
||||
tramp = (unsigned int *) &closure->tramp[0];
|
||||
tramp[0] = 0x47fb0401; /* mov $27,$1 */
|
||||
tramp[1] = 0xa77b0010; /* ldq $27,16($27) */
|
||||
tramp[2] = 0x6bfb0000; /* jmp $31,($27),0 */
|
||||
tramp[3] = 0x47ff041f; /* nop */
|
||||
*(void **) &tramp[4] = ffi_closure_osf;
|
||||
|
||||
closure->cif = cif;
|
||||
closure->fun = fun;
|
||||
closure->user_data = user_data;
|
||||
|
||||
/* Flush the Icache. */
|
||||
asm volatile ("imb" : : : "memory");
|
||||
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
int
|
||||
ffi_closure_osf_inner(ffi_closure *closure, void *rvalue, unsigned long *argp)
|
||||
{
|
||||
ffi_cif *cif;
|
||||
void **avalue;
|
||||
ffi_type **arg_types;
|
||||
long i, avn, argn;
|
||||
|
||||
cif = closure->cif;
|
||||
avalue = alloca(cif->nargs * sizeof(void *));
|
||||
|
||||
argn = 0;
|
||||
|
||||
/* Copy the caller's structure return address to that the closure
|
||||
returns the data directly to the caller. */
|
||||
if (cif->flags == FFI_TYPE_STRUCT)
|
||||
{
|
||||
rvalue = (void *) argp[0];
|
||||
argn = 1;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
avn = cif->nargs;
|
||||
arg_types = cif->arg_types;
|
||||
|
||||
/* Grab the addresses of the arguments from the stack frame. */
|
||||
while (i < avn)
|
||||
{
|
||||
switch (arg_types[i]->type)
|
||||
{
|
||||
case FFI_TYPE_SINT8:
|
||||
case FFI_TYPE_UINT8:
|
||||
case FFI_TYPE_SINT16:
|
||||
case FFI_TYPE_UINT16:
|
||||
case FFI_TYPE_SINT32:
|
||||
case FFI_TYPE_UINT32:
|
||||
case FFI_TYPE_SINT64:
|
||||
case FFI_TYPE_UINT64:
|
||||
case FFI_TYPE_POINTER:
|
||||
case FFI_TYPE_STRUCT:
|
||||
avalue[i] = &argp[argn];
|
||||
break;
|
||||
|
||||
case FFI_TYPE_FLOAT:
|
||||
if (argn < 6)
|
||||
{
|
||||
/* Floats coming from registers need conversion from double
|
||||
back to float format. */
|
||||
*(float *)&argp[argn - 6] = *(double *)&argp[argn - 6];
|
||||
avalue[i] = &argp[argn - 6];
|
||||
}
|
||||
else
|
||||
avalue[i] = &argp[argn];
|
||||
break;
|
||||
|
||||
case FFI_TYPE_DOUBLE:
|
||||
avalue[i] = &argp[argn - (argn < 6 ? 6 : 0)];
|
||||
break;
|
||||
|
||||
default:
|
||||
FFI_ASSERT(0);
|
||||
}
|
||||
|
||||
argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Invoke the closure. */
|
||||
(closure->fun) (cif, rvalue, avalue, closure->user_data);
|
||||
|
||||
/* Tell ffi_closure_osf how to perform return type promotions. */
|
||||
return cif->rtype->type;
|
||||
}
|
||||
277
libffi/alpha/osf.S
Normal file
277
libffi/alpha/osf.S
Normal file
@@ -0,0 +1,277 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
osf.S - Copyright (c) 1998 Cygnus Solutions
|
||||
|
||||
Alpha/OSF Foreign Function Interface
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#define LIBFFI_ASM
|
||||
#include <ffi.h>
|
||||
|
||||
.arch ev6
|
||||
.text
|
||||
|
||||
/* ffi_call_osf (void *args, unsigned long bytes, unsigned flags,
|
||||
void *raddr, void (*fnaddr)());
|
||||
|
||||
Bit o trickiness here -- ARGS+BYTES is the base of the stack frame
|
||||
for this function. This has been allocated by ffi_call. We also
|
||||
deallocate some of the stack that has been alloca'd. */
|
||||
|
||||
.align 3
|
||||
.globl ffi_call_osf
|
||||
.ent ffi_call_osf
|
||||
ffi_call_osf:
|
||||
.frame $15, 32, $26, 0
|
||||
.mask 0x4008000, -32
|
||||
addq $16,$17,$1
|
||||
mov $16, $30
|
||||
stq $26, 0($1)
|
||||
stq $15, 8($1)
|
||||
stq $18, 16($1)
|
||||
mov $1, $15
|
||||
.prologue 0
|
||||
|
||||
stq $19, 24($1)
|
||||
mov $20, $27
|
||||
|
||||
# Load up all of the (potential) argument registers.
|
||||
ldq $16, 0($30)
|
||||
ldt $f16, 0($30)
|
||||
ldt $f17, 8($30)
|
||||
ldq $17, 8($30)
|
||||
ldt $f18, 16($30)
|
||||
ldq $18, 16($30)
|
||||
ldt $f19, 24($30)
|
||||
ldq $19, 24($30)
|
||||
ldt $f20, 32($30)
|
||||
ldq $20, 32($30)
|
||||
ldt $f21, 40($30)
|
||||
ldq $21, 40($30)
|
||||
|
||||
# Deallocate the register argument area.
|
||||
lda $30, 48($30)
|
||||
|
||||
jsr $26, ($27), 0
|
||||
ldgp $29, 0($26)
|
||||
|
||||
# If the return value pointer is NULL, assume no return value.
|
||||
ldq $19, 24($15)
|
||||
ldq $18, 16($15)
|
||||
ldq $26, 0($15)
|
||||
beq $19, $noretval
|
||||
|
||||
# Store the return value out in the proper type.
|
||||
cmpeq $18, FFI_TYPE_INT, $1
|
||||
bne $1, $retint
|
||||
cmpeq $18, FFI_TYPE_FLOAT, $2
|
||||
bne $2, $retfloat
|
||||
cmpeq $18, FFI_TYPE_DOUBLE, $3
|
||||
bne $3, $retdouble
|
||||
|
||||
$noretval:
|
||||
ldq $15, 8($15)
|
||||
ret
|
||||
|
||||
$retint:
|
||||
stq $0, 0($19)
|
||||
nop
|
||||
ldq $15, 8($15)
|
||||
ret
|
||||
|
||||
$retfloat:
|
||||
sts $f0, 0($19)
|
||||
nop
|
||||
ldq $15, 8($15)
|
||||
ret
|
||||
|
||||
$retdouble:
|
||||
stt $f0, 0($19)
|
||||
nop
|
||||
ldq $15, 8($15)
|
||||
ret
|
||||
|
||||
.end ffi_call_osf
|
||||
|
||||
/* ffi_closure_osf(...)
|
||||
|
||||
Receives the closure argument in $1. */
|
||||
|
||||
.align 3
|
||||
.globl ffi_closure_osf
|
||||
.ent ffi_closure_osf
|
||||
ffi_closure_osf:
|
||||
.frame $30, 16*8, $26, 0
|
||||
.mask 0x4000000, -16*8
|
||||
ldgp $29, 0($27)
|
||||
subq $30, 16*8, $30
|
||||
stq $26, 0($30)
|
||||
.prologue 1
|
||||
|
||||
# Store all of the potential argument registers in va_list format.
|
||||
stt $f16, 4*8($30)
|
||||
stt $f17, 5*8($30)
|
||||
stt $f18, 6*8($30)
|
||||
stt $f19, 7*8($30)
|
||||
stt $f20, 8*8($30)
|
||||
stt $f21, 9*8($30)
|
||||
stq $16, 10*8($30)
|
||||
stq $17, 11*8($30)
|
||||
stq $18, 12*8($30)
|
||||
stq $19, 13*8($30)
|
||||
stq $20, 14*8($30)
|
||||
stq $21, 15*8($30)
|
||||
|
||||
# Call ffi_closure_osf_inner to do the bulk of the work.
|
||||
mov $1, $16
|
||||
lda $17, 2*8($30)
|
||||
lda $18, 10*8($30)
|
||||
jsr $26, ffi_closure_osf_inner
|
||||
ldgp $29, 0($26)
|
||||
ldq $26, 0($30)
|
||||
|
||||
# Load up the return value in the proper type.
|
||||
lda $1, $load_table
|
||||
s4addq $0, $1, $1
|
||||
ldl $1, 0($1)
|
||||
addq $1, $29, $1
|
||||
jmp $31, ($1), $load_32
|
||||
|
||||
.align 4
|
||||
$load_none:
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_float:
|
||||
lds $f0, 16($30)
|
||||
nop
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_double:
|
||||
ldt $f0, 16($30)
|
||||
nop
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_u8:
|
||||
#ifdef __alpha_bwx__
|
||||
ldbu $0, 16($30)
|
||||
nop
|
||||
#else
|
||||
ldq $0, 16($30)
|
||||
and $0, 255, $0
|
||||
#endif
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_s8:
|
||||
#ifdef __alpha_bwx__
|
||||
ldbu $0, 16($30)
|
||||
sextb $0, $0
|
||||
#else
|
||||
ldq $0, 16($30)
|
||||
sll $0, 56, $0
|
||||
sra $0, 56, $0
|
||||
#endif
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_u16:
|
||||
#ifdef __alpha_bwx__
|
||||
ldwu $0, 16($30)
|
||||
nop
|
||||
#else
|
||||
ldq $0, 16($30)
|
||||
zapnot $0, 3, $0
|
||||
#endif
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_s16:
|
||||
#ifdef __alpha_bwx__
|
||||
ldwu $0, 16($30)
|
||||
sextw $0, $0
|
||||
#else
|
||||
ldq $0, 16($30)
|
||||
sll $0, 48, $0
|
||||
sra $0, 48, $0
|
||||
#endif
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_32:
|
||||
ldl $0, 16($30)
|
||||
nop
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.align 4
|
||||
$load_64:
|
||||
ldq $0, 16($30)
|
||||
nop
|
||||
addq $30, 16*8, $30
|
||||
ret
|
||||
|
||||
.end ffi_closure_osf
|
||||
|
||||
.section .rodata
|
||||
$load_table:
|
||||
.gprel32 $load_none # FFI_TYPE_VOID
|
||||
.gprel32 $load_32 # FFI_TYPE_INT
|
||||
.gprel32 $load_float # FFI_TYPE_FLOAT
|
||||
.gprel32 $load_double # FFI_TYPE_DOUBLE
|
||||
.gprel32 $load_double # FFI_TYPE_LONGDOUBLE
|
||||
.gprel32 $load_u8 # FFI_TYPE_UINT8
|
||||
.gprel32 $load_s8 # FFI_TYPE_SINT8
|
||||
.gprel32 $load_u16 # FFI_TYPE_UINT16
|
||||
.gprel32 $load_s16 # FFI_TYPE_SINT16
|
||||
.gprel32 $load_32 # FFI_TYPE_UINT32
|
||||
.gprel32 $load_32 # FFI_TYPE_SINT32
|
||||
.gprel32 $load_64 # FFI_TYPE_UINT64
|
||||
.gprel32 $load_64 # FFI_TYPE_SINT64
|
||||
.gprel32 $load_none # FFI_TYPE_STRUCT
|
||||
.gprel32 $load_64 # FFI_TYPE_POINTER
|
||||
|
||||
/* Assert that the table above is in sync with ffi.h. */
|
||||
|
||||
#if FFI_TYPE_FLOAT != 2 \
|
||||
|| FFI_TYPE_DOUBLE != 3 \
|
||||
|| FFI_TYPE_UINT8 != 5 \
|
||||
|| FFI_TYPE_SINT8 != 6 \
|
||||
|| FFI_TYPE_UINT16 != 7 \
|
||||
|| FFI_TYPE_SINT16 != 8 \
|
||||
|| FFI_TYPE_UINT32 != 9 \
|
||||
|| FFI_TYPE_SINT32 != 10 \
|
||||
|| FFI_TYPE_UINT64 != 11 \
|
||||
|| FFI_TYPE_SINT64 != 12 \
|
||||
|| FFI_TYPE_STRUCT != 13 \
|
||||
|| FFI_TYPE_POINTER != 14 \
|
||||
|| FFI_TYPE_LAST != 14
|
||||
#error "osf.S out of sync with ffi.h"
|
||||
#endif
|
||||
840
libffi/configure
vendored
840
libffi/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,6 @@ dnl Process this with autoconf to create configure
|
||||
AC_INIT(fficonfig.h.in)
|
||||
AM_CONFIG_HEADER(fficonfig.h)
|
||||
|
||||
AC_MSG_WARN(***********************************************************)
|
||||
AC_MSG_WARN(***********************************************************)
|
||||
AC_MSG_WARN(This is beta code. If you're looking for a stable release)
|
||||
AC_MSG_WARN(then use the most recent one - libffi-1.20.)
|
||||
AC_MSG_WARN(***********************************************************)
|
||||
AC_MSG_WARN(***********************************************************)
|
||||
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
@@ -41,60 +34,91 @@ AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LN_S
|
||||
|
||||
TARGETDIR="unknown"
|
||||
dnl The -no-testsuite modules omit the test subdir.
|
||||
AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
|
||||
|
||||
AM_RUNTESTFLAGS=
|
||||
|
||||
TARGET="unknown"
|
||||
case "$host" in
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
|
||||
i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
||||
i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
||||
i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
||||
sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
sparc-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
|
||||
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
|
||||
m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
|
||||
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
|
||||
powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
|
||||
arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
|
||||
s390-*-linux*) TARGET=S390; TARGETDIR=s390;;
|
||||
alpha*-*-linux* | alpha*-*-osf*)
|
||||
TARGET=ALPHA;
|
||||
$LN_S ${srcdir}/alpha/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/alpha/osf.S t-asm.S;;
|
||||
arm*-*-linux-*)
|
||||
TARGET=ARM;
|
||||
$LN_S $srcdir/arm/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/arm/ffi.S t-asm.S;;
|
||||
i*86-*-beos*|i*86-*-freebsd*|i*86-*-linux*|i*86-*-solaris*)
|
||||
TARGET=X86;
|
||||
$LN_S $srcdir/x86/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/x86/sysv.S t-asm.S;;
|
||||
i*86-*-cygwin*|i*86-*-mingw*|i*86-*-win32*)
|
||||
TARGET=X86_WIN32;
|
||||
$LN_S $srcdir/x86/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/x86/win32.S t-asm.S;;
|
||||
ia64*-*-*)
|
||||
TARGET=IA64;
|
||||
$LN_S $srcdir/ia64/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/ia64/unix.S t-asm.S;;
|
||||
m68k-*-linux*)
|
||||
TARGET=M68K;
|
||||
$LN_S $srcdir/m68k/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/m68k/unix.S t-asm.S;;
|
||||
mips-*-elf)
|
||||
TARGET=MIPS;
|
||||
$LN_S $srcdir/mips/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/mips/o32.S t-asm.S;;
|
||||
mips-sgi-irix5.*)
|
||||
TARGET=MIPS;
|
||||
$LN_S $srcdir/mips/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/mips/o32.S t-asm.S;;
|
||||
mips-sgi-irix6.*)
|
||||
TARGET=MIPS;
|
||||
$LN_S $srcdir/mips/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/mips/n32.S t-asm.S;;
|
||||
powerpc-*-linux* | powerpc-*-sysv* | powerpc-*-beos*)
|
||||
TARGET=POWERPC;
|
||||
$LN_S $srcdir/powerpc/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/powerpc/sysv.S t-asm.S;;
|
||||
s390-*-linux*)
|
||||
TARGET=S390;
|
||||
$LN_S $srcdir/s390/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/s390/v8.S t-asm.S;;
|
||||
sparc-*-linux*|sparc-sun-*)
|
||||
TARGET=SPARC;
|
||||
$LN_S $srcdir/sparc/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/sparc/v8.S t-asm.S;;
|
||||
sparc64-*-linux*)
|
||||
TARGET=SPARC;
|
||||
$LN_S $srcdir/sparc/ffi.c t-ffi.c;
|
||||
$LN_S $srcdir/sparc/v9.S t-asm.S;;
|
||||
esac
|
||||
|
||||
if test $TARGETDIR = unknown; then
|
||||
AC_SUBST(AM_RUNTESTFLAGS)
|
||||
|
||||
if test ${TARGET} = unknown; then
|
||||
AC_ERROR("libffi has not been ported to $host.")
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
|
||||
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
|
||||
AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
|
||||
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
AM_CONDITIONAL(S390, test x$TARGET = xS390)
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_FUNCS(memcpy)
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
dnl AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(float)
|
||||
AC_CHECK_SIZEOF(double)
|
||||
AC_CHECK_SIZEOF(long double)
|
||||
AC_COMPILE_CHECK_SIZEOF(short)
|
||||
AC_COMPILE_CHECK_SIZEOF(int)
|
||||
AC_COMPILE_CHECK_SIZEOF(long)
|
||||
AC_COMPILE_CHECK_SIZEOF(long long)
|
||||
AC_COMPILE_CHECK_SIZEOF(float)
|
||||
AC_COMPILE_CHECK_SIZEOF(double)
|
||||
AC_COMPILE_CHECK_SIZEOF(long double)
|
||||
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_C_BIGENDIAN
|
||||
AC_COMPILE_CHECK_SIZEOF(void *)
|
||||
AC_C_BIGENDIAN_CROSS
|
||||
|
||||
AC_SUBST(TARGET)
|
||||
AC_SUBST(TARGETDIR)
|
||||
@@ -118,7 +142,7 @@ else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
AC_OUTPUT(include/Makefile include/ffi.h Makefile,
|
||||
AC_OUTPUT(include/Makefile testsuite/Makefile Makefile,
|
||||
[
|
||||
if test -n "$CONFIG_FILES"; then
|
||||
ac_file=Makefile . ${libffi_basedir}/config-ml.in
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define this if you want extra debugging */
|
||||
#undef FFI_DEBUG
|
||||
|
||||
@@ -42,29 +38,36 @@
|
||||
/* Define this is you do not want support for the raw API. */
|
||||
#undef FFI_NO_RAW_API
|
||||
|
||||
/* The number of bytes in a double. */
|
||||
#undef SIZEOF_DOUBLE
|
||||
|
||||
/* The number of bytes in a float. */
|
||||
#undef SIZEOF_FLOAT
|
||||
|
||||
/* The number of bytes in a int. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The number of bytes in a long. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The number of bytes in a long double. */
|
||||
#undef SIZEOF_LONG_DOUBLE
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The number of bytes in a short. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The number of bytes in a void *. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#undef HAVE_MEMCPY
|
||||
|
||||
/* The number of bytes in type short */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The number of bytes in type int */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The number of bytes in type long */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The number of bytes in type long long */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The number of bytes in type float */
|
||||
#undef SIZEOF_FLOAT
|
||||
|
||||
/* The number of bytes in type double */
|
||||
#undef SIZEOF_DOUBLE
|
||||
|
||||
/* The number of bytes in type long double */
|
||||
#undef SIZEOF_LONG_DOUBLE
|
||||
|
||||
/* The number of bytes in type void * */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* whether byteorder is bigendian */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
|
||||
#undef BYTEORDER
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4d from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 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.
|
||||
@@ -11,6 +10,7 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -32,6 +32,8 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
@@ -44,11 +46,9 @@ AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_FLAG =
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
@@ -57,18 +57,19 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NM = @NM@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
@@ -78,7 +79,6 @@ TARGETDIR = @TARGETDIR@
|
||||
VERSION = @VERSION@
|
||||
libffi_basedir = @libffi_basedir@
|
||||
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
EXTRA_DIST = ffi.h.in ffi_common.h ffi_mips.h
|
||||
@@ -86,47 +86,45 @@ EXTRA_DIST = ffi.h.in ffi_common.h ffi_mips.h
|
||||
hackdir = $(includedir)
|
||||
|
||||
hack_DATA = fficonfig.h ffi.h ffi_mips.h
|
||||
subdir = include
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../fficonfig.h
|
||||
CONFIG_CLEAN_FILES = ffi.h
|
||||
DIST_SOURCES =
|
||||
CONFIG_CLEAN_FILES =
|
||||
DATA = $(hack_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in ffi.h.in
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-am
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
ffi.h: $(top_builddir)/config.status ffi.h.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
||||
|
||||
install-hackDATA: $(hack_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(hackdir)
|
||||
@list='$(hack_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(hackdir)/$$f"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(hackdir)/$$f; \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(hackdir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(hackdir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(hackdir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(hackdir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-hackDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(hack_DATA)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f $(DESTDIR)$(hackdir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(hackdir)/$$f; \
|
||||
list='$(hack_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(hackdir)/$$p; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
@@ -134,17 +132,22 @@ TAGS:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = include
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign include/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
@@ -167,8 +170,9 @@ install: install-am
|
||||
uninstall-am: uninstall-hackDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(hackdir)
|
||||
|
||||
@@ -182,31 +186,31 @@ distclean-generic:
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f Makefile.in
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
.PHONY: check check-am clean clean-generic distclean distclean-generic \
|
||||
distdir dvi dvi-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-hackDATA \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic uninstall uninstall-am uninstall-hackDATA
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: uninstall-hackDATA install-hackDATA tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
||||
120
libffi/include/ffi_private.h
Normal file
120
libffi/include/ffi_private.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/* -----------------------------------------------------------------*-C-*-
|
||||
libffi 2.0.0 - Copyright (C) 1996, 1997, 1998, 1999, 2000,
|
||||
2001 Red Hat, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL RED HAT BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#include <fficonfig.h>
|
||||
|
||||
#define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1)
|
||||
|
||||
/* ---- Generic type definitions ----------------------------------------- */
|
||||
|
||||
#define FLOAT32 float
|
||||
#define FLOAT64 double
|
||||
#define FLOAT80 long double
|
||||
|
||||
#define UINT8 unsigned char
|
||||
#define SINT8 signed char
|
||||
|
||||
#if SIZEOF_INT == 2
|
||||
|
||||
#define UINT16 unsigned int
|
||||
#define SINT16 int
|
||||
|
||||
#else
|
||||
#if SIZEOF_SHORT == 2
|
||||
|
||||
#define UINT16 unsigned short
|
||||
#define SINT16 short
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SIZEOF_INT == 4
|
||||
|
||||
#define UINT32 unsigned int
|
||||
#define SINT32 int
|
||||
|
||||
#else
|
||||
#if SIZEOF_SHORT == 4
|
||||
|
||||
#define UINT32 unsigned short
|
||||
#define SINT32 short
|
||||
|
||||
#else
|
||||
#if SIZEOF_LONG == 4
|
||||
|
||||
#define UINT32 unsigned long
|
||||
#define SINT32 long
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SIZEOF_INT == 8
|
||||
|
||||
#define UINT64 unsigned int
|
||||
#define SINT64 int
|
||||
|
||||
#else
|
||||
#if SIZEOF_LONG == 8
|
||||
|
||||
#define UINT64 unsigned long
|
||||
#define SINT64 long
|
||||
|
||||
#else
|
||||
#if SIZEOF_LONG_LONG == 8
|
||||
|
||||
#define UINT64 unsigned long long
|
||||
#define SINT64 long long
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define FFI_TYPE_VOID 0
|
||||
#define FFI_TYPE_INT 1
|
||||
#define FFI_TYPE_FLOAT 2
|
||||
#define FFI_TYPE_DOUBLE 3
|
||||
#if SIZEOF_LONG_DOUBLE == SIZEOF_DOUBLE
|
||||
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
|
||||
#else
|
||||
#define FFI_TYPE_LONGDOUBLE 4
|
||||
#endif
|
||||
#define FFI_TYPE_UINT8 5 /* If this changes, update ffi_mips.h. */
|
||||
#define FFI_TYPE_SINT8 6 /* If this changes, update ffi_mips.h. */
|
||||
#define FFI_TYPE_UINT16 7
|
||||
#define FFI_TYPE_SINT16 8
|
||||
#define FFI_TYPE_UINT32 9
|
||||
#define FFI_TYPE_SINT32 10
|
||||
#define FFI_TYPE_UINT64 11
|
||||
#define FFI_TYPE_SINT64 12
|
||||
#define FFI_TYPE_STRUCT 13 /* If this changes, update ffi_mips.h. */
|
||||
#define FFI_TYPE_POINTER 14
|
||||
|
||||
#if _MIPS_SIM==_ABIN32 && defined(_ABIN32)
|
||||
#define SIZEOF_ARG 8
|
||||
#else
|
||||
#define SIZEOF_ARG SIZEOF_VOID_P
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user