From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4190 invoked by alias); 17 May 2003 05:52:27 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4135 invoked from network); 17 May 2003 05:52:26 -0000 Received: from unknown (HELO mail02.agrinet.ch) (212.28.134.115) by sources.redhat.com with SMTP; 17 May 2003 05:52:26 -0000 Received: from pop.agri.ch (217.162.232.206) by mail02.agrinet.ch (7.0.015) (authenticated as toa@pop.agri.ch) id 3EBAC9400006BC97; Sat, 17 May 2003 07:52:20 +0200 Message-ID: <3EC5CE0D.30607@pop.agri.ch> Date: Sat, 17 May 2003 06:03:00 -0000 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dale Johannesen CC: Ronald Oussoren , gcc@gcc.gnu.org Subject: Re: Libffi problem on darwin (MacOSX) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg01656.txt.bz2 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