+2004-07-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation.
+ (ffi_check_float_struct): Remove unused prototype.
+
2004-06-30 Geoffrey Keating <geoffk@apple.com>
* src/powerpc/ffi_darwin.c (flush_icache): ';' is a comment
/*====================================================================*/
static void ffi_prep_args (unsigned char *, extended_cif *);
-static int ffi_check_float_struct (ffi_type *);
void
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
__attribute__ ((visibility ("hidden")))
}
}
- /* Pointers are passed like UINTs of the same size. */
- if (type == FFI_TYPE_POINTER)
-#ifdef __s390x__
- type = FFI_TYPE_UINT64;
-#else
- type = FFI_TYPE_UINT32;
-#endif
-
- /* Now handle all primitive int/float data types. */
+ /* Now handle all primitive int/pointer/float data types. */
switch (type)
{
case FFI_TYPE_DOUBLE:
else
p_ov[n_ov++] = *(unsigned int *) arg;
break;
+
+ case FFI_TYPE_POINTER:
+ if (n_gpr < MAX_GPRARGS)
+ p_gpr[n_gpr++] = (unsigned long)*(unsigned char **) arg;
+ else
+ p_ov[n_ov++] = (unsigned long)*(unsigned char **) arg;
+ break;
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64: