FFI: Add callback support (for x86/x64).
This commit is contained in:
@@ -81,7 +81,7 @@ typedef double FPRArg;
|
||||
typedef intptr_t GPRArg;
|
||||
|
||||
#else
|
||||
#error "missing calling convention definitions for this architecture"
|
||||
#error "Missing calling convention definitions for this architecture"
|
||||
#endif
|
||||
|
||||
#ifndef CCALL_SPS_EXTRA
|
||||
@@ -99,6 +99,10 @@ typedef intptr_t GPRArg;
|
||||
#define CCALL_NUM_FPR \
|
||||
(CCALL_NARG_FPR > CCALL_NRET_FPR ? CCALL_NARG_FPR : CCALL_NRET_FPR)
|
||||
|
||||
/* Check against constants in lj_ctype.h. */
|
||||
LJ_STATIC_ASSERT(CCALL_NUM_GPR <= CCALL_MAX_GPR);
|
||||
LJ_STATIC_ASSERT(CCALL_NUM_FPR <= CCALL_MAX_FPR);
|
||||
|
||||
#define CCALL_MAXSTACK 32
|
||||
|
||||
/* -- C call state -------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user