FFI/ARM64/OSX: Handle non-standard OSX C calling conventions.

Contributed by Peter Cawley. #205
This commit is contained in:
Mike Pall
2023-08-29 02:21:51 +02:00
parent cf903edb30
commit 83954100db
4 changed files with 98 additions and 21 deletions

View File

@@ -75,6 +75,9 @@ typedef union FPRArg {
#define CCALL_NARG_FPR 8
#define CCALL_NRET_FPR 4
#define CCALL_SPS_FREE 0
#if LJ_TARGET_OSX
#define CCALL_PACK_STACKARG 1
#endif
typedef intptr_t GPRArg;
typedef union FPRArg {
@@ -139,6 +142,9 @@ typedef union FPRArg {
#ifndef CCALL_ALIGN_STACKARG
#define CCALL_ALIGN_STACKARG 1
#endif
#ifndef CCALL_PACK_STACKARG
#define CCALL_PACK_STACKARG 0
#endif
#ifndef CCALL_ALIGN_CALLSTATE
#define CCALL_ALIGN_CALLSTATE 8
#endif