Andreas Krebbel - Re: [PATCH] libffi: S/390: Add long double support (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Andreas Krebbel
- To: Ulrich Weigand
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Feb 2007 14:30:24 +0100
- Subject: Re: [PATCH] libffi: S/390: Add long double support
- References: <20070206134109.GA14160@blc4eb430604175.ibm.com> <200702070500.l1750MpN010600@d12av02.megacenter.de.ibm.com>
Hi Ulrich,
here is the revised version.
Re-bootstrapped on s390 and s390x with gcc 4.2.
OK for mainline and 4.2 branch?
-Andreas-
2007-02-07 Andreas Krebbel krebbel1@de.ibm.com
* src/s390/ffi.c (ffi_prep_args, ffi_prep_cif_machdep,
ffi_closure_helper_SYSV): Add long double handling.
Index: libffi/src/s390/ffi.c
*** libffi/src/s390/ffi.c.orig 2007-02-05 14:42:39.000000000 +0100 --- libffi/src/s390/ffi.c 2007-02-07 09:55:37.000000000 +0100 *************** ffi_prep_args (unsigned char *stack, ext *** 207,212 **** --- 207,218 ---- void *arg = *p_argv; int type = (*ptr)->type;
- #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
/* 16-byte long double is passed like a struct. */
if (type == FFI_TYPE_LONGDOUBLE)
type = FFI_TYPE_STRUCT;
- #endif
/* Check how a structure type is passed. */ if (type == FFI_TYPE_STRUCT) {
*************** ffi_prep_cif_machdep(ffi_cif *cif) *** 364,369 **** --- 370,381 ---- cif->flags = FFI390_RET_DOUBLE; break;
- #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
cif->flags = FFI390_RET_STRUCT;
n_gpr++;
break;
- #endif /* Integer values are returned in gpr 2 (and gpr 3 for 64-bit values on 31-bit machines). */ case FFI_TYPE_UINT64:
*************** ffi_prep_cif_machdep(ffi_cif *cif) *** 400,405 **** --- 412,423 ---- { int type = (*ptr)->type;
- #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
/* 16-byte long double is passed like a struct. */
if (type == FFI_TYPE_LONGDOUBLE)
type = FFI_TYPE_STRUCT;
- #endif
/* Check how a structure type is passed. */ if (type == FFI_TYPE_STRUCT) {
*************** ffi_closure_helper_SYSV (ffi_closure *cl *** 562,567 **** --- 580,591 ---- int deref_struct_pointer = 0; int type = (*ptr)->type;
- #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
/* 16-byte long double is passed like a struct. */
if (type == FFI_TYPE_LONGDOUBLE)
type = FFI_TYPE_STRUCT;
- #endif
/* Check how a structure type is passed. */ if (type == FFI_TYPE_STRUCT) {
*************** ffi_closure_helper_SYSV (ffi_closure cl *** 662,667 **** --- 686,694 ---- / Void is easy, and so is struct. */ case FFI_TYPE_VOID: case FFI_TYPE_STRUCT:
- #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
case FFI_TYPE_LONGDOUBLE:
- #endif break; /* Floating point values are returned in fpr 0. */
- Follow-Ups:
- Re: [PATCH] libffi: S/390: Add long double support
* From: Ulrich Weigand
- Re: [PATCH] libffi: S/390: Add long double support
- References:
- [PATCH] libffi: S/390: Add long double support
* From: Andreas Krebbel - Re: [PATCH] libffi: S/390: Add long double support
* From: Ulrich Weigand
- [PATCH] libffi: S/390: Add long double support
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |