Ulrich Weigand - 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]

Andreas Krebbel wrote:

*************** ffi_closure_helper_SYSV (ffi_closure cl *** 662,667 **** --- 684,692 ---- / Void is easy, and so is struct. */ case FFI_TYPE_VOID: case FFI_TYPE_STRUCT:

This misses handling of long double arguments in ffi_closure_helper_SYSV.

Also, I'm wondering if it wouldn't be easier (and less redundant) to explicitly treat long double the same as struct arguments?

E.g. you should be able to replace the whole hunk in ffi_prep_args:

by simply adding

#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

before

 /* Check how a structure type is passed.  */
  if (type == FFI_TYPE_STRUCT)
    {
      type = ffi_check_struct_type (*ptr);

Bye, Ulrich

-- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]