This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/8] Go closures for x86_64


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]