]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
x64: Enable LJ_GC64 mode by default.
authorMike Pall <mike>
Sun, 8 Dec 2019 20:21:30 +0000 (21:21 +0100)
committerMike Pall <mike>
Sun, 8 Dec 2019 20:21:30 +0000 (21:21 +0100)
doc/extensions.html
doc/install.html
src/Makefile
src/lj_arch.h
src/msvcbuild.bat

index 6d3518ea7ed4dfddff77a8d6a957809dab8dad17..35bd6c9200577760e3310f9f219e937b09903bf7 100644 (file)
@@ -208,9 +208,8 @@ bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded.
 </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>
index 49d6e9edeea6eea622cad11895fc788de9a90c72..9e00b231eea40f49578a9b7528a1147054a77141 100644 (file)
@@ -175,12 +175,11 @@ Please read the instructions given in these files, before changing
 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>
index 71c284e221b75ce0f3f479117f01f56cd627c454..ad80642b34a546663e8818cf6149d17435151d5e 100644 (file)
@@ -110,8 +110,8 @@ XCFLAGS=
 #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
 #
 ##############################################################################
 
index 31a11593fbfc916fcbf2ebd2a1f42db02bd8f10c..903d6c64d0589b831930a24818b4bc7f4e0081ac 100644 (file)
 #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
 
index 4abc461a4b5eb1e1ee446291bac48f7f3d5943aa..91de2b5279cd33c16a3c0d4f814b46841b5e55d6 100644 (file)
@@ -5,6 +5,7 @@
 @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
@@ -20,7 +21,7 @@
 @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
@@ -37,15 +38,16 @@ if exist minilua.exe.manifest^
 @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