diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-11 11:45:39 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-11 11:45:39 +0000 |
commit | e395522d28f6d2d66aa6de6aa8e77912c8f99b4e (patch) | |
tree | ffcf91dcf4e4fcde395484b3635490cc3f088097 /libffi | |
parent | b7ace65c7a22e6cf731447b38752bba7ec7826e7 (diff) | |
download | gcc-e395522d28f6d2d66aa6de6aa8e77912c8f99b4e.tar.gz |
* src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation.
(ffi_check_float_struct): Remove unused prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84505 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ChangeLog | 5 | ||||
-rw-r--r-- | libffi/src/s390/ffi.c | 18 |
2 files changed, 13 insertions, 10 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog index b76047f7e4e..30d95482cd9 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/libffi/src/s390/ffi.c b/libffi/src/s390/ffi.c index d672b3c0ef3..399fa2a91d9 100644 --- a/libffi/src/s390/ffi.c +++ b/libffi/src/s390/ffi.c @@ -69,7 +69,6 @@ /*====================================================================*/ 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"))) @@ -222,15 +221,7 @@ ffi_prep_args (unsigned char *stack, extended_cif *ecif) } } - /* 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: @@ -251,6 +242,13 @@ ffi_prep_args (unsigned char *stack, extended_cif *ecif) 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: |