diff options
author | Mike Pall <mike> | 2019-12-08 21:21:30 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2019-12-08 21:21:30 +0100 |
commit | bd00094c3b50e193fb32aad79b7ea8ea6b78ed25 (patch) | |
tree | ce9a51d4a295e76a00f98351348bbbe03f2aa86d | |
parent | 70f4b15ee45a6137fe6b48b941faea79d72f7159 (diff) | |
download | luajit-bd00094c3b50e193fb32aad79b7ea8ea6b78ed25.tar.gz luajit-bd00094c3b50e193fb32aad79b7ea8ea6b78ed25.tar.bz2 luajit-bd00094c3b50e193fb32aad79b7ea8ea6b78ed25.zip |
x64: Enable LJ_GC64 mode by default.
Diffstat (limited to '')
-rw-r--r-- | doc/extensions.html | 5 | ||||
-rw-r--r-- | doc/install.html | 11 | ||||
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | src/lj_arch.h | 2 | ||||
-rw-r--r-- | src/msvcbuild.bat | 12 |
5 files changed, 17 insertions, 17 deletions
diff --git a/doc/extensions.html b/doc/extensions.html index 6d3518ea..35bd6c92 100644 --- a/doc/extensions.html +++ b/doc/extensions.html | |||
@@ -208,9 +208,8 @@ bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded. | |||
208 | </p> | 208 | </p> |
209 | <p> | 209 | <p> |
210 | Note: <tt>LJ_GC64</tt> mode requires a different frame layout, which implies | 210 | Note: <tt>LJ_GC64</tt> mode requires a different frame layout, which implies |
211 | a different, incompatible bytecode format for ports that use this mode (e.g. | 211 | a different, incompatible bytecode format for all 64 bit ports. This may be |
212 | ARM64 or MIPS64) or when explicitly enabled for x64. This may be rectified | 212 | rectified in the future. |
213 | in the future. | ||
214 | </p> | 213 | </p> |
215 | 214 | ||
216 | <h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3> | 215 | <h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3> |
diff --git a/doc/install.html b/doc/install.html index 49d6e9ed..9e00b231 100644 --- a/doc/install.html +++ b/doc/install.html | |||
@@ -175,12 +175,11 @@ Please read the instructions given in these files, before changing | |||
175 | any settings. | 175 | any settings. |
176 | </p> | 176 | </p> |
177 | <p> | 177 | <p> |
178 | LuaJIT on x64 currently uses 32 bit GC objects by default. | 178 | All LuaJIT 64 bit ports use 64 bit GC objects by default (<tt>LJ_GC64</tt>). |
179 | <tt>LJ_GC64</tt> mode may be explicitly enabled: | 179 | For x64, you can select the old 32-on-64 bit mode by adding |
180 | add <tt>XCFLAGS=-DLUAJIT_ENABLE_GC64</tt> to the make command or run | 180 | <tt>XCFLAGS=-DLUAJIT_DISABLE_GC64</tt> to the make command. |
181 | <tt>msvcbuild gc64</tt> for MSVC/WinSDK. Please check the note | 181 | Please check the note about the |
182 | about the <a href="extensions.html#string_dump">bytecode format</a> | 182 | <a href="extensions.html#string_dump">bytecode format</a> differences, too. |
183 | differences, too. | ||
184 | </p> | 183 | </p> |
185 | 184 | ||
186 | <h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2> | 185 | <h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2> |
diff --git a/src/Makefile b/src/Makefile index 71c284e2..ad80642b 100644 --- a/src/Makefile +++ b/src/Makefile | |||
@@ -110,8 +110,8 @@ XCFLAGS= | |||
110 | #XCFLAGS+= -DLUAJIT_NUMMODE=1 | 110 | #XCFLAGS+= -DLUAJIT_NUMMODE=1 |
111 | #XCFLAGS+= -DLUAJIT_NUMMODE=2 | 111 | #XCFLAGS+= -DLUAJIT_NUMMODE=2 |
112 | # | 112 | # |
113 | # Enable GC64 mode for x64. | 113 | # Disable LJ_GC64 mode for x64. |
114 | #XCFLAGS+= -DLUAJIT_ENABLE_GC64 | 114 | #XCFLAGS+= -DLUAJIT_DISABLE_GC64 |
115 | # | 115 | # |
116 | ############################################################################## | 116 | ############################################################################## |
117 | 117 | ||
diff --git a/src/lj_arch.h b/src/lj_arch.h index 31a11593..903d6c64 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h | |||
@@ -184,7 +184,7 @@ | |||
184 | #define LJ_TARGET_MASKROT 1 | 184 | #define LJ_TARGET_MASKROT 1 |
185 | #define LJ_TARGET_UNALIGNED 1 | 185 | #define LJ_TARGET_UNALIGNED 1 |
186 | #define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL | 186 | #define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL |
187 | #ifdef LUAJIT_ENABLE_GC64 | 187 | #ifndef LUAJIT_DISABLE_GC64 |
188 | #define LJ_TARGET_GC64 1 | 188 | #define LJ_TARGET_GC64 1 |
189 | #endif | 189 | #endif |
190 | 190 | ||
diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat index 4abc461a..91de2b52 100644 --- a/src/msvcbuild.bat +++ b/src/msvcbuild.bat | |||
@@ -5,6 +5,7 @@ | |||
5 | @rem Then cd to this directory and run this script. Use the following | 5 | @rem Then cd to this directory and run this script. Use the following |
6 | @rem options (in order), if needed. The default is a dynamic release build. | 6 | @rem options (in order), if needed. The default is a dynamic release build. |
7 | @rem | 7 | @rem |
8 | @rem nogc64 disable LJ_GC64 mode for x64 | ||
8 | @rem debug emit debug symbols | 9 | @rem debug emit debug symbols |
9 | @rem amalg amalgamated build | 10 | @rem amalg amalgamated build |
10 | @rem static static linkage | 11 | @rem static static linkage |
@@ -20,7 +21,7 @@ | |||
20 | @set LJLIB=lib /nologo /nodefaultlib | 21 | @set LJLIB=lib /nologo /nodefaultlib |
21 | @set DASMDIR=..\dynasm | 22 | @set DASMDIR=..\dynasm |
22 | @set DASM=%DASMDIR%\dynasm.lua | 23 | @set DASM=%DASMDIR%\dynasm.lua |
23 | @set DASC=vm_x86.dasc | 24 | @set DASC=vm_x64.dasc |
24 | @set LJDLLNAME=lua51.dll | 25 | @set LJDLLNAME=lua51.dll |
25 | @set LJLIBNAME=lua51.lib | 26 | @set LJLIBNAME=lua51.lib |
26 | @set BUILDTYPE=release | 27 | @set BUILDTYPE=release |
@@ -37,15 +38,16 @@ if exist minilua.exe.manifest^ | |||
37 | @set LJARCH=x64 | 38 | @set LJARCH=x64 |
38 | @minilua | 39 | @minilua |
39 | @if errorlevel 8 goto :X64 | 40 | @if errorlevel 8 goto :X64 |
41 | @set DASC=vm_x86.dasc | ||
40 | @set DASMFLAGS=-D WIN -D JIT -D FFI | 42 | @set DASMFLAGS=-D WIN -D JIT -D FFI |
41 | @set LJARCH=x86 | 43 | @set LJARCH=x86 |
42 | @set LJCOMPILE=%LJCOMPILE% /arch:SSE2 | 44 | @set LJCOMPILE=%LJCOMPILE% /arch:SSE2 |
43 | :X64 | 45 | :X64 |
44 | @if "%1" neq "gc64" goto :NOGC64 | 46 | @if "%1" neq "nogc64" goto :GC64 |
45 | @shift | 47 | @shift |
46 | @set DASC=vm_x64.dasc | 48 | @set DASC=vm_x86.dasc |
47 | @set LJCOMPILE=%LJCOMPILE% /DLUAJIT_ENABLE_GC64 | 49 | @set LJCOMPILE=%LJCOMPILE% /DLUAJIT_DISABLE_GC64 |
48 | :NOGC64 | 50 | :GC64 |
49 | minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h %DASC% | 51 | minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h %DASC% |
50 | @if errorlevel 1 goto :BAD | 52 | @if errorlevel 1 goto :BAD |
51 | 53 | ||