public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Tobler <toa@pop.agri.ch>
To: Dale Johannesen <dalej@apple.com>
Cc: Ronald Oussoren <oussoren@cistron.nl>,  gcc@gcc.gnu.org
Subject: Re: Libffi problem on darwin (MacOSX)
Date: Sat, 17 May 2003 06:03:00 -0000	[thread overview]
Message-ID: <3EC5CE0D.30607@pop.agri.ch> (raw)
In-Reply-To: <EC43A080-87E3-11D7-BAEF-000393D76DAA@apple.com>

Dale Johannesen wrote:
> On Friday, May 16, 2003, at 01:55  PM, Ronald Oussoren wrote:
> 
>> We're using libffi closures in the Objective-C method tables to 
>> forward calls from Objective-C to python. This is working fine for 
>> basic calls, but gives wrong results when structs are passed. It looks 
>> like a mismatch between the compiler and libffi: 
>> ffi_closure_helper_DARWIN in libffi_darwin.c seems to assume that 
>> structs are passed "by reference" (line 615), while the compiler 
>> passes small structs entirely in registers (see assembly code emited 
>> by the following C snippet):
> 
> 
> I'm not familiar with libffi, but I can confirm that the compiler is 
> doing the
> right thing, and it's the same thing it's always done.  It looks like 
> ffi_prep_args
> and ffi_prep_cif_machdep correctly understand that structs are passed by 
> value, so
> this is just a bug in ffi_closure_helper_DARWIN.

Hey great, people are using libffi on darwin-ppc. I guess this is born 
on my camp. I'll have a look at, as soon as  time allows here.
It is possible that I didn't finish the libffi regarding structures 
since I didn't need it for libjava work. So, you could be right.

Thank you for the report.

Andreas

  reply	other threads:[~2003-05-17  5:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-16 20:56 Ronald Oussoren
2003-05-16 21:42 ` Dale Johannesen
2003-05-17  6:03   ` Andreas Tobler [this message]
2003-05-17 10:17     ` Ronald Oussoren
2003-05-17 15:39       ` Andreas Tobler
2003-05-25 20:49         ` Ronald Oussoren
2003-05-26  5:24           ` Andreas Tobler
2003-05-26 10:01             ` Ronald Oussoren

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=3EC5CE0D.30607@pop.agri.ch \
    --to=toa@pop.agri.ch \
    --cc=dalej@apple.com \
    --cc=gcc@gcc.gnu.org \
    --cc=oussoren@cistron.nl \
    /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).