From 69d3c41bfc690a762b3f83fa3883b4b0f6e05322 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 22 Oct 2023 21:15:55 -0300 Subject: [PATCH] Update LuaJIT to commit e826d0c --- CMakeLists.txt | 2 +- libs/LuaJIT/.relver | 2 +- libs/LuaJIT/doc/extensions.html | 4 +- libs/LuaJIT/doc/install.html | 5 +- libs/LuaJIT/doc/running.html | 3 +- libs/LuaJIT/dynasm/dasm_arm64.lua | 8 +- libs/LuaJIT/src/host/buildvm_peobj.c | 21 ++- libs/LuaJIT/src/jit/bcsave.lua | 4 +- libs/LuaJIT/src/jit/dis_arm64.lua | 2 +- libs/LuaJIT/src/lib_base.c | 5 +- libs/LuaJIT/src/lib_ffi.c | 2 +- libs/LuaJIT/src/lj_api.c | 7 +- libs/LuaJIT/src/lj_asm_arm.h | 2 +- libs/LuaJIT/src/lj_asm_arm64.h | 51 ++++--- libs/LuaJIT/src/lj_asm_x86.h | 3 +- libs/LuaJIT/src/lj_carith.c | 4 + libs/LuaJIT/src/lj_ccall.c | 18 ++- libs/LuaJIT/src/lj_crecord.c | 6 +- libs/LuaJIT/src/lj_ctype.h | 6 +- libs/LuaJIT/src/lj_def.h | 2 +- libs/LuaJIT/src/lj_dispatch.c | 2 +- libs/LuaJIT/src/lj_emit_arm64.h | 40 ++++-- libs/LuaJIT/src/lj_err.c | 51 +++++-- libs/LuaJIT/src/lj_ffrecord.c | 23 ++- libs/LuaJIT/src/lj_ir.h | 4 +- libs/LuaJIT/src/lj_ircall.h | 2 +- libs/LuaJIT/src/lj_iropt.h | 6 + libs/LuaJIT/src/lj_opt_dce.c | 2 +- libs/LuaJIT/src/lj_opt_fold.c | 8 +- libs/LuaJIT/src/lj_record.c | 14 +- libs/LuaJIT/src/lj_state.c | 27 +++- libs/LuaJIT/src/lj_state.h | 1 + libs/LuaJIT/src/lj_target_arm64.h | 2 + libs/LuaJIT/src/lj_trace.c | 26 ++-- libs/LuaJIT/src/msvcbuild.bat | 15 +- libs/LuaJIT/src/vm_arm64.dasc | 207 +++++++++++++++------------ libs/LuaJIT/src/vm_mips64.dasc | 1 + 37 files changed, 378 insertions(+), 210 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5275b951..d4cb7abf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,7 @@ endif() set(MEGA_ZLIB_VER "1.2.12") set(MEGA_LUA51_VER "5.1.5") -set(MEGA_LUAJIT_VER "2.1.0-1c27912") +set(MEGA_LUAJIT_VER "2.1.0-e826d0c") set(MEGA_LIBOGG_VER "1.3.2") set(MEGA_LIBVORBIS_VER "1.3.5") set(MEGA_LIBTHEORA_VER "1.1.1") diff --git a/libs/LuaJIT/.relver b/libs/LuaJIT/.relver index f10565fc..b1c66483 100644 --- a/libs/LuaJIT/.relver +++ b/libs/LuaJIT/.relver @@ -1 +1 @@ -1694316387 +1697887905 diff --git a/libs/LuaJIT/doc/extensions.html b/libs/LuaJIT/doc/extensions.html index eb591d1e..a4f20841 100644 --- a/libs/LuaJIT/doc/extensions.html +++ b/libs/LuaJIT/doc/extensions.html @@ -426,9 +426,7 @@ the toolchain used to compile LuaJIT: on the C stack. The contents of the C++ exception object pass through unmodified.
  • Lua errors can be caught on the C++ side with catch(...). -The corresponding Lua error message can be retrieved from the Lua stack.
    -For MSVC for Windows 64 bit this requires compilation of your C++ code -with /EHa.
  • +The corresponding Lua error message can be retrieved from the Lua stack.
  • Throwing Lua errors across C++ frames is safe. C++ destructors will be called.
  • diff --git a/libs/LuaJIT/doc/install.html b/libs/LuaJIT/doc/install.html index be721031..04bfe26d 100644 --- a/libs/LuaJIT/doc/install.html +++ b/libs/LuaJIT/doc/install.html @@ -203,7 +203,7 @@ Or install Microsoft's Visual Studio (MSVC).

    Building with MSVC

    -Open a "Visual Studio Command Prompt" (either x86 or x64), cd to the +Open a "Visual Studio Command Prompt" (x86, x64 or ARM64), cd to the directory with the source code and run these commands:

    @@ -214,6 +214,9 @@ msvcbuild
     Check the msvcbuild.bat file for more options.
     Then follow the installation instructions below.
     

    +

    +For an x64 to ARM64 cross-build run this first: vcvarsall.bat x64_arm64 +

    Building with MinGW or Cygwin

    Open a command prompt window and make sure the MinGW or Cygwin programs diff --git a/libs/LuaJIT/doc/running.html b/libs/LuaJIT/doc/running.html index 3afc1b56..9dd2b411 100644 --- a/libs/LuaJIT/doc/running.html +++ b/libs/LuaJIT/doc/running.html @@ -120,7 +120,8 @@ file name: