public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: "John E. Malmberg" <wb8tyw@qsl.net>, libffi-discuss@sourceware.org
Subject: Re: Trying to port libffi to OpenVMS.
Date: Mon, 16 Feb 2015 17:13:00 -0000	[thread overview]
Message-ID: <54E22522.40909@redhat.com> (raw)
In-Reply-To: <54DE8D61.803@qsl.net>

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:
>>> I was able to apply Philippe Vouters patches for Libffi 3.0.9 to libffi 3.1 and
>>> get the code building.  I was unable to get the tests to run under GNV though.
>>
>> I've never seen those patches but...
> 
> Not sure if I got them via E-mail from someone else, or from his site. His site
> is not responding at this time.
> 
> The readme says that they include HP-UX/ia64 and VMS/Alpha and VMS/ia64.  What
> I have appears to be bunch of concatenated unified diffs.  I can gzip it and
> forward it to anyone that is interested, uncompressed it is 126 KB.

Sure.

> I think VMS and Tru64 share a calling standard on Alpha, but I am not sure. 

Definitely not.

> VMS on Itanium uses ELF binaries and calling standard with a few extensions to
> ELF.

The calling standard is different enough that you'll definitely need changes to
the C code, and at least a small change to the assembly to set up the r25
"argument information" register.

> 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.

> The use of the lib$callg() routine means I should not need any assembly
> language code at all.  Probably almost the same source for all three current
> VMS harware platforms.

I'm sure you're going to have to write assembly, at least for Alpha.


r~

  reply	other threads:[~2015-02-16 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 13:59 John E. Malmberg
2015-02-13 14:41 ` Richard Henderson
2015-02-13 23:47   ` John E. Malmberg
2015-02-16 17:13     ` Richard Henderson [this message]
2015-02-16 19:41       ` John E. Malmberg
2015-02-17 13:35         ` John E. Malmberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54E22522.40909@redhat.com \
    --to=rth@redhat.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=wb8tyw@qsl.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).