aboutsummaryrefslogtreecommitdiff
path: root/libffi/src/s390
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2002-10-08 14:55:03 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2002-10-08 14:55:03 +0000
commit8177895b7177c070c22879df051bd881910444e3 (patch)
tree2bde663dbcb9369746d86132dad0b8213966d892 /libffi/src/s390
parent4fdbcfb2c4f7f3f7d9cfd19da234b3480cffbd06 (diff)
downloadgcc-8177895b7177c070c22879df051bd881910444e3.zip
gcc-8177895b7177c070c22879df051bd881910444e3.tar.gz
gcc-8177895b7177c070c22879df051bd881910444e3.tar.bz2
java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret raw data as _Jv_word values, not ffi_raw.
* src/java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret raw data as _Jv_word values, not ffi_raw. (ffi_java_ptrarray_to_raw): Likewise. (ffi_java_rvalue_to_raw): New function. (ffi_java_raw_call): Call it. (ffi_java_raw_to_rvalue): New function. (ffi_java_translate_args): Call it. * src/ffitest.c (closure_test_fn): Interpret return value as ffi_arg, not int. * src/s390/ffi.c (ffi_prep_cif_machdep): Add missing FFI_TYPE_POINTER case. (ffi_closure_helper_SYSV): Likewise. Also, assume return values extended to word size. From-SVN: r57926
Diffstat (limited to 'libffi/src/s390')
-rw-r--r--libffi/src/s390/ffi.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/libffi/src/s390/ffi.c b/libffi/src/s390/ffi.c
index b40bdd4..9e7d169 100644
--- a/libffi/src/s390/ffi.c
+++ b/libffi/src/s390/ffi.c
@@ -369,6 +369,7 @@ ffi_prep_cif_machdep(ffi_cif *cif)
cif->flags = FFI390_RET_INT64;
break;
+ case FFI_TYPE_POINTER:
case FFI_TYPE_INT:
case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32:
@@ -682,29 +683,18 @@ ffi_closure_helper_SYSV (ffi_closure *closure,
#endif
break;
+ case FFI_TYPE_POINTER:
case FFI_TYPE_UINT32:
- p_gpr[0] = *(unsigned int *) rvalue;
+ case FFI_TYPE_UINT16:
+ case FFI_TYPE_UINT8:
+ p_gpr[0] = *(unsigned long *) rvalue;
break;
case FFI_TYPE_INT:
case FFI_TYPE_SINT32:
- p_gpr[0] = *(signed int *) rvalue;
- break;
-
- case FFI_TYPE_UINT16:
- p_gpr[0] = *(unsigned short *) rvalue;
- break;
-
case FFI_TYPE_SINT16:
- p_gpr[0] = *(signed short *) rvalue;
- break;
-
- case FFI_TYPE_UINT8:
- p_gpr[0] = *(unsigned char *) rvalue;
- break;
-
case FFI_TYPE_SINT8:
- p_gpr[0] = *(signed char *) rvalue;
+ p_gpr[0] = *(signed long *) rvalue;
break;
default: