aboutsummaryrefslogtreecommitdiff
path: root/src/lj_arch.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-12-15 20:39:30 +0100
committerMike Pall <mike>2011-12-15 20:39:30 +0100
commitb330b468b3f37bd0b11765524548dbdbb1dd1a95 (patch)
tree2e836bc9c7b5c688c5ecd2b883f3894580d85f29 /src/lj_arch.h
parentb61be299c9fc00e8d2252fa3f12c6005686783d6 (diff)
downloadluajit-b330b468b3f37bd0b11765524548dbdbb1dd1a95.tar.gz
luajit-b330b468b3f37bd0b11765524548dbdbb1dd1a95.tar.bz2
luajit-b330b468b3f37bd0b11765524548dbdbb1dd1a95.zip
MIPS: Add build rules (non-functional, yet).
Diffstat (limited to 'src/lj_arch.h')
-rw-r--r--src/lj_arch.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lj_arch.h b/src/lj_arch.h
index 50a6ef00..3a52c212 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -23,6 +23,8 @@
23#define LUAJIT_ARCH_ppc 4 23#define LUAJIT_ARCH_ppc 4
24#define LUAJIT_ARCH_PPCSPE 5 24#define LUAJIT_ARCH_PPCSPE 5
25#define LUAJIT_ARCH_ppcspe 5 25#define LUAJIT_ARCH_ppcspe 5
26#define LUAJIT_ARCH_MIPS 6
27#define LUAJIT_ARCH_mips 6
26 28
27/* Target OS. */ 29/* Target OS. */
28#define LUAJIT_OS_OTHER 0 30#define LUAJIT_OS_OTHER 0
@@ -47,6 +49,8 @@
47#else 49#else
48#define LUAJIT_TARGET LUAJIT_ARCH_PPC 50#define LUAJIT_TARGET LUAJIT_ARCH_PPC
49#endif 51#endif
52#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS)
53#define LUAJIT_TARGET LUAJIT_ARCH_MIPS
50#else 54#else
51#error "No support for this architecture (yet)" 55#error "No support for this architecture (yet)"
52#endif 56#endif
@@ -182,6 +186,26 @@
182#define LJ_ARCH_NOFFI 1 /* NYI: comparisons, calls. */ 186#define LJ_ARCH_NOFFI 1 /* NYI: comparisons, calls. */
183#define LJ_ARCH_NOJIT 1 187#define LJ_ARCH_NOJIT 1
184 188
189#elif LUAJIT_TARGET == LUAJIT_ARCH_MIPS
190
191#define LJ_ARCH_NAME "mips"
192#define LJ_ARCH_BITS 32
193#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
194#define LJ_ARCH_ENDIAN LUAJIT_LE
195#else
196#define LJ_ARCH_ENDIAN LUAJIT_BE
197#endif
198#define LJ_ARCH_HASFPU 1
199#define LJ_TARGET_MIPS 1
200#define LJ_TARGET_EHRETREG 4
201#define LJ_TARGET_JUMPRANGE 27 /* 2*2^27 = 256MB-aligned region */
202#define LJ_TARGET_MASKSHIFT 1
203#define LJ_TARGET_MASKROT 1
204#define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */
205#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE
206#define LJ_ARCH_NOFFI 1
207#define LJ_ARCH_NOJIT 1
208
185#else 209#else
186#error "No target architecture defined" 210#error "No target architecture defined"
187#endif 211#endif