diff options
author | Mike Pall <mike> | 2011-10-24 16:35:17 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-10-24 16:35:17 +0200 |
commit | fa9ade356b0543f11295023de3b4441a1e7d39a3 (patch) | |
tree | 4ed3765c8c3046672b1eafd17f303ee6e40988fb /src | |
parent | 96d8611d1b3c038d565016c0383e2cb7a8064449 (diff) | |
download | luajit-fa9ade356b0543f11295023de3b4441a1e7d39a3.tar.gz luajit-fa9ade356b0543f11295023de3b4441a1e7d39a3.tar.bz2 luajit-fa9ade356b0543f11295023de3b4441a1e7d39a3.zip |
Allow selection of single-number vs. dual-number mode in Makefile.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 6 | ||||
-rw-r--r-- | src/lj_arch.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index acde0dbb..30985003 100644 --- a/src/Makefile +++ b/src/Makefile | |||
@@ -118,6 +118,12 @@ XCFLAGS= | |||
118 | # interpreter. Don't bother if your OS wouldn't run on them, anyway. | 118 | # interpreter. Don't bother if your OS wouldn't run on them, anyway. |
119 | #XCFLAGS+= -DLUAJIT_CPU_NOCMOV | 119 | #XCFLAGS+= -DLUAJIT_CPU_NOCMOV |
120 | # | 120 | # |
121 | # Some architectures (e.g. PPC) can use either single-number (1) or | ||
122 | # dual-number (2) mode. Uncomment one of these lines to override the | ||
123 | # default mode. Please see LJ_ARCH_NUMMODE in lj_arch.h for details. | ||
124 | #XCFLAGS+= -DLUAJIT_NUMMODE=1 | ||
125 | #XCFLAGS+= -DLUAJIT_NUMMODE=2 | ||
126 | # | ||
121 | ############################################################################## | 127 | ############################################################################## |
122 | 128 | ||
123 | ############################################################################## | 129 | ############################################################################## |
diff --git a/src/lj_arch.h b/src/lj_arch.h index 80ab051e..f6448848 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h | |||
@@ -235,6 +235,10 @@ | |||
235 | #endif | 235 | #endif |
236 | 236 | ||
237 | /* Enable or disable the dual-number mode for the VM. */ | 237 | /* Enable or disable the dual-number mode for the VM. */ |
238 | #if (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE && LUAJIT_NUMMODE == 2) || \ | ||
239 | (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL && LUAJIT_NUMMODE == 1) | ||
240 | #error "No support for this number mode on this architecture" | ||
241 | #endif | ||
238 | #if LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL || \ | 242 | #if LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL || \ |
239 | (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL_SINGLE && LUAJIT_NUMMODE != 1) || \ | 243 | (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL_SINGLE && LUAJIT_NUMMODE != 1) || \ |
240 | (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE_DUAL && LUAJIT_NUMMODE == 2) | 244 | (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE_DUAL && LUAJIT_NUMMODE == 2) |