From: Mike Pall Date: Mon, 12 Oct 2020 14:18:02 +0000 (+0200) Subject: Merge branch 'master' into v2.1 X-Git-Tag: v2.1.ROLLING~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d8b747c161db457e032a023ebbff511f5de5ec2;p=thirdparty%2FLuaJIT.git Merge branch 'master' into v2.1 --- 1d8b747c161db457e032a023ebbff511f5de5ec2 diff --cc doc/extensions.html index 68193187,9d37cf0e..5b7bb58f --- a/doc/extensions.html +++ b/doc/extensions.html @@@ -108,10 -106,7 +108,10 @@@ bit.lshift bit.rshift bit.arshift bit.r

This module is a LuaJIT built-in — you don't need to download or install Lua BitOp. The Lua BitOp site has full documentation for all - Lua BitOp API functions. + » Lua BitOp API functions. +The FFI adds support for +64 bit bitwise operations, +using the same API functions.

Please make sure to require the module before using any of diff --cc doc/install.html index bc96b661,85ca9913..451fdd41 --- a/doc/install.html +++ b/doc/install.html @@@ -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"

- You can cross-compile for Android using the Android NDK. + You can cross-compile for Android using the » Android NDK. Please adapt the environment variables to match the install locations and the desired target platform. E.g. Android 4.1 corresponds to ABI level 16.

@@@ -412,23 -374,9 +412,23 @@@ make HOST_CC="gcc -m32" CROSS=$NDKCROS TARGET_LD=$NDKCC

- You can cross-compile for iOS 3.0+ (iPhone/iPad) using the iOS SDK: -Please use the LuaJIT 2.1 branch to compile for -iOS (iPhone/iPad). ++You can cross-compile for iOS 3.0+ (iPhone/iPad) using the » iOS SDK:

+

+Note: the JIT compiler is disabled for iOS, 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 +

+
 +# 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
 +

Cross-compiling for consoles

diff --cc dynasm/dynasm.lua index 8e85af24,e33a99be..b34124b7 --- a/dynasm/dynasm.lua +++ b/dynasm/dynasm.lua @@@ -10,11 -10,11 +10,11 @@@ 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 src/jit/dump.lua index 06d1e258,6a2632c3..d3425bda --- a/src/jit/dump.lua +++ b/src/jit/dump.lua @@@ -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 eb604538,f3388798..c8409042 --- a/src/lib_base.c +++ b/src/lib_base.c @@@ -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/luajit.h index 600031a1,ea7118c4..d569fd40 --- a/src/luajit.h +++ b/src/luajit.h @@@ -30,11 -30,11 +30,11 @@@ #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