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 16:27:34 -07:00
parent 6de51f3e04
commit 1f6b5a91f4
4 changed files with 44 additions and 8 deletions

View File

@@ -246,7 +246,7 @@ case "${TARGET}" in
SOURCES="ffi.c sysv.S"
;;
X86_64)
SOURCES="ffi64.c unix64.S"
SOURCES="ffi64.c unix64.S ffiw64.c win64.S"
;;
X86_WIN64)
SOURCES="ffiw64.c win64.S"