From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22791 invoked by alias); 25 Nov 2013 09:37:29 -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 22781 invoked by uid 89); 25 Nov 2013 09:37:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_05,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Nov 2013 09:37:27 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAP9bINR022004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Nov 2013 04:37:18 -0500 Received: from tucnak.zalov.cz (vpn1-7-172.ams2.redhat.com [10.36.7.172]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAP9bGkP000668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Nov 2013 04:37:18 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.7/8.14.7) with ESMTP id rAP9bF0b017620; Mon, 25 Nov 2013 10:37:16 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.7/8.14.7/Submit) id rAP9bF9D017619; Mon, 25 Nov 2013 10:37:15 +0100 Date: Mon, 25 Nov 2013 09:37:00 -0000 From: Jakub Jelinek To: Andrew Haley Cc: "Hogan, D. (GE Power & Water)" , "libffi-discuss@sourceware.org" Subject: Re: RFC: variadic closures in x86/x86_64 Message-ID: <20131125093715.GU892@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <52931854.6080007@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52931854.6080007@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013/txt/msg00228.txt.bz2 On Mon, Nov 25, 2013 at 09:28:52AM +0000, Andrew Haley wrote: > On 11/25/2013 02:45 AM, Hogan, D. (GE Power & Water) wrote: > > I'm requesting feedback on an implementation of variadic closures in > > libffi. It currently supports x86 and x86_64. This change allows for > > FMI logging callbacks through JNA in the JFMI[1] and Ptolemy II[2] > > projects. The libffi changes are in a github branch[3]. > > Why is this necessary? I thought that the variadic calling conventions > on x86 were the same as the non-variadic ones. On x86 they are, on x86_64 they are not (%rax register must contain the number of floating point varargs arguments AFAIK). Jakub