x86-64: Support go closures

Dumps all of the hand-coded unwind info for gas generated.  Move jump
table data into .rodata.  Adjust ffi_call_unix64 to load the static
chain.  Split out sse portions of ffi_closure_unix64 to
ffi_closure_unix64_sse rather than test cif->flags at runtime.
This commit is contained in:
Richard Henderson
2014-11-12 09:15:35 +01:00
parent 89bbde8b4e
commit 6b62fb4a26
3 changed files with 223 additions and 191 deletions
+2
View File
@@ -121,6 +121,7 @@ typedef enum ffi_abi {
/* ---- Definitions for closures ----------------------------------------- */
#define FFI_CLOSURES 1
#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
@@ -129,6 +130,7 @@ typedef enum ffi_abi {
#if defined (X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
#define FFI_TRAMPOLINE_SIZE 24
#define FFI_NATIVE_RAW_API 0
#define FFI_GO_CLOSURES 1
#else
#ifdef X86_WIN32
#define FFI_TRAMPOLINE_SIZE 52