public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: libffi-discuss@sourceware.org
Subject: [PATCH 0/8] Go closures for x86_64
Date: Tue, 28 Oct 2014 18:32:00 -0000	[thread overview]
Message-ID: <1414521094-18403-1-git-send-email-rth@twiddle.net> (raw)

The first in a series of patch sets to implement the Go interfaces
I proposed a week or so ago, but mostly split into smaller pieces.
These patches will also include support for complex types as I go,
since Go needs them, and performing both updates at the same time
will make things easier.

This first set includes x86_64-linux and x86_64-cygwin.

It leaves x86_64-darwin in a broken state, but I'm unsure why it
has a completely different assembly file, rather than merely using
the preprocessor to handle the __USER_LABEL_PREFIX__.  I'm hoping
that someone who can test darwin can do this update.

The existing win64 support was poor, having a significant amount
of failures (and some xfails to cover that up).  IMO the biggest
problem there was trying to combine it with the 32-bit targets.
The ABI is significantly different, and the amount of ifdefs
needed to force it in was ... ugly.

It leaves the visual studio build broken, in that I totally
rewrote all of the win64.S assembly, but did not keep the microsoft
assembly.  Hopefully someone who cares about VS can handle that.

This patch set is available at

  git://github.com/rth7680/libffi.git go/x86


r~


Richard Henderson (8):
  Add entry points for interacting with Go
  Add ffi_cfi.h
  x86-64: Support go closures
  win64: Rewrite
  win64: Remove support from ffi.c
  x86_64: Fixups for x32
  x86_64: Decouple return types from FFI_TYPE constants
  x86_64: Add support for complex types

 Makefile.am                                        |   4 +-
 include/ffi.h.in                                   |  16 +
 include/ffi_cfi.h                                  |  53 ++
 src/x86/ffi.c                                      | 212 +------
 src/x86/ffi64.c                                    | 327 +++++++---
 src/x86/ffitarget.h                                |  29 +-
 src/x86/ffiw64.c                                   | 281 +++++++++
 src/x86/internal64.h                               |  22 +
 src/x86/unix64.S                                   | 552 ++++++++--------
 src/x86/win64.S                                    | 693 ++++++---------------
 testsuite/libffi.call/call.exp                     |  13 +-
 testsuite/libffi.call/cls_align_longdouble_split.c |   2 -
 .../libffi.call/cls_align_longdouble_split2.c      |   2 -
 testsuite/libffi.call/cls_longdouble.c             |   2 -
 testsuite/libffi.call/float2.c                     |   3 -
 testsuite/libffi.call/huge_struct.c                |   2 -
 testsuite/libffi.call/return_ldl.c                 |   1 -
 17 files changed, 1088 insertions(+), 1126 deletions(-)
 create mode 100644 include/ffi_cfi.h
 create mode 100644 src/x86/ffiw64.c
 create mode 100644 src/x86/internal64.h

-- 
1.9.3

             reply	other threads:[~2014-10-28 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 18:32 Richard Henderson [this message]
2014-10-28 18:32 ` [PATCH 7/8] x86_64: Decouple return types from FFI_TYPE constants Richard Henderson
2014-10-28 18:32 ` [PATCH 3/8] x86-64: Support go closures Richard Henderson
2014-10-28 18:32 ` [PATCH 1/8] Add entry points for interacting with Go Richard Henderson
2014-10-28 18:32 ` [PATCH 6/8] x86_64: Fixups for x32 Richard Henderson
2014-10-28 18:32 ` [PATCH 8/8] x86_64: Add support for complex types Richard Henderson
2014-10-28 18:32 ` [PATCH 5/8] win64: Remove support from ffi.c Richard Henderson
2014-10-28 18:32 ` [PATCH 2/8] Add ffi_cfi.h Richard Henderson
2014-10-28 18:32 ` [PATCH 4/8] win64: Rewrite Richard Henderson

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=1414521094-18403-1-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=libffi-discuss@sourceware.org \
    /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).