diff options
author | Mike Pall <mike> | 2016-05-28 05:10:55 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-05-28 05:10:55 +0200 |
commit | d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b (patch) | |
tree | c89961a1a8949c19872aa39269c2408dd6595733 /src/lj_ccall.h | |
parent | e3c4c9af0f07a114fb754fed6ac358a102f49e2f (diff) | |
download | luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.tar.gz luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.tar.bz2 luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.zip |
MIPS64, part 1: Add MIPS64 support to interpreter.
Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
Sponsored by Cisco Systems, Inc.
Diffstat (limited to 'src/lj_ccall.h')
-rw-r--r-- | src/lj_ccall.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/lj_ccall.h b/src/lj_ccall.h index a77afae3..d97227a6 100644 --- a/src/lj_ccall.h +++ b/src/lj_ccall.h | |||
@@ -95,11 +95,11 @@ typedef union FPRArg { | |||
95 | typedef intptr_t GPRArg; | 95 | typedef intptr_t GPRArg; |
96 | typedef double FPRArg; | 96 | typedef double FPRArg; |
97 | 97 | ||
98 | #elif LJ_TARGET_MIPS | 98 | #elif LJ_TARGET_MIPS32 |
99 | 99 | ||
100 | #define CCALL_NARG_GPR 4 | 100 | #define CCALL_NARG_GPR 4 |
101 | #define CCALL_NARG_FPR (LJ_ABI_SOFTFP ? 0 : 2) | 101 | #define CCALL_NARG_FPR (LJ_ABI_SOFTFP ? 0 : 2) |
102 | #define CCALL_NRET_GPR 2 | 102 | #define CCALL_NRET_GPR (LJ_ABI_SOFTFP ? 4 : 2) |
103 | #define CCALL_NRET_FPR (LJ_ABI_SOFTFP ? 0 : 2) | 103 | #define CCALL_NRET_FPR (LJ_ABI_SOFTFP ? 0 : 2) |
104 | #define CCALL_SPS_EXTRA 7 | 104 | #define CCALL_SPS_EXTRA 7 |
105 | #define CCALL_SPS_FREE 1 | 105 | #define CCALL_SPS_FREE 1 |
@@ -110,6 +110,22 @@ typedef union FPRArg { | |||
110 | struct { LJ_ENDIAN_LOHI(float f; , float g;) }; | 110 | struct { LJ_ENDIAN_LOHI(float f; , float g;) }; |
111 | } FPRArg; | 111 | } FPRArg; |
112 | 112 | ||
113 | #elif LJ_TARGET_MIPS64 | ||
114 | |||
115 | /* FP args are positional and overlay the GPR array. */ | ||
116 | #define CCALL_NARG_GPR 8 | ||
117 | #define CCALL_NARG_FPR 0 | ||
118 | #define CCALL_NRET_GPR 2 | ||
119 | #define CCALL_NRET_FPR (LJ_ABI_SOFTFP ? 0 : 2) | ||
120 | #define CCALL_SPS_EXTRA 3 | ||
121 | #define CCALL_SPS_FREE 1 | ||
122 | |||
123 | typedef intptr_t GPRArg; | ||
124 | typedef union FPRArg { | ||
125 | double d; | ||
126 | struct { LJ_ENDIAN_LOHI(float f; , float g;) }; | ||
127 | } FPRArg; | ||
128 | |||
113 | #else | 129 | #else |
114 | #error "Missing calling convention definitions for this architecture" | 130 | #error "Missing calling convention definitions for this architecture" |
115 | #endif | 131 | #endif |