This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
libffi limitation causes bad behavior in JNI on Sparc
- To: java at gcc dot gnu dot org
- Subject: libffi limitation causes bad behavior in JNI on Sparc
- From: mgd at swarm dot org (Marcus G. Daniels)
- Date: 12 May 2001 13:35:11 -0600
- CC: green at cygnus dot com
On Sparc, libffi doesn't handle integer return types of size 8 or 16.
This causes problems for JNI calls like CallBooleanMethod because the
return value is in the wrong bits of the returned integer.
For example, a hack that worked for me was to change ffi_call in
libffi/src/sparc/ffi.c to check for FFI_TYPE_UINT8 and FFI_TYPE_SINT8
and do a *(unsigned *)rvalue << = 24 in that case.