public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Timothy Wall <twalljava@dev.java.net>
To: tromey@redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: Re: libffi stdcall closures
Date: Thu, 08 Nov 2007 22:19:00 -0000	[thread overview]
Message-ID: <3DFC9914-8E24-4ED5-A3A3-AAF72993FBD2@dev.java.net> (raw)
In-Reply-To: <m3tznwmxvv.fsf@fleche.redhat.com>

Ok, thanks, I got a test that runs only for w32.  It also uncovered a  
bug in the cygwin gcc I am using (3.4.4 cygming special); it pops  
arguments for stdcall calls unless invoked in "-mno-cygwin" mode,  
which is likely to screw up terminal output.  Now I have to figure  
out a way around a) the arg popping and b) a good way to verify the  
stack is consistent before/after the call.

I'll have to check the config changes; they're probably pretty  
minor.  I know python has a couple of libffi snapshots, so they at  
least might find a standalone libffi useful.

On Nov 8, 2007, at 12:48 PM, Tom Tromey wrote:

>>>>>> "Timothy" == Timothy Wall <twall@users.sf.net> writes:
>
> Timothy> I'm working on a patch for win32/x86 stdcall closures to  
> support JNA
> Timothy> (http://jna.dev.java.net), a ctypes-like library for  
> Java.  I'm
> Timothy> working off of a libffi snapshot from the gcc trunk.
>
> Nice.  JNA looks cool.
>
> BTW, I think I read somewhere that you have some standalone configure
> changes for libffi...?  We could put those in the separate libffi
> repository if that would help you.  I occasionally think it would be
> nice to revive the standalone libffi -- but only if there's interest.
>
> Timothy> I've got the closure code working now, and I need some  
> pointers on
> Timothy> adding a win32-only stdcall callback test to the testsuite  
> (or a
> Timothy> general one if stdcall is supported elsewhere).
>
> libffi uses the dejagnu 'dg' code, so you should be able to just drop
> your test cases into the test suite.  If the test is platform-specific
> I think you can use the "target" clause to dg-do.  Grep for "target"
> in gcc/testsuite/**/*.c to see uses.
>
> Tom

  reply	other threads:[~2007-11-08 21:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 16:09 Timothy Wall
2007-11-08 19:11 ` Tom Tromey
2007-11-08 22:19   ` Timothy Wall [this message]
2007-11-09  1:07   ` Timothy Wall
2007-11-13 23:28     ` Tom Tromey
2007-11-13 23:32       ` Timothy Wall

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=3DFC9914-8E24-4ED5-A3A3-AAF72993FBD2@dev.java.net \
    --to=twalljava@dev.java.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /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).