]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Mon, 12 Oct 2020 14:18:02 +0000 (16:18 +0200)
committerMike Pall <mike>
Mon, 12 Oct 2020 14:18:02 +0000 (16:18 +0200)
17 files changed:
1  2 
README
doc/contact.html
doc/ext_ffi_api.html
doc/ext_ffi_semantics.html
doc/ext_ffi_tutorial.html
doc/extensions.html
doc/faq.html
doc/install.html
doc/luajit.html
doc/running.html
dynasm/dynasm.lua
etc/luajit.pc
src/jit/dump.lua
src/lib_base.c
src/lj_alloc.c
src/lua.h
src/luajit.h

diff --cc README
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 68193187d4aa62b2078296847bf3bf043ed00897,9d37cf0e74bd39f895400e6b641ad47e6f1ffe40..5b7bb58ff57c6cedb48dbfb43f62d2b98cf44760
@@@ -108,10 -106,7 +108,10 @@@ bit.lshift bit.rshift bit.arshift bit.r
  <p>
  This module is a LuaJIT built-in &mdash; you don't need to download or
  install Lua BitOp. The Lua BitOp site has full documentation for all
- <a href="https://bitop.luajit.org/api.html">Lua BitOp API functions</a>.
+ <a href="https://bitop.luajit.org/api.html"><span class="ext">&raquo;</span>&nbsp;Lua BitOp API functions</a>.
 +The FFI adds support for
 +<a href="ext_ffi_semantics.html#cdata_arith">64&nbsp;bit bitwise operations</a>,
 +using the same API functions.
  </p>
  <p>
  Please make sure to <tt>require</tt> the module before using any of
diff --cc doc/faq.html
Simple merge
index bc96b6610ffe4181a48d24dd43fe6dec8d97e6e6,85ca991367d857f497c7bd53f5fbfef7ed5c7dac..451fdd410cc07a37eed81b75e048d20ef28d35bc
@@@ -364,31 -340,25 +364,31 @@@ Here are some examples for targets wit
  make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \
       TARGET_CFLAGS="-mfloat-abi=soft"
  
 -# ARM soft-float ABI with VFP (example for Cortex-A8)
 +# ARM soft-float ABI with VFP (example for Cortex-A9)
  make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \
 -     TARGET_CFLAGS="-mcpu=cortex-a8 -mfloat-abi=softfp"
 +     TARGET_CFLAGS="-mcpu=cortex-a9 -mfloat-abi=softfp"
  
 -# ARM hard-float ABI with VFP (armhf, requires recent toolchain)
 +# ARM hard-float ABI with VFP (armhf, most modern toolchains)
  make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf-
  
 +# ARM64
 +make CROSS=aarch64-linux-
 +
  # PPC
  make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu-
 -# PPC/e500v2 (fast interpreter only)
 -make HOST_CC="gcc -m32" CROSS=powerpc-e500v2-linux-gnuspe-
  
 -# MIPS big-endian
 +# MIPS32 big-endian
  make HOST_CC="gcc -m32" CROSS=mips-linux-
 -# MIPS little-endian
 +# MIPS32 little-endian
  make HOST_CC="gcc -m32" CROSS=mipsel-linux-
 +
 +# MIPS64 big-endian
 +make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64"
 +# MIPS64 little-endian
 +make CROSS=mipsel-linux- TARGET_CFLAGS="-mips64r2 -mabi=64"
  </pre>
  <p>
- You can cross-compile for <b id="android">Android</b> using the <a href="https://developer.android.com/ndk/">Android NDK</a>.
+ You can cross-compile for <b id="android">Android</b> using the <a href="https://developer.android.com/ndk/"><span class="ext">&raquo;</span>&nbsp;Android NDK</a>.
  Please adapt the environment variables to match the install locations and the
  desired target platform. E.g. Android&nbsp;4.1 corresponds to ABI level&nbsp;16.
  </p>
@@@ -412,23 -374,9 +412,23 @@@ make HOST_CC="gcc -m32" CROSS=$NDKCROS
       TARGET_LD=$NDKCC
  </pre>
  <p>
- You can cross-compile for <b id="ios">iOS 3.0+</b> (iPhone/iPad) using the <a href="https://developer.apple.com/ios/">iOS SDK</a>:
 -Please use the LuaJIT 2.1 branch to compile for
 -<b id="ios">iOS</b> (iPhone/iPad).
++You can cross-compile for <b id="ios">iOS 3.0+</b> (iPhone/iPad) using the <a href="https://developer.apple.com/ios/"><span class="ext">&raquo;</span>&nbsp;iOS SDK</a>:
  </p>
 +<p style="font-size: 8pt;">
 +Note: <b>the JIT compiler is disabled for iOS</b>, because regular iOS Apps
 +are not allowed to generate code at runtime. You'll only get the performance
 +of the LuaJIT interpreter on iOS. This is still faster than plain Lua, but
 +much slower than the JIT compiler. Please complain to Apple, not me.
 +Or use Android. :-p
 +</p>
 +<pre class="code">
 +# iOS/ARM64
 +ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
 +ICC=$(xcrun --sdk iphoneos --find clang)
 +ISDKF="-arch arm64 -isysroot $ISDKP"
 +make DEFAULT_CC=clang CROSS="$(dirname $ICC)/" \
 +     TARGET_FLAGS="$ISDKF" TARGET_SYS=iOS
 +</pre>
  
  <h3 id="consoles">Cross-compiling for consoles</h3>
  <p>
