]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Allow selection of single-number vs. dual-number mode in Makefile.
authorMike Pall <mike>
Mon, 24 Oct 2011 14:35:17 +0000 (16:35 +0200)
committerMike Pall <mike>
Mon, 24 Oct 2011 14:35:17 +0000 (16:35 +0200)
src/Makefile
src/lj_arch.h

index acde0dbbed39834559f60641f990c0873c186d63..30985003428da13ae6d5d12e3f59364b66f84514 100644 (file)
@@ -118,6 +118,12 @@ XCFLAGS=
 # interpreter. Don't bother if your OS wouldn't run on them, anyway.
 #XCFLAGS+= -DLUAJIT_CPU_NOCMOV
 #
+# Some architectures (e.g. PPC) can use either single-number (1) or
+# dual-number (2) mode. Uncomment one of these lines to override the
+# default mode. Please see LJ_ARCH_NUMMODE in lj_arch.h for details.
+#XCFLAGS+= -DLUAJIT_NUMMODE=1
+#XCFLAGS+= -DLUAJIT_NUMMODE=2
+#
 ##############################################################################
 
 ##############################################################################
index 80ab051e285a1cad88f4f9ab1f9cec7cafa06039..f644884850477b0cf97949373c53a348f29e3190 100644 (file)
 #endif
 
 /* Enable or disable the dual-number mode for the VM. */
+#if (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE && LUAJIT_NUMMODE == 2) || \
+    (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL && LUAJIT_NUMMODE == 1)
+#error "No support for this number mode on this architecture"
+#endif
 #if LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL || \
     (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL_SINGLE && LUAJIT_NUMMODE != 1) || \
     (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE_DUAL && LUAJIT_NUMMODE == 2)