</p>
<p>
Note: <tt>LJ_GC64</tt> mode requires a different frame layout, which implies
-a different, incompatible bytecode format for ports that use this mode (e.g.
-ARM64 or MIPS64) or when explicitly enabled for x64. This may be rectified
-in the future.
+a different, incompatible bytecode format for all 64 bit ports. This may be
+rectified in the future.
</p>
<h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3>
any settings.
</p>
<p>
-LuaJIT on x64 currently uses 32 bit GC objects by default.
-<tt>LJ_GC64</tt> mode may be explicitly enabled:
-add <tt>XCFLAGS=-DLUAJIT_ENABLE_GC64</tt> to the make command or run
-<tt>msvcbuild gc64</tt> for MSVC/WinSDK. Please check the note
-about the <a href="extensions.html#string_dump">bytecode format</a>
-differences, too.
+All LuaJIT 64 bit ports use 64 bit GC objects by default (<tt>LJ_GC64</tt>).
+For x64, you can select the old 32-on-64 bit mode by adding
+<tt>XCFLAGS=-DLUAJIT_DISABLE_GC64</tt> to the make command.
+Please check the note about the
+<a href="extensions.html#string_dump">bytecode format</a> differences, too.
</p>
<h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2>
#XCFLAGS+= -DLUAJIT_NUMMODE=1
#XCFLAGS+= -DLUAJIT_NUMMODE=2
#
-# Enable GC64 mode for x64.
-#XCFLAGS+= -DLUAJIT_ENABLE_GC64
+# Disable LJ_GC64 mode for x64.
+#XCFLAGS+= -DLUAJIT_DISABLE_GC64
#
##############################################################################
#define LJ_TARGET_MASKROT 1
#define LJ_TARGET_UNALIGNED 1
#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL
-#ifdef LUAJIT_ENABLE_GC64
+#ifndef LUAJIT_DISABLE_GC64
#define LJ_TARGET_GC64 1
#endif
@rem Then cd to this directory and run this script. Use the following\r
@rem options (in order), if needed. The default is a dynamic release build.\r
@rem\r
+@rem nogc64 disable LJ_GC64 mode for x64\r
@rem debug emit debug symbols\r
@rem amalg amalgamated build\r
@rem static static linkage\r
@set LJLIB=lib /nologo /nodefaultlib\r
@set DASMDIR=..\dynasm\r
@set DASM=%DASMDIR%\dynasm.lua\r
-@set DASC=vm_x86.dasc\r
+@set DASC=vm_x64.dasc\r
@set LJDLLNAME=lua51.dll\r
@set LJLIBNAME=lua51.lib\r
@set BUILDTYPE=release\r
@set LJARCH=x64\r
@minilua\r
@if errorlevel 8 goto :X64\r
+@set DASC=vm_x86.dasc\r
@set DASMFLAGS=-D WIN -D JIT -D FFI\r
@set LJARCH=x86\r
@set LJCOMPILE=%LJCOMPILE% /arch:SSE2\r
:X64\r
-@if "%1" neq "gc64" goto :NOGC64\r
+@if "%1" neq "nogc64" goto :GC64\r
@shift\r
-@set DASC=vm_x64.dasc\r
-@set LJCOMPILE=%LJCOMPILE% /DLUAJIT_ENABLE_GC64\r
-:NOGC64\r
+@set DASC=vm_x86.dasc\r
+@set LJCOMPILE=%LJCOMPILE% /DLUAJIT_DISABLE_GC64\r
+:GC64\r
minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h %DASC%\r
@if errorlevel 1 goto :BAD\r
\r