From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25321 invoked by alias); 17 Feb 2015 13:35:09 -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 25304 invoked by uid 89); 17 Feb 2015 13:35:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 17 Feb 2015 13:35:07 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YNiIp-0008IG-FG for libffi-discuss@sourceware.org; Tue, 17 Feb 2015 14:35:03 +0100 Received: from 173-19-202-206.client.mchsi.com ([173.19.202.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Feb 2015 14:35:03 +0100 Received: from wb8tyw by 173-19-202-206.client.mchsi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Feb 2015 14:35:03 +0100 To: libffi-discuss@sourceware.org From: "John E. Malmberg" Subject: Re: Trying to port libffi to OpenVMS. Date: Tue, 17 Feb 2015 13:35:00 -0000 Message-ID: References: <54DE0378.8040609@qsl.net> <54DE0D25.8020300@redhat.com> <54DE8D61.803@qsl.net> <54E22522.40909@redhat.com> <54E2481C.1070605@qsl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <54E2481C.1070605@qsl.net> X-IsSubscribed: yes X-SW-Source: 2015/txt/msg00040.txt.bz2 On 2/16/2015 1:42 PM, John E. Malmberg wrote: > On 2/16/2015 11:13 AM, Richard Henderson wrote: >> On 02/13/2015 03:48 PM, John E. Malmberg wrote: >>> On 2/13/2015 8:41 AM, Richard Henderson wrote: >>>> On 02/13/2015 06:00 AM, John E. Malmberg wrote: > >>> In any case, on VMS, the "int lib$callg(void **args, int (*func)())" >>> hides all that though. >> >> I'd be very surprised if this actually passes the testsuite, as you're >> not giving lib$callg any information about the types of the arguments. > >> This is probably one of those things that worked find on VAX, but only >> works on Alpha and IA-64 for integer arguments, and a limited number of >> them at that. As stated before, that has turned out to be the case. A more experienced Macro-64/VMS programmer on comp.os.vms has confirmed using lib$callg on other than VAX is a lost cause. >> I'm sure you're going to have to write assembly, at least for Alpha. It is starting to look like the best approach is to find out how to get the osf-1/alpha assembler to be conditionally compiled/assembled on VMS and the same for HP-UX/itanium as Philippe did. I got the "master" ffi.c to build against Phillipe's macro code, but there still are significant differences between it and master. The "puts" example worked though. A test with "atof" did not work. Unlike the lib$callg() case, once it the assembler called the routine, the correct result was in the F0 register. The old code was expecting a different flag format, so did not translate the result back. Regards, -John