summaryrefslogtreecommitdiff
path: root/libffi/src/java_raw_api.c
diff options
context:
space:
mode:
authorAndreas Tobler <a.tobler@schweiz.ch>2006-04-22 23:17:35 +0200
committerAndreas Tobler <andreast@gcc.gnu.org>2006-04-22 23:17:35 +0200
commitac6ed182edca2c15eb0509336b5fcc45fb250fe7 (patch)
treee5d1292ca0d5f15af38f6aa116392b799fd3e3a4 /libffi/src/java_raw_api.c
parent9542abd3787272cf9a7054be5c5b70668c13ecb1 (diff)
downloadgcc-ac6ed182edca2c15eb0509336b5fcc45fb250fe7.tar.gz
README: Remove notice about 'Crazy Comments'.
2006-04-22 Andreas Tobler <a.tobler@schweiz.ch> * README: Remove notice about 'Crazy Comments'. * src/debug.c: Remove lint directives. Cleanup white spaces. * src/java_raw_api.c: Likewise. * src/prep_cif.c: Likewise. * src/raw_api.c: Likewise. * src/ffitest.c: Delete. No longer needed, all test cases migrated to the testsuite. * src/arm/ffi.c: Remove lint directives. * src/m32r/ffi.c: Likewise. * src/pa/ffi.c: Likewise. * src/powerpc/ffi.c: Likewise. * src/powerpc/ffi_darwin.c: Likewise. * src/sh/ffi.c: Likewise. * src/sh64/ffi.c: Likewise. * src/x86/ffi.c: Likewise. * testsuite/libffi.call/float2.c: Likewise. * testsuite/libffi.call/promotion.c: Likewise. * testsuite/libffi.call/struct1.c: Likewise. From-SVN: r113181
Diffstat (limited to 'libffi/src/java_raw_api.c')
-rw-r--r--libffi/src/java_raw_api.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/libffi/src/java_raw_api.c b/libffi/src/java_raw_api.c
index 5b0e34744ae..5f15a05c336 100644
--- a/libffi/src/java_raw_api.c
+++ b/libffi/src/java_raw_api.c
@@ -29,10 +29,10 @@
----------------------------------------------------------------------- */
/* This defines a Java- and 64-bit specific variant of the raw API. */
-/* It assumes that "raw" argument blocks look like Java stacks on a */
+/* It assumes that "raw" argument blocks look like Java stacks on a */
/* 64-bit machine. Arguments that can be stored in a single stack */
/* stack slots (longs, doubles) occupy 128 bits, but only the first */
-/* 64 bits are actually used. */
+/* 64 bits are actually used. */
#include <ffi.h>
#include <ffi_common.h>
@@ -77,20 +77,20 @@ ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
#if WORDS_BIGENDIAN
for (i = 0; i < cif->nargs; i++, tp++, args++)
- {
+ {
switch ((*tp)->type)
{
case FFI_TYPE_UINT8:
case FFI_TYPE_SINT8:
*args = (void*) ((char*)(raw++) + 3);
break;
-
+
case FFI_TYPE_UINT16:
case FFI_TYPE_SINT16:
*args = (void*) ((char*)(raw++) + 2);
break;
-#if FFI_SIZEOF_ARG == 8
+#if FFI_SIZEOF_ARG == 8
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_DOUBLE:
@@ -102,7 +102,7 @@ ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args)
case FFI_TYPE_POINTER:
*args = (void*) &(raw++)->ptr;
break;
-
+
default:
*args = raw;
raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
@@ -147,7 +147,7 @@ ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
ffi_type **tp = cif->arg_types;
for (i = 0; i < cif->nargs; i++, tp++, args++)
- {
+ {
switch ((*tp)->type)
{
case FFI_TYPE_UINT8:
@@ -218,7 +218,7 @@ ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
default:
#if FFI_SIZEOF_ARG == 8
FFI_ASSERT(0); /* Should have covered all cases */
-#else
+#else
memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
#endif
@@ -285,10 +285,7 @@ ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
* these following couple of functions will handle the translation forth
* and back automatically. */
-void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
- void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ ffi_raw *raw)
+void ffi_java_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *raw)
{
void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
ffi_java_raw_to_ptrarray (cif, raw, avalue);
@@ -298,7 +295,7 @@ void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
#if FFI_CLOSURES /* base system provides closures */
-static void
+static void
ffi_java_translate_args (ffi_cif *cif, void *rvalue,
void **avalue, void *user_data)
{
@@ -322,7 +319,7 @@ ffi_prep_java_raw_closure (ffi_raw_closure* cl,
{
ffi_status status;
- status = ffi_prep_closure ((ffi_closure*) cl,
+ status = ffi_prep_closure ((ffi_closure*) cl,
cif,
&ffi_java_translate_args,
(void*)cl);