diff options
author | Mike Pall <mike> | 2011-11-14 14:15:57 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-11-14 14:18:25 +0100 |
commit | 71d00a56dbab6c29c0346093dbe530d7b7608be4 (patch) | |
tree | 5e28e19b4d2f20168d5ee0e4fe500b1e2b233c1c /src/lj_ccall.h | |
parent | e9eb4fdb4a08baaa2d9190187a6c38d5b3f8b091 (diff) | |
download | luajit-71d00a56dbab6c29c0346093dbe530d7b7608be4.tar.gz luajit-71d00a56dbab6c29c0346093dbe530d7b7608be4.tar.bz2 luajit-71d00a56dbab6c29c0346093dbe530d7b7608be4.zip |
FFI: Add callback support (for x86/x64).
Diffstat (limited to 'src/lj_ccall.h')
-rw-r--r-- | src/lj_ccall.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_ccall.h b/src/lj_ccall.h index 14f61924..0641625f 100644 --- a/src/lj_ccall.h +++ b/src/lj_ccall.h | |||
@@ -81,7 +81,7 @@ typedef double FPRArg; | |||
81 | typedef intptr_t GPRArg; | 81 | typedef intptr_t GPRArg; |
82 | 82 | ||
83 | #else | 83 | #else |
84 | #error "missing calling convention definitions for this architecture" | 84 | #error "Missing calling convention definitions for this architecture" |
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | #ifndef CCALL_SPS_EXTRA | 87 | #ifndef CCALL_SPS_EXTRA |
@@ -99,6 +99,10 @@ typedef intptr_t GPRArg; | |||
99 | #define CCALL_NUM_FPR \ | 99 | #define CCALL_NUM_FPR \ |
100 | (CCALL_NARG_FPR > CCALL_NRET_FPR ? CCALL_NARG_FPR : CCALL_NRET_FPR) | 100 | (CCALL_NARG_FPR > CCALL_NRET_FPR ? CCALL_NARG_FPR : CCALL_NRET_FPR) |
101 | 101 | ||
102 | /* Check against constants in lj_ctype.h. */ | ||
103 | LJ_STATIC_ASSERT(CCALL_NUM_GPR <= CCALL_MAX_GPR); | ||
104 | LJ_STATIC_ASSERT(CCALL_NUM_FPR <= CCALL_MAX_FPR); | ||
105 | |||
102 | #define CCALL_MAXSTACK 32 | 106 | #define CCALL_MAXSTACK 32 |
103 | 107 | ||
104 | /* -- C call state -------------------------------------------------------- */ | 108 | /* -- C call state -------------------------------------------------------- */ |