public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Kaz Kylheku (libffi)" <382-725-6798@kylheku.com>
To: libffi-discuss@sourceware.org
Subject: Re: Also: problem with return value in ffi_call on PPC64.
Date: Tue, 30 May 2017 01:24:00 -0000	[thread overview]
Message-ID: <d000ab0a17f8760aee53b4c52ebbebc9@mail.kylheku.com> (raw)
In-Reply-To: <20170528192241.464e7ebe@sf>

On 28.05.2017 11:22, Sergei Trofimovich wrote:
> On Sat, 27 May 2017 19:15:35 -0700
> "Kaz Kylheku (libffi)" <382-725-6798@kylheku.com> wrote:
> 
>> > Are users supposed to assume that the return value has been widened to
>> > a register-wide (8 byte) value regardless of its declared FFI type?
>> 
>> Indeed, it seems yes.
> 
> Confusingly yes. But only for integral types smaller that ffi_arg.

Thanks for your response and everyone else's.

I feverishly patched up all my code on Saturday night and got all my
test cases to pass on PPC64 with clean Valgrind, without regressing
on the little endian Intels.

My OOP-in-C framework that wraps around libffi basically absorbed this
change quite easily, with hardly much uglification. Just a proliferation
of boiler plate code.

(I never suspected it would be otherwise; but it was a question of
understanding the requirements first; having already acted hastily
on the somewhat wrong requirements already.)

  reply	other threads:[~2017-05-30  1:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28  2:16 Kaz Kylheku (libffi)
2017-05-28 18:23 ` Sergei Trofimovich via libffi-discuss
2017-05-30  1:24   ` Kaz Kylheku (libffi) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-28  1:36 Kaz Kylheku (libffi)
2017-05-30  8:27 ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d000ab0a17f8760aee53b4c52ebbebc9@mail.kylheku.com \
    --to=382-725-6798@kylheku.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).