summaryrefslogtreecommitdiff
path: root/libffi/src/java_raw_api.c
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-21 19:01:58 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-21 19:01:58 +0000
commit3d37e05c4665b49b64281fc51098a8961f550251 (patch)
tree9d7d39e0a966f4e98e779b43dc0089cf9c08478a /libffi/src/java_raw_api.c
parentc7d0e2b0c4719714d10577d3b35566a13e095196 (diff)
downloadgcc-3d37e05c4665b49b64281fc51098a8961f550251.tar.gz
2003-10-21 Andreas Tobler <a.tobler@schweiz.ch>
* configure.in: AC_LINK_FILES(ffitarget.h). * configure: Regenerate. * Makefile.in: Likewise. * include/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. * fficonfig.h.in: Likewise. 2003-10-21 Paolo Bonzini <bonzini@gnu.org> Richard Henderson <rth@redhat.com> Avoid that ffi.h includes fficonfig.h. * Makefile.am (EXTRA_DIST): Include ffitarget.h files (TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX. (TARGET_SRC_MIPS_SGI): Removed. (MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX. (MIPS_SGI): Removed. (CLEANFILES): Removed. (mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New targets. * acconfig.h: Removed. * configure.in: Compute sizeofs only for double and long double. Use them to define and subst HAVE_LONG_DOUBLE. Include comments into AC_DEFINE instead of using acconfig.h. Create include/ffitarget.h instead of include/fficonfig.h. Rename MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree. AC_DEFINE EH_FRAME_FLAGS. * include/Makefile.am (DISTCLEANFILES): New automake macro. (hack_DATA): Add ffitarget.h. * include/ffi.h.in: Remove all system specific definitions. Declare raw API even if it is not installed, why bother? Use limits.h instead of SIZEOF_* to define ffi_type_*. Do not define EH_FRAME_FLAGS, it is in fficonfig.h now. Include ffitarget.h instead of fficonfig.h. Remove ALIGN macro. (UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead. * include/ffi_common.h (bool): Do not define. (ffi_assert): Accept failed assertion. (ffi_type_test): Return void and accept file/line. (FFI_ASSERT): Pass stringized failed assertion. (FFI_ASSERT_AT): New macro. (FFI_ASSERT_VALID_TYPE): New macro. (UINT8, SINT8, UINT16, SINT16, UINT32, SINT32, UINT64, SINT64): Define here with gcc's __attribute__ macro instead of in ffi.h (FLOAT32, ALIGN): Define here instead of in ffi.h * include/ffi-mips.h: Removed. Its content moved to src/mips/ffitarget.h after separating assembly and C sections. * src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c, src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S, src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c: SIZEOF_ARG -> FFI_SIZEOF_ARG. * src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+). * src/debug.c (ffi_assert): Accept stringized failed assertion. (ffi_type_test): Rewritten. * src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call FFI_ASSERT_VALID_TYPE. * src/alpha/ffitarget.h, src/arm/ffitarget.h, src/ia64/ffitarget.h, src/m68k/ffitarget.h, src/mips/ffitarget.h, src/powerpc/ffitarget.h, src/s390/ffitarget.h, src/sh/ffitarget.h, src/sh64/ffitarget.h, src/sparc/ffitarget.h, src/x86/ffitarget.h: New files. * src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S, src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S, src/powerpc/aix.S, src/powerpc/darwin.S, src/powerpc/ffi_darwin.c, src/powerpc/linux64.S, src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S, src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S, src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S, src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S: include fficonfig.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/java_raw_api.c')
-rw-r--r--libffi/src/java_raw_api.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libffi/src/java_raw_api.c b/libffi/src/java_raw_api.c
index c3b3b8226d8..e4664112b11 100644
--- a/libffi/src/java_raw_api.c
+++ b/libffi/src/java_raw_api.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
- java_raw_api.c - Copyright (c) 1999 Cygnus Solutions
+ java_raw_api.c - Copyright (c) 1999 Red Hat, Inc.
Cloned from raw_api.c
@@ -54,13 +54,13 @@ ffi_java_raw_size (ffi_cif *cif)
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_DOUBLE:
- result += 2 * SIZEOF_ARG;
+ result += 2 * FFI_SIZEOF_ARG;
break;
case FFI_TYPE_STRUCT:
/* No structure parameters in Java. */
abort();
default:
- result += SIZEOF_ARG;
+ result += FFI_SIZEOF_ARG;
}
}
@@ -90,7 +90,7 @@ ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
*args = (void*) ((char*)(raw++) + 2);
break;
-#if SIZEOF_ARG == 8
+#if FFI_SIZEOF_ARG == 8
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_DOUBLE:
@@ -105,7 +105,7 @@ ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
default:
*args = raw;
- raw += ALIGN ((*tp)->size, SIZEOF_ARG) / SIZEOF_ARG;
+ raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
}
}
@@ -116,7 +116,7 @@ ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
/* then assume little endian */
for (i = 0; i < cif->nargs; i++, tp++, args++)
{
-#if SIZEOF_ARG == 8
+#if FFI_SIZEOF_ARG == 8
switch((*tp)->type) {
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
@@ -127,10 +127,10 @@ ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
default:
*args = (void*) raw++;
}
-#else /* SIZEOF_ARG != 8 */
+#else /* FFI_SIZEOF_ARG != 8 */
*args = (void*) raw;
raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
-#endif /* SIZEOF_ARG == 8 */
+#endif /* FFI_SIZEOF_ARG == 8 */
}
#else
@@ -202,7 +202,7 @@ ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
(raw++)->flt = *(FLOAT32*) (*args);
break;
-#if SIZEOF_ARG == 8
+#if FFI_SIZEOF_ARG == 8
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_DOUBLE:
@@ -216,11 +216,11 @@ ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
break;
default:
-#if SIZEOF_ARG == 8
+#if FFI_SIZEOF_ARG == 8
FFI_ASSERT(FALSE); /* Should have covered all cases */
#else
memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
- raw += ALIGN ((*tp)->size, SIZEOF_ARG) / SIZEOF_ARG;
+ raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
#endif
}
}
@@ -231,7 +231,7 @@ ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
static void
ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
{
-#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
+#if WORDS_BIGENDIAN && FFI_SIZEOF_ARG == 8
switch (cif->rtype->type)
{
case FFI_TYPE_UINT8:
@@ -256,7 +256,7 @@ ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
static void
ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
{
-#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
+#if WORDS_BIGENDIAN && FFI_SIZEOF_ARG == 8
switch (cif->rtype->type)
{
case FFI_TYPE_UINT8: