From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23652 invoked by alias); 26 Nov 2013 14:27:38 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 23641 invoked by uid 89); 26 Nov 2013 14:27:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f179.google.com Received: from Unknown (HELO mail-pd0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 26 Nov 2013 14:27:37 +0000 Received: by mail-pd0-f179.google.com with SMTP id r10so7821389pdi.10 for ; Tue, 26 Nov 2013 06:27:29 -0800 (PST) X-Received: by 10.66.220.198 with SMTP id py6mr12632663pac.21.1385476049219; Tue, 26 Nov 2013 06:27:29 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id ry4sm91765449pab.4.2013.11.26.06.27.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Nov 2013 06:27:28 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id AFDF4EA0069; Wed, 27 Nov 2013 00:57:23 +1030 (CST) Date: Tue, 26 Nov 2013 14:27:00 -0000 From: Alan Modra To: Andrew Haley Cc: Jakub Jelinek , "Hogan, D. (GE Power & Water)" , "libffi-discuss@sourceware.org" Subject: Re: RFC: variadic closures in x86/x86_64 Message-ID: <20131126142723.GD9211@bubble.grove.modra.org> References: <52931854.6080007@redhat.com> <20131125093715.GU892@tucnak.redhat.com> <5293221D.4010505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5293221D.4010505@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013/txt/msg00230.txt.bz2 On Mon, Nov 25, 2013 at 10:10:37AM +0000, Andrew Haley wrote: > Sure, but we don't need a new libffi interface to do that. We need > only to set %rax. And we can just do that anyway; it doesn't hurt. > > I must be missing something. The claim to fame looks to be the ability to call variadic functions without describing the arguments via ffi_prep_cif_var at the point of call. Instead you do so in the function consuming the args. I'm not sure what that gains you.. The patch suffers from the same flaw as my first attempt at adding variadic argument support for PowerPC64 ELFv2, namely that you cannot add fields to ffi_cif without breaking ABI compatibility. Applications linked against an older version of libffi.so will supply the old ffi_cif to a new shared library.. Oh, and gcc still contains the first attempt since no one has yet approved an import from libffi to cure the problem. -- Alan Modra Australia Development Lab, IBM