Merge from gcc
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.10 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 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 +13,11 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
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
|
||||
@@ -43,7 +39,7 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
@@ -53,21 +49,16 @@ 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@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -88,38 +79,23 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FRV_FALSE = @FRV_FALSE@
|
||||
FRV_TRUE = @FRV_TRUE@
|
||||
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@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@
|
||||
LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
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_IRIX_FALSE = @MIPS_IRIX_FALSE@
|
||||
MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@
|
||||
MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@
|
||||
MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PA64_HPUX_FALSE = @PA64_HPUX_FALSE@
|
||||
PA64_HPUX_TRUE = @PA64_HPUX_TRUE@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -127,53 +103,21 @@ 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_TRUE = @X86_TRUE@
|
||||
X86_WIN32_FALSE = @X86_WIN32_FALSE@
|
||||
X86_WIN32_TRUE = @X86_WIN32_TRUE@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
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@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
@@ -185,26 +129,35 @@ build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
@@ -213,6 +166,8 @@ target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign dejagnu
|
||||
|
||||
# Setup the testing framework, if you have one
|
||||
@@ -263,10 +218,6 @@ mostlyclean-libtool:
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
@@ -279,11 +230,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
|
||||
@@ -311,22 +264,21 @@ distclean-DEJAGNU:
|
||||
done
|
||||
|
||||
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 \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
@@ -373,8 +325,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
|
||||
|
||||
@@ -388,12 +339,20 @@ info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
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
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -412,17 +371,21 @@ ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: 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.
|
||||
|
||||
@@ -120,7 +120,7 @@ proc libffi-init { args } {
|
||||
if { [is_remote host] == 0 && [which $compiler] != 0 } {
|
||||
foreach i "[exec $compiler --print-multi-lib]" {
|
||||
set mldir ""
|
||||
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
|
||||
regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
|
||||
set mldir [string trimright $mldir "\;@"]
|
||||
if { "$mldir" == "." } {
|
||||
continue
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003 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
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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.
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# libffi testsuite that uses the 'dg.exp' driver.
|
||||
|
||||
@@ -23,10 +23,7 @@ libffi-init
|
||||
|
||||
global srcdir subdir
|
||||
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O0 -W -Wall" ""
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2" ""
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O3" ""
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-Os" ""
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
|
||||
|
||||
dg-finish
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata)
|
||||
closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) +
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "ffitest.h"
|
||||
|
||||
|
||||
static void closure_test_fn1(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
static void closure_test_fn1(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void closure_test_fn2(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
static void closure_test_fn2(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void closure_test_fn3(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
static void closure_test_fn3(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
closure_test_fn0(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata)
|
||||
closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
Originator: <andreast@gcc.gnu.org> 20031026 */
|
||||
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
closure_test_fn5(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata)
|
||||
closure_test_fn5(ffi_cif* cif,void* resp,void** args, void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] +
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_12byte cls_struct_12byte_fn(struct cls_struct_12byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_12byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args , void* userdata __UNUSED__)
|
||||
static void cls_struct_12byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_12byte b1, b2;
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_16byte cls_struct_16byte_fn(struct cls_struct_16byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_16byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
static void cls_struct_16byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_16byte b1, b2;
|
||||
|
||||
|
||||
@@ -33,8 +33,7 @@ cls_struct_18byte cls_struct_18byte_fn(struct cls_struct_18byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_18byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_18byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_18byte a1, a2;
|
||||
|
||||
|
||||
@@ -36,8 +36,7 @@ cls_struct_19byte cls_struct_19byte_fn(struct cls_struct_19byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_19byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_19byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_19byte a1, a2;
|
||||
|
||||
|
||||
@@ -26,8 +26,7 @@ cls_struct_1_1byte cls_struct_1_1byte_fn(struct cls_struct_1_1byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_1_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_1_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_1_1byte a1, a2;
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_20byte a1, a2;
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_20byte a1, a2;
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ cls_struct_24byte cls_struct_24byte_fn(struct cls_struct_24byte b0,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_24byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_24byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_24byte b0, b1, b2, b3;
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_2byte cls_struct_2byte_fn(struct cls_struct_2byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_2byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_2byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_2byte a1, a2;
|
||||
|
||||
@@ -32,8 +32,7 @@ cls_struct_3_1byte cls_struct_3_1byte_fn(struct cls_struct_3_1byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_3_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_3_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_3_1byte a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_3byte cls_struct_3byte_fn(struct cls_struct_3byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_3byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_3byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_3byte a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_3byte_1 cls_struct_3byte_fn1(struct cls_struct_3byte_1 a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_3byte_gn1(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_3byte_gn1(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_3byte_1 a1, a2;
|
||||
|
||||
@@ -34,8 +34,7 @@ cls_struct_4_1byte cls_struct_4_1byte_fn(struct cls_struct_4_1byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_4_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_4_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_4_1byte a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_4byte cls_struct_4byte_fn(struct cls_struct_4byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_4byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_4byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_4byte a1, a2;
|
||||
|
||||
@@ -36,8 +36,7 @@ cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_5byte a1, a2;
|
||||
|
||||
@@ -31,8 +31,7 @@ cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_5byte a1, a2;
|
||||
|
||||
@@ -43,8 +43,7 @@ cls_struct_64byte cls_struct_64byte_fn(struct cls_struct_64byte b0,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_64byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_64byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_64byte b0, b1, b2, b3;
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_6byte a1, a2;
|
||||
|
||||
@@ -33,8 +33,7 @@ cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_6byte a1, a2;
|
||||
|
||||
@@ -40,8 +40,7 @@ cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_7byte a1, a2;
|
||||
|
||||
@@ -33,8 +33,7 @@ cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_7byte a1, a2;
|
||||
|
||||
@@ -27,8 +27,7 @@ cls_struct_8byte cls_struct_8byte_fn(struct cls_struct_8byte a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_8byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_8byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_8byte a1, a2;
|
||||
|
||||
@@ -29,8 +29,8 @@ cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
|
||||
void* userdata)
|
||||
{
|
||||
struct cls_struct_9byte b1, b2;
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args,
|
||||
void* userdata)
|
||||
{
|
||||
struct cls_struct_9byte b1, b2;
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -29,8 +29,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -19,19 +19,16 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
struct cls_struct_align result;
|
||||
|
||||
result.a = a1.a + a2.a;
|
||||
result.b = (void *)((unsigned long)a1.b + (unsigned long)a2.b);
|
||||
result.b = (void *)((size_t)a1.b + (size_t)a2.b);
|
||||
result.c = a1.c + a2.c;
|
||||
|
||||
printf("%d %lu %d %d %lu %d: %d %lu %d\n", a1.a, (unsigned long)a1.b, a1.c,
|
||||
a2.a, (unsigned long)a2.b, a2.c, result.a, (unsigned long)result.b,
|
||||
result.c);
|
||||
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, (size_t)a1.b, a1.c, a2.a, (size_t)a2.b, a2.c, result.a, (size_t)result.b, result.c);
|
||||
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
@@ -87,14 +84,14 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
|
||||
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
|
||||
printf("res: %d %lu %d\n", res_dbl.a, (unsigned long)res_dbl.b, res_dbl.c);
|
||||
printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c);
|
||||
/* { dg-output "\nres: 13 14271 140" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK);
|
||||
|
||||
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl);
|
||||
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
|
||||
printf("res: %d %lu %d\n", res_dbl.a, (unsigned long)res_dbl.b, res_dbl.c);
|
||||
printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c);
|
||||
/* { dg-output "\nres: 13 14271 140" } */
|
||||
|
||||
exit(0);
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -28,8 +28,7 @@ cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
|
||||
struct cls_struct_align a1, a2;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_double_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(double *)resp = *(double *)args[0];
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_float_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_float_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(float *)resp = *(float *)args[0];
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@ signed char test_func_fn(signed char a1, signed char a2)
|
||||
|
||||
}
|
||||
|
||||
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
signed char a1, a2;
|
||||
|
||||
@@ -68,7 +67,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "2 125: 127" } */
|
||||
printf("res: %d\n", (signed char)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 127" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -19,8 +19,7 @@ signed short test_func_fn(signed short a1, signed short a2)
|
||||
|
||||
}
|
||||
|
||||
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
signed short a1, a2;
|
||||
|
||||
@@ -68,7 +67,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "2 32765: 32767" } */
|
||||
printf("res: %d\n", (unsigned short)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 32767" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -20,8 +20,7 @@ signed short test_func_fn(signed char a1, signed short a2,
|
||||
|
||||
}
|
||||
|
||||
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
signed char a1, a3;
|
||||
signed short a2, a4;
|
||||
@@ -80,7 +79,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "1 32765 127 -128: 32765" } */
|
||||
printf("res: %d\n", (signed short)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 32765" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -20,8 +20,7 @@ unsigned char test_func_fn(unsigned char a1, unsigned char a2,
|
||||
|
||||
}
|
||||
|
||||
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
unsigned char a1, a2, a3, a4;
|
||||
|
||||
@@ -36,9 +35,7 @@ static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
|
||||
typedef unsigned char (*test_type)(unsigned char, unsigned char,
|
||||
unsigned char, unsigned char);
|
||||
|
||||
void test_func(ffi_cif *cif __UNUSED__, void *rval __UNUSED__, void **avals,
|
||||
void *data __UNUSED__)
|
||||
void test_func(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
printf("%d %d %d %d\n", *(unsigned char *)avals[0],
|
||||
*(unsigned char *)avals[1], *(unsigned char *)avals[2],
|
||||
@@ -85,7 +82,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "1 2 127 125: 255" } */
|
||||
printf("res: %d\n", (unsigned char)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 255" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -19,8 +19,7 @@ unsigned short test_func_fn(unsigned short a1, unsigned short a2)
|
||||
|
||||
}
|
||||
|
||||
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
unsigned short a1, a2;
|
||||
|
||||
@@ -68,7 +67,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "2 32765: 32767" } */
|
||||
printf("res: %d\n", (unsigned short)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 32767" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -20,8 +20,7 @@ unsigned short test_func_fn(unsigned char a1, unsigned short a2,
|
||||
|
||||
}
|
||||
|
||||
static void test_func_gn(ffi_cif *cif __UNUSED__, void *rval, void **avals,
|
||||
void *data __UNUSED__)
|
||||
static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data)
|
||||
{
|
||||
unsigned char a1, a3;
|
||||
unsigned short a2, a4;
|
||||
@@ -80,7 +79,7 @@ int main (void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl);
|
||||
/* { dg-output "1 2 127 128: 258" } */
|
||||
printf("res: %d\n", (unsigned short)res_call);
|
||||
printf("res: %d\n", res_call);
|
||||
/* { dg-output "\nres: 258" } */
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK);
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_schar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_schar_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(signed char *)args[0];
|
||||
printf("%d: %d\n",*(signed char *)args[0],
|
||||
(int)*(ffi_arg *)(resp));
|
||||
*(ffi_arg*)resp);
|
||||
}
|
||||
typedef signed char (*cls_ret_schar)(signed char);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_sint_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(signed int *)args[0];
|
||||
printf("%d: %d\n",*(signed int *)args[0],
|
||||
(int)*(ffi_arg *)(resp));
|
||||
*(ffi_arg*)resp);
|
||||
}
|
||||
typedef signed int (*cls_ret_sint)(signed int);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sshort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_sshort_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(signed short *)args[0];
|
||||
printf("%d: %d\n",*(signed short *)args[0],
|
||||
(int)*(ffi_arg *)(resp));
|
||||
*(ffi_arg*)resp);
|
||||
}
|
||||
typedef signed short (*cls_ret_sshort)(signed short);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uchar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
static void cls_ret_uchar_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(unsigned char *)args[0];
|
||||
printf("%d: %d\n",*(unsigned char *)args[0],
|
||||
(int)*(ffi_arg *)(resp));
|
||||
*(ffi_arg*)resp);
|
||||
}
|
||||
typedef unsigned char (*cls_ret_uchar)(unsigned char);
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
{
|
||||
*(ffi_arg *)resp = *(unsigned int *)args[0];
|
||||
static void cls_ret_uint_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg *)resp = *(unsigned int *)args[0];
|
||||
|
||||
printf("%d: %d\n",*(unsigned int *)args[0],
|
||||
(int)*(ffi_arg *)(resp));
|
||||
}
|
||||
printf("%d: %d\n",*(unsigned int *)args[0],
|
||||
*(ffi_arg *)resp);
|
||||
}
|
||||
typedef unsigned int (*cls_ret_uint)(unsigned int);
|
||||
|
||||
int main (void)
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
{
|
||||
*(unsigned long long *)resp= *(unsigned long long *)args[0];
|
||||
static void cls_ret_ulonglong_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(unsigned long long *)resp= *(unsigned long long *)args[0];
|
||||
|
||||
printf("%llu: %llu\n",*(unsigned long long *)args[0],
|
||||
*(unsigned long long *)(resp));
|
||||
}
|
||||
printf("%llu: %llu\n",*(unsigned long long *)args[0],
|
||||
*(unsigned long long *)resp);
|
||||
}
|
||||
typedef unsigned long long (*cls_ret_ulonglong)(unsigned long long);
|
||||
|
||||
int main (void)
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_ushort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
{
|
||||
*(ffi_arg*)resp = *(unsigned short *)args[0];
|
||||
static void cls_ret_ushort_fn(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp = *(unsigned short *)args[0];
|
||||
|
||||
printf("%d: %d\n",*(unsigned short *)args[0],
|
||||
(int)*(ffi_arg *)(resp));
|
||||
}
|
||||
printf("%d: %d\n",*(unsigned short *)args[0],
|
||||
*(ffi_arg*)resp);
|
||||
}
|
||||
typedef unsigned short (*cls_ret_ushort)(unsigned short);
|
||||
|
||||
int main (void)
|
||||
|
||||
@@ -9,24 +9,6 @@
|
||||
|
||||
#define CHECK(x) !(x) ? abort() : 0
|
||||
|
||||
/* Define our own long for easier handling on multilib targets. */
|
||||
#if LONG_MAX == 2147483647
|
||||
#define ffi_type_mylong ffi_type_uint32
|
||||
#else
|
||||
#if LONG_MAX == 9223372036854775807
|
||||
#define ffi_type_mylong ffi_type_uint64
|
||||
#else
|
||||
#error "Error, size LONG not defined as expected"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
|
||||
#undef __UNUSED__
|
||||
#if defined(__GNUC__)
|
||||
#define __UNUSED__ __attribute__((__unused__))
|
||||
#else
|
||||
#define __UNUSED__
|
||||
#endif
|
||||
|
||||
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
|
||||
file open. */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
static int floating(int a, float b, double c, long double d)
|
||||
static int floating(int a, float b, double c, long double d, int e)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -28,6 +28,7 @@ int main (void)
|
||||
signed int si1;
|
||||
double d;
|
||||
long double ld;
|
||||
signed int si2;
|
||||
|
||||
args[0] = &ffi_type_sint;
|
||||
values[0] = &si1;
|
||||
@@ -37,23 +38,26 @@ int main (void)
|
||||
values[2] = &d;
|
||||
args[3] = &ffi_type_longdouble;
|
||||
values[3] = &ld;
|
||||
args[4] = &ffi_type_sint;
|
||||
values[4] = &si2;
|
||||
|
||||
/* Initialize the cif */
|
||||
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4,
|
||||
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 5,
|
||||
&ffi_type_sint, args) == FFI_OK);
|
||||
|
||||
si1 = 6;
|
||||
f = 3.14159;
|
||||
d = (double)1.0/(double)3.0;
|
||||
ld = 2.71828182846L;
|
||||
si2 = 10;
|
||||
|
||||
floating (si1, f, d, ld);
|
||||
floating (si1, f, d, ld, si2);
|
||||
|
||||
ffi_call(&cif, FFI_FN(floating), &rint, values);
|
||||
|
||||
printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld));
|
||||
printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld, si2));
|
||||
|
||||
CHECK((int)rint == floating(si1, f, d, ld));
|
||||
CHECK(rint == floating(si1, f, d, ld, si2));
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -28,25 +28,25 @@ int main (void)
|
||||
void *values[MAX_ARGS];
|
||||
float f;
|
||||
value_type result[2];
|
||||
unsigned int i;
|
||||
int i;
|
||||
|
||||
args[0] = &ffi_type_float;
|
||||
values[0] = &f;
|
||||
|
||||
|
||||
/* Initialize the cif */
|
||||
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
||||
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
||||
&ffi_type_double, args) == FFI_OK);
|
||||
|
||||
|
||||
f = 3.14159;
|
||||
|
||||
|
||||
/* Put a canary in the return array. This is a regression test for
|
||||
a buffer overrun. */
|
||||
memset(result[1].c, CANARY, sizeof (double));
|
||||
|
||||
ffi_call(&cif, FFI_FN(dblit), &result[0].d, values);
|
||||
|
||||
|
||||
/* These are not always the same!! Check for a reasonable delta */
|
||||
|
||||
|
||||
CHECK(result[0].d - dblit(f) < DBL_EPSILON);
|
||||
|
||||
/* Check the canary. */
|
||||
|
||||
@@ -48,7 +48,9 @@ int main (void)
|
||||
#endif
|
||||
|
||||
/* These are not always the same!! Check for a reasonable delta */
|
||||
/*@-realcompare@*/
|
||||
if (ld - ldblit(f) < LDBL_EPSILON)
|
||||
/*@=realcompare@*/
|
||||
puts("long double return value tests ok!");
|
||||
else
|
||||
CHECK(0);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
static int checking(int a, short b, signed char c)
|
||||
{
|
||||
int i;
|
||||
|
||||
return (a < 0 && b < 0 && c < 0);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,7 @@ cls_struct_combined cls_struct_combined_fn(struct cls_struct_16byte1 b0,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_combined_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_16byte1 b0;
|
||||
struct cls_struct_16byte2 b1;
|
||||
|
||||
@@ -52,8 +52,7 @@ cls_struct_combined cls_struct_combined_fn(struct cls_struct_16byte1 b0,
|
||||
}
|
||||
|
||||
static void
|
||||
cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
cls_struct_combined_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct cls_struct_16byte1 b0;
|
||||
struct cls_struct_16byte2 b1;
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
#if LONG_MAX == 2147483647
|
||||
#define ffi_type_mylong ffi_type_uint32
|
||||
#else
|
||||
#if LONG_MAX == 9223372036854775807
|
||||
#define ffi_type_mylong ffi_type_uint64
|
||||
#else
|
||||
#error "Error, size LONG not defined as expected"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct A {
|
||||
unsigned long a;
|
||||
unsigned char b;
|
||||
@@ -27,15 +37,14 @@ B B_fn(struct A b0, struct B b1)
|
||||
result.x.b = b0.b + b1.x.b + b1.y;
|
||||
result.y = b0.b + b1.x.b;
|
||||
|
||||
printf("%lu %d %lu %d %d: %lu %d %d\n", b0.a, b0.b, b1.x.a, b1.x.b, b1.y,
|
||||
printf("%d %d %d %d %d: %d %d %d\n", b0.a, b0.b, b1.x.a, b1.x.b, b1.y,
|
||||
result.x.a, result.x.b, result.y);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
B_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct A b0;
|
||||
struct B b1;
|
||||
@@ -106,6 +115,7 @@ int main (void)
|
||||
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
|
||||
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
|
||||
|
||||
|
||||
CHECK(ffi_prep_closure(pcl, &cif, B_gn, NULL) == FFI_OK);
|
||||
|
||||
res_dbl = ((B(*)(A, B))(pcl))(e_dbl, f_dbl);
|
||||
@@ -113,6 +123,5 @@ int main (void)
|
||||
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
|
||||
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
|
||||
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -35,8 +35,7 @@ B B_fn(struct A b0, struct B b1)
|
||||
}
|
||||
|
||||
static void
|
||||
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
B_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct A b0;
|
||||
struct B b1;
|
||||
|
||||
@@ -27,8 +27,7 @@ my_ffi_struct callee(struct my_ffi_struct a1, struct my_ffi_struct a2)
|
||||
return result;
|
||||
}
|
||||
|
||||
void stub(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
void* userdata __UNUSED__)
|
||||
void stub(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
struct my_ffi_struct a1;
|
||||
struct my_ffi_struct a2;
|
||||
|
||||
@@ -43,10 +43,10 @@ int main (void)
|
||||
ul = 0;
|
||||
|
||||
for (sc = (signed char) -127;
|
||||
sc <= (signed char) 120; sc += 1)
|
||||
sc <= (signed char) 120; /*@-type@*/ sc += 1 /*@=type@*/)
|
||||
for (ss = -30000; ss <= 30000; ss += 10000)
|
||||
for (uc = (unsigned char) 0;
|
||||
uc <= (unsigned char) 200; uc += 20)
|
||||
uc <= (unsigned char) 200; /*@-type@*/ uc += 20 /*@=type@*/)
|
||||
for (us = 0; us <= 60000; us += 10000)
|
||||
{
|
||||
ul++;
|
||||
|
||||
@@ -107,7 +107,7 @@ int main(void)
|
||||
|
||||
ffi_call(&cif, FFI_FN(doit), &result, values);
|
||||
|
||||
printf ("The result is %d\n", (int)result);
|
||||
printf ("The result is %d\n", result);
|
||||
|
||||
}
|
||||
exit(0);
|
||||
|
||||
@@ -16,7 +16,9 @@ typedef struct
|
||||
|
||||
static test_structure_1 struct1(test_structure_1 ts)
|
||||
{
|
||||
/*@-type@*/
|
||||
ts.uc++;
|
||||
/*@=type@*/
|
||||
ts.d--;
|
||||
ts.ui++;
|
||||
|
||||
|
||||
@@ -6,15 +6,6 @@
|
||||
|
||||
#define MAX_ARGS 256
|
||||
|
||||
|
||||
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
|
||||
#undef __UNUSED__
|
||||
#if defined(__GNUC__)
|
||||
#define __UNUSED__ __attribute__((__unused__))
|
||||
#else
|
||||
#define __UNUSED__
|
||||
#endif
|
||||
|
||||
#define CHECK(x) (!(x) ? abort() : (void)0)
|
||||
|
||||
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003 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
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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.
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# libffi testsuite that uses the 'dg.exp' driver.
|
||||
|
||||
load_lib libffi-dg.exp
|
||||
@@ -26,10 +27,7 @@ global cxx_options
|
||||
|
||||
set cxx_options " -shared-libgcc -lstdc++"
|
||||
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O0 -W -Wall"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O2"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O3"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-Os"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options ""
|
||||
|
||||
dg-finish
|
||||
|
||||
|
||||
@@ -8,16 +8,15 @@
|
||||
#include "ffitestcxx.h"
|
||||
|
||||
void
|
||||
closure_test_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
|
||||
void** args __UNUSED__, void* userdata __UNUSED__)
|
||||
closure_test_fn(ffi_cif* cif, void* resp, void** args, void* userdata)
|
||||
{
|
||||
throw 9;
|
||||
}
|
||||
|
||||
typedef void (*closure_test_type)();
|
||||
|
||||
void closure_test_fn1(ffi_cif* cif __UNUSED__, void* resp,
|
||||
void** args, void* userdata __UNUSED__)
|
||||
void closure_test_fn1(ffi_cif* cif,void* resp,void** args,
|
||||
void* userdata)
|
||||
{
|
||||
*(ffi_arg*)resp =
|
||||
(int)*(float *)args[0] +(int)(*(float *)args[1]) +
|
||||
@@ -55,6 +54,7 @@ int main (void)
|
||||
#endif
|
||||
ffi_closure *pcl;
|
||||
ffi_type * cl_arg_types[17];
|
||||
int res;
|
||||
#ifdef USING_MMAP
|
||||
pcl = (ffi_closure *) allocate_mmap (sizeof(ffi_closure));
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user