Support the WIN64/EFI64 calling convention on all X86_64 platforms

Add a new calling convention FFI_EFI64, alias FFI_WIN64, on all X86_64
platforms.  This allows libffi compiled on a 64-bit x86 platform to call
EFI functions.

Compile in ffiw64.c and win64.S on all X86_64 platforms.  When compiled
for a platform other than X86_WIN64, ffiw64.c suffixes its functions
with _efi64, to avoid conflict with the platform's actual
implementations of those functions.
This commit is contained in:
Josh Triplett
2015-07-26 17:18:16 -07:00
parent 6de51f3e04
commit 1f6b5a91f4
4 changed files with 44 additions and 8 deletions
+2
View File
@@ -87,6 +87,8 @@ typedef enum ffi_abi {
#elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
FFI_FIRST_ABI = 1,
FFI_UNIX64,
FFI_WIN64,
FFI_EFI64 = FFI_WIN64,
FFI_LAST_ABI,
FFI_DEFAULT_ABI = FFI_UNIX64