-You can force a build of the x64 interpreter on Linux/x64 with the
-following command:
+You can force a native x64 build on Linux/x64 with the following command:
-Or select the x64 compiler (this only builds the interpreter right now):
+Or select the x64 compiler:
setenv /release /x64
diff --git a/doc/luajit.html b/doc/luajit.html
index 58dfa32e..66032fdf 100644
--- a/doc/luajit.html
+++ b/doc/luajit.html
@@ -63,8 +63,9 @@ standard Lua interpreter and can be deployed as a drop-in replacement.
LuaJIT offers more performance, at the expense of portability. It
currently runs on all popular operating systems based on x86 CPUs
-(Linux, Windows, OSX etc.). A port to x64 CPUs is currently ongoing —
-you can follow its progress in the » git repository.
+(Linux, Windows, OSX etc.). A preliminary port to Linux/x64 and Windows/x64
+is already available (follow the build instructions
+to enable it).
Other platforms will be supported in the future, based on user demand
and sponsoring.
diff --git a/doc/status.html b/doc/status.html
index 23847da9..d7cdffb5 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -148,9 +148,8 @@ trace linking heuristics prevent this, but in the worst case this
means the code always falls back to the interpreter.
-Trace management needs more tuning: better blacklisting of aborted
-traces, less drastic countermeasures against trace explosion and better
-heuristics in general.
+Trace management needs more tuning: less drastic countermeasures
+against trace explosion and better heuristics in general.
Some checks are missing in the JIT-compiled code for obscure situations
@@ -199,7 +198,7 @@ Nonetheless, it compiles to native code and needs to be adapted to each
architecture. Porting the compiler backend is probably the easier task,
but a key element of its design is the fast interpreter, written in
machine-specific assembler.
-An x64 port is already in the works, thanks to the
+A preliminary x64 port is already available, thanks to the
LuaJIT sponsorship program.
Other ports will follow — companies which are
interested in sponsoring a port to a particular architecture, please
diff --git a/src/Makefile b/src/Makefile
index 5fef367a..261e2049 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,9 +20,6 @@ NODOTABIVER= 51
# Turn any of the optional settings on by removing the '#' in front of them.
# You need to 'make clean' and 'make' again, if you change any options.
#
-# Note: LuaJIT can only be compiled for x86, and not for x64 (yet)!
-# In the meantime, the x86 binary runs fine under a x64 OS.
-#
# It's recommended to compile at least for i686. By default the assembler part
# of the interpreter makes use of CMOV/FCOMI*/FUCOMI* instructions, anyway.
CC= gcc -m32 -march=i686
@@ -30,10 +27,14 @@ CC= gcc -m32 -march=i686
# binaries to a different machine:
#CC= gcc -m32 -march=native
#
+# Currently LuaJIT builds by default as a 32 bit binary. Use this to force
+# a native x64 build on Linux/x64:
+#CC= gcc -m64
+#
# Since the assembler part does NOT maintain a frame pointer, it's pointless
-# to slow down the C part by not omitting it. Debugging and tracebacks are
-# not affected -- the assembler part has frame unwind information and GCC
-# emits it with -g (see CCDEBUG below).
+# to slow down the C part by not omitting it. Debugging, tracebacks and
+# unwinding are not affected -- the assembler part has frame unwind
+# information and GCC emits it where needed (x64) or with -g (see CCDEBUG).
CCOPT= -O2 -fomit-frame-pointer
# Use this if you want to generate a smaller binary (but it's slower):
#CCOPT= -Os -fomit-frame-pointer
@@ -75,7 +76,8 @@ XCFLAGS=
#
# Use the system provided memory allocator (realloc) instead of the
# bundled memory allocator. This is slower, but sometimes helpful for
-# debugging. It's mandatory for Valgrind's memcheck tool, too.
+# debugging. It's helpful for Valgrind's memcheck tool, too. This option
+# cannot be enabled on x64, since the built-in allocator is mandatory.
#XCFLAGS+= -DLUAJIT_USE_SYSMALLOC
#
# This define is required to run LuaJIT under Valgrind. The Valgrind
diff --git a/src/lj_arch.h b/src/lj_arch.h
index 111ea8c1..86a2d5ed 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -48,7 +48,6 @@
#define LJ_TARGET_X64 1
#define LJ_TARGET_X86ORX64 1
#define LJ_PAGESIZE 4096
-#define LJ_ARCH_NOJIT 1 /* NYI */
#else
#error "No target architecture defined"
#endif