diff --cc doc/luajit.html
Simple merge
Simple merge
index 8e85af240a7cd65bf250f7bf511be639a74a1382,e33a99bee2a0920d37ec786b9cae76831b7bd548..b34124b7b17a084554e9de7105f0343392470263
  local _info = {
    name =      "DynASM",
    description =       "A dynamic assembler for code generation engines",
 -  version =   "1.3.0",
 -  vernum =     10300,
 -  release =   "2011-05-05",
 +  version =   "1.4.0",
 +  vernum =     10400,
 +  release =   "2015-10-18",
    author =    "Mike Pall",
-   url =               "http://luajit.org/dynasm.html",
+   url =               "https://luajit.org/dynasm.html",
    license =   "MIT",
    copyright = [[
  Copyright (C) 2005-2020 Mike Pall. All rights reserved.
diff --cc etc/luajit.pc
Simple merge
index 06d1e258c29c78dc1bf51c7895fef7346b6f32a0,6a2632c3868b36345bec75121e015681a2b4e96c..d3425bda4c19d2b9dbd66b5a8e5500062ce50d25
@@@ -614,7 -601,7 +614,7 @@@ local function dump_texit(tr, ex, ngpr
    out:write("---- TRACE ", tr, " exit ", ex, "\n")
    if dumpmode.X then
      local regs = {...}
--    if jit.arch == "x64" then
++    if jit.arch:sub(-2) == "64" then
        for i=1,ngpr do
        out:write(format(" %016x", regs[i]))
        if i % 4 == 0 then out:write("\n") end
diff --cc src/lib_base.c
index eb604538c8d973caa2b54f1b861c309053d89269,f3388798939845b996c3188883f52bb8df40f436..c8409042583593f2e80ec720eda25908dbafe5a8
@@@ -504,15 -506,24 +504,15 @@@ LJLIB_CF(print
      lua_gettable(L, LUA_GLOBALSINDEX);
      tv = L->top-1;
    }
-   shortcut = (tvisfunc(tv) && funcV(tv)->c.ffid == FF_tostring)
-             && !gcrefu(basemt_it(G(L), LJ_TNUMX));
+   shortcut = (tvisfunc(tv) && funcV(tv)->c.ffid == FF_tostring) &&
 -            !gcrefu(basemt_it(G(L), LJ_TNUMX));
++           !gcrefu(basemt_it(G(L), LJ_TNUMX));
    for (i = 0; i < nargs; i++) {
 +    cTValue *o = &L->base[i];
      const char *str;
      size_t size;
 -    cTValue *o = &L->base[i];
 -    if (shortcut && tvisstr(o)) {
 -      str = strVdata(o);
 -      size = strV(o)->len;
 -    } else if (shortcut && tvisint(o)) {
 -      char buf[LJ_STR_INTBUF];
 -      char *p = lj_str_bufint(buf, intV(o));
 -      size = (size_t)(buf+LJ_STR_INTBUF-p);
 -      str = p;
 -    } else if (shortcut && tvisnum(o)) {
 -      char buf[LJ_STR_NUMBUF];
 -      size = lj_str_bufnum(buf, o);
 -      str = buf;
 +    MSize len;
 +    if (shortcut && (str = lj_strfmt_wstrnum(L, o, &len)) != NULL) {
 +      size = len;
      } else {
        copyTV(L, L->top+1, o);
        copyTV(L, L->top, L->top-1);
diff --cc src/lj_alloc.c
Simple merge
diff --cc src/lua.h
Simple merge
diff --cc src/luajit.h
index 600031a1b4bf20818189033965eb9825934abdd5,ea7118c4389c29d3f04c67657d1f0e0449040ee7..d569fd401e0557b9f3a1aeca952d53beb005c0fb
  
  #include "lua.h"
  
 -#define LUAJIT_VERSION                "LuaJIT 2.0.5"
 -#define LUAJIT_VERSION_NUM    20005  /* Version 2.0.5 = 02.00.05. */
 -#define LUAJIT_VERSION_SYM    luaJIT_version_2_0_5
 +#define LUAJIT_VERSION                "LuaJIT 2.1.0-beta3"
 +#define LUAJIT_VERSION_NUM    20100  /* Version 2.1.0 = 02.01.00. */
 +#define LUAJIT_VERSION_SYM    luaJIT_version_2_1_0_beta3
  #define LUAJIT_COPYRIGHT      "Copyright (C) 2005-2020 Mike Pall"
- #define LUAJIT_URL            "http://luajit.org/"
+ #define LUAJIT_URL            "https://luajit.org/"
  
  /* Modes for luaJIT_setmode. */
  #define LUAJIT_MODE_MASK      0x00ff