https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64779

--- Comment #10 from Richard Henderson <rth at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #6)

That will probably break small structure return.

See

    case FFI_TYPE_STRUCT:
#ifndef X86
      /* ??? This should be a different ABI rather than an ifdef.  */
      if (cif->rtype->size == 1)
        flags = X86_RET_STRUCT_1B;
      else if (cif->rtype->size == 2)
        flags = X86_RET_STRUCT_2B;
      else if (cif->rtype->size == 4)
        flags = X86_RET_INT32;
      else if (cif->rtype->size == 8)
        flags = X86_RET_INT64;
      else
#endif

Reply via email to