From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25980 invoked by alias); 25 Nov 2013 10:10:54 -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 25956 invoked by uid 89); 25 Nov 2013 10:10:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,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 10:10:51 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAPAAeE6004485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Nov 2013 05:10:41 -0500 Received: from zebedee.pink (ovpn-113-156.phx2.redhat.com [10.3.113.156]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rAPAAc8L019825; Mon, 25 Nov 2013 05:10:38 -0500 Message-ID: <5293221D.4010505@redhat.com> Date: Mon, 25 Nov 2013 10:10:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10 MIME-Version: 1.0 To: Jakub Jelinek CC: "Hogan, D. (GE Power & Water)" , "libffi-discuss@sourceware.org" Subject: Re: RFC: variadic closures in x86/x86_64 References: <52931854.6080007@redhat.com> <20131125093715.GU892@tucnak.redhat.com> In-Reply-To: <20131125093715.GU892@tucnak.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013/txt/msg00229.txt.bz2 On 11/25/2013 09:37 AM, Jakub Jelinek wrote: > 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). 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. Andrew.