summaryrefslogtreecommitdiff
path: root/src/lj_ccall.h
diff options
context:
space:
mode:
authorMike Pall <mike>2015-01-07 21:06:40 +0100
committerMike Pall <mike>2015-01-07 21:06:40 +0100
commit33f0c24f06d38ea618429c2ea2f7a849e8d7439c (patch)
treed1893a1e30a9a2a8b8972345da3cb89f1b51db9a /src/lj_ccall.h
parentce1a5ee535aea909f297a56bce8ff113e1763403 (diff)
downloadluajit-33f0c24f06d38ea618429c2ea2f7a849e8d7439c.tar.gz
luajit-33f0c24f06d38ea618429c2ea2f7a849e8d7439c.tar.bz2
luajit-33f0c24f06d38ea618429c2ea2f7a849e8d7439c.zip
ARM64: Add FFI support.
Diffstat (limited to 'src/lj_ccall.h')
-rw-r--r--src/lj_ccall.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lj_ccall.h b/src/lj_ccall.h
index 21af04ef..91983fee 100644
--- a/src/lj_ccall.h
+++ b/src/lj_ccall.h
@@ -68,6 +68,21 @@ typedef union FPRArg {
68 float f[2]; 68 float f[2];
69} FPRArg; 69} FPRArg;
70 70
71#elif LJ_TARGET_ARM64
72
73#define CCALL_NARG_GPR 8
74#define CCALL_NRET_GPR 2
75#define CCALL_NARG_FPR 8
76#define CCALL_NRET_FPR 4
77#define CCALL_SPS_FREE 0
78
79typedef intptr_t GPRArg;
80typedef union FPRArg {
81 double d;
82 float f;
83 uint32_t u32;
84} FPRArg;
85
71#elif LJ_TARGET_PPC 86#elif LJ_TARGET_PPC
72 87
73#define CCALL_NARG_GPR 8 88#define CCALL_NARG_GPR 8
@@ -135,6 +150,8 @@ typedef LJ_ALIGN(CCALL_ALIGN_CALLSTATE) struct CCallState {
135 uint8_t nfpr; /* Number of arguments in FPRs. */ 150 uint8_t nfpr; /* Number of arguments in FPRs. */
136#elif LJ_TARGET_X86 151#elif LJ_TARGET_X86
137 uint8_t resx87; /* Result on x87 stack: 1:float, 2:double. */ 152 uint8_t resx87; /* Result on x87 stack: 1:float, 2:double. */
153#elif LJ_TARGET_ARM64
154 void *retp; /* Aggregate return pointer in x8. */
138#elif LJ_TARGET_PPC 155#elif LJ_TARGET_PPC
139 uint8_t nfpr; /* Number of arguments in FPRs. */ 156 uint8_t nfpr; /* Number of arguments in FPRs. */
140#endif 157#endif