Skip to content

Commit

Permalink
deps src: Automatic update
Browse files Browse the repository at this point in the history
  • Loading branch information
marvim committed Aug 16, 2024
1 parent b44485a commit 8da8037
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 34 deletions.
30 changes: 15 additions & 15 deletions src/luajit-stamp/download-luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ function(check_file_hash has_hash hash_is_good)
set("${has_hash}" TRUE PARENT_SCOPE)

message(VERBOSE "verifying file...
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz'")
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz'")

file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz" actual_value)
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz" actual_value)

if(NOT "${actual_value}" STREQUAL "346b028d9ba85e04b7e23a43cc51ec076574d2efc0d271d4355141b0145cd6e0")
if(NOT "${actual_value}" STREQUAL "4e444dd48dc4bf7196ca718f287a513f0e51f8608c03c1dccd25488871e5f823")
set("${hash_is_good}" FALSE PARENT_SCOPE)
message(VERBOSE "SHA256 hash of
/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz
/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz
does not match expected value
expected: '346b028d9ba85e04b7e23a43cc51ec076574d2efc0d271d4355141b0145cd6e0'
expected: '4e444dd48dc4bf7196ca718f287a513f0e51f8608c03c1dccd25488871e5f823'
actual: '${actual_value}'")
else()
set("${hash_is_good}" TRUE PARENT_SCOPE)
Expand Down Expand Up @@ -71,32 +71,32 @@ function(sleep_before_download attempt)
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}")
endfunction()

if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz")
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz")
check_file_hash(has_hash hash_is_good)
if(has_hash)
if(hash_is_good)
message(VERBOSE "File already exists and hash match (skip download):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz'
SHA256='346b028d9ba85e04b7e23a43cc51ec076574d2efc0d271d4355141b0145cd6e0'"
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz'
SHA256='4e444dd48dc4bf7196ca718f287a513f0e51f8608c03c1dccd25488871e5f823'"
)
return()
else()
message(VERBOSE "File already exists but hash mismatch. Removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz")
endif()
else()
message(VERBOSE "File already exists but no hash specified (use URL_HASH):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz'
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz'
Old file will be removed and new file downloaded from URL."
)
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz")
endif()
endif()

set(retry_number 5)

message(VERBOSE "Downloading...
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz'
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz'
timeout='none'
inactivity timeout='none'"
)
Expand All @@ -107,7 +107,7 @@ foreach(i RANGE ${retry_number})
if(status_code IN_LIST download_retry_codes)
sleep_before_download(${i})
endif()
foreach(url IN ITEMS [====[https://github.com/LuaJIT/LuaJIT/archive/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz]====])
foreach(url IN ITEMS [====[https://github.com/LuaJIT/LuaJIT/archive/ae4735f621d89d84758769b76432d2319dda9827.tar.gz]====])
if(NOT url IN_LIST skip_url_list)
message(VERBOSE "Using src='${url}'")

Expand All @@ -119,7 +119,7 @@ foreach(i RANGE ${retry_number})

file(
DOWNLOAD
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz"
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz"

# no TIMEOUT
# no INACTIVITY_TIMEOUT
Expand All @@ -136,7 +136,7 @@ foreach(i RANGE ${retry_number})
check_file_hash(has_hash hash_is_good)
if(has_hash AND NOT hash_is_good)
message(VERBOSE "Hash mismatch, removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz")
else()
message(VERBOSE "Downloading... done")
return()
Expand Down
2 changes: 1 addition & 1 deletion src/luajit-stamp/extract-luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.5)

# Make file names absolute:
#
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz" ABSOLUTE)
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/ae4735f621d89d84758769b76432d2319dda9827.tar.gz" ABSOLUTE)
get_filename_component(directory "/home/runner/work/deps/deps/neovim/deps/build/src/luajit" ABSOLUTE)

message(VERBOSE "extracting...
Expand Down
4 changes: 2 additions & 2 deletions src/luajit-stamp/luajit-urlinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ method=url
command=/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/download-luajit.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/verify-luajit.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/extract-luajit.cmake
source_dir=/home/runner/work/deps/deps/neovim/deps/build/src/luajit
work_dir=/home/runner/work/deps/deps/neovim/deps/build/src
url(s)=https://github.com/LuaJIT/LuaJIT/archive/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz
hash=SHA256=346b028d9ba85e04b7e23a43cc51ec076574d2efc0d271d4355141b0145cd6e0
url(s)=https://github.com/LuaJIT/LuaJIT/archive/ae4735f621d89d84758769b76432d2319dda9827.tar.gz
hash=SHA256=4e444dd48dc4bf7196ca718f287a513f0e51f8608c03c1dccd25488871e5f823
no_extract=

2 changes: 1 addition & 1 deletion src/luajit/.relver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1720049189
1723675123
2 changes: 1 addition & 1 deletion src/luajit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ INSTALL_SHARE= $(DPREFIX)/share
INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
INSTALL_INC= $(INSTALL_DEFINC)

INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
export INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
INSTALL_LMODD= $(INSTALL_SHARE)/lua
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
Expand Down
3 changes: 3 additions & 0 deletions src/luajit/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ endif
ifneq (,$(LMULTILIB))
TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\"
endif
ifneq (,$(INSTALL_LJLIBD))
TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\"
endif

##############################################################################
# Target system detection.
Expand Down
20 changes: 20 additions & 0 deletions src/luajit/src/jit/dis_arm64.lua
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,10 @@ local map_datafp = { -- Data processing, SIMD and FP.
}
}
}
},
{ -- 010
shift = 0, mask = 0x81f8fc00,
[0x100e400] = "moviDdG"
}
}

Expand Down Expand Up @@ -832,6 +836,20 @@ local function parse_fpimm8(op)
return sign * frac * 2^exp
end

local function decode_fpmovi(op)
local lo = rshift(op, 5)
local hi = rshift(op, 9)
lo = bor(band(lo, 1) * 0xff, band(lo, 2) * 0x7f80, band(lo, 4) * 0x3fc000,
band(lo, 8) * 0x1fe00000)
hi = bor(band(hi, 1) * 0xff, band(hi, 0x80) * 0x1fe,
band(hi, 0x100) * 0xff00, band(hi, 0x200) * 0x7f8000)
if hi ~= 0 then
return fmt_hex32(hi)..tohex(lo)
else
return fmt_hex32(lo)
end
end

local function prefer_bfx(sf, uns, imms, immr)
if imms < immr or imms == 31 or imms == 63 then
return false
Expand Down Expand Up @@ -1131,6 +1149,8 @@ local function disass_ins(ctx)
x = 0
elseif p == "F" then
x = parse_fpimm8(op)
elseif p == "G" then
x = "#0x"..decode_fpmovi(op)
elseif p == "g" or p == "f" or p == "x" or p == "w" or
p == "d" or p == "s" then
-- These are handled in D/N/M/A.
Expand Down
14 changes: 14 additions & 0 deletions src/luajit/src/lj_emit_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ static uint32_t emit_isfpk64(uint64_t n)
return ~0u;
}

static uint32_t emit_isfpmovi(uint64_t n)
{
/* Is every byte either 0x00 or 0xff? */
if ((n & U64x(01010101,01010101)) * 0xff != n) return 0;
/* Form 8-bit value by taking one bit from each byte. */
n &= U64x(80402010,08040201);
n = (n * U64x(01010101,01010101)) >> 56;
/* Split into the format expected by movi. */
return ((n & 0xe0) << 6) | 0x700 | (n & 0x1f);
}

/* -- Emit basic instructions --------------------------------------------- */

static void emit_dnma(ASMState *as, A64Ins ai, Reg rd, Reg rn, Reg rm, Reg ra)
Expand Down Expand Up @@ -300,6 +311,9 @@ static void emit_loadk64(ASMState *as, Reg r, IRIns *ir)
if (fpk != ~0u) {
emit_d(as, A64I_FMOV_DI | A64F_FP8(fpk), (r & 31));
return;
} else if ((fpk = emit_isfpmovi(*k))) {
emit_d(as, A64I_MOVI_DI | (fpk << 5), (r & 31));
return;
}
}
ofs = glofs(as, k);
Expand Down
25 changes: 19 additions & 6 deletions src/luajit/src/lj_opt_fold.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ LJFOLDF(shortcut_conv_num_int)
}

LJFOLD(CONV CONV IRCONV_INT_NUM) /* _INT */
LJFOLD(CONV CONV IRCONV_U32_NUM) /* _U32*/
LJFOLD(CONV CONV IRCONV_U32_NUM) /* _U32 */
LJFOLDF(simplify_conv_int_num)
{
/* Fold even across PHI to avoid expensive num->int conversions in loop. */
Expand Down Expand Up @@ -1170,8 +1170,10 @@ LJFOLDF(simplify_conv_i64_num)

LJFOLD(CONV CONV IRCONV_INT_I64) /* _INT or _U32 */
LJFOLD(CONV CONV IRCONV_INT_U64) /* _INT or _U32 */
LJFOLD(CONV CONV IRCONV_INT_U32) /* _INT or _U32 */
LJFOLD(CONV CONV IRCONV_U32_I64) /* _INT or _U32 */
LJFOLD(CONV CONV IRCONV_U32_U64) /* _INT or _U32 */
LJFOLD(CONV CONV IRCONV_U32_INT) /* _INT or _U32 */
LJFOLDF(simplify_conv_int_i64)
{
int src;
Expand Down Expand Up @@ -1216,14 +1218,13 @@ LJFOLDF(simplify_tobit_conv)
return NEXTFOLD;
}

/* Shortcut floor/ceil/round + IRT_NUM <- IRT_INT/IRT_U32 conversion. */
/* Shortcut floor/ceil/trunc + IRT_NUM <- integer conversion. */
LJFOLD(FPMATH CONV IRFPM_FLOOR)
LJFOLD(FPMATH CONV IRFPM_CEIL)
LJFOLD(FPMATH CONV IRFPM_TRUNC)
LJFOLDF(simplify_floor_conv)
{
if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT ||
(fleft->op2 & IRCONV_SRCMASK) == IRT_U32)
if ((uint32_t)(fleft->op2 & IRCONV_SRCMASK) - (uint32_t)IRT_I8 <= (uint32_t)(IRT_U64 - IRT_U8))
return LEFTFOLD;
return NEXTFOLD;
}
Expand Down Expand Up @@ -1935,9 +1936,10 @@ LJFOLDF(abc_k)
LJFOLD(ABC any any)
LJFOLDF(abc_invar)
{
/* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */
/* Invariant ABC marked as P32 or U32. Drop if op1 is invariant too. */
if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP] &&
!irt_isphi(IR(fins->op1)->t))
(irt_isu32(fins->t) ||
(!irref_isk(fins->op1) && !irt_isphi(IR(fins->op1)->t))))
return DROPFOLD;
return NEXTFOLD;
}
Expand Down Expand Up @@ -2485,6 +2487,17 @@ LJFOLD(CNEW any any)
LJFOLD(XSNEW any any)
LJFOLDX(lj_ir_emit)

/* -- Miscellaneous ------------------------------------------------------- */

LJFOLD(CARG any any)
LJFOLDF(cse_carg)
{
TRef tr = lj_opt_cse(J);
if (tref_ref(tr) < J->chain[IR_LOOP]) /* CSE across loop? */
return EMITFOLD; /* Raw emit. Assumes fins is left intact by CSE. */
return tr;
}

/* ------------------------------------------------------------------------ */

/* Every entry in the generated hash table is a 32 bit pattern:
Expand Down
5 changes: 3 additions & 2 deletions src/luajit/src/lj_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,12 +1395,13 @@ static void rec_idx_abc(jit_State *J, TRef asizeref, TRef ikey, uint32_t asize)
/* Runtime value for stop of loop is within bounds? */
if ((uint64_t)stop + ofs < (uint64_t)asize) {
/* Emit invariant bounds check for stop. */
emitir(IRTG(IR_ABC, IRT_P32), asizeref, ofs == 0 ? J->scev.stop :
uint32_t abc = IRTG(IR_ABC, tref_isk(asizeref) ? IRT_U32 : IRT_P32);
emitir(abc, asizeref, ofs == 0 ? J->scev.stop :
emitir(IRTI(IR_ADD), J->scev.stop, ofsref));
/* Emit invariant bounds check for start, if not const or negative. */
if (!(J->scev.dir && J->scev.start &&
(int64_t)IR(J->scev.start)->i + ofs >= 0))
emitir(IRTG(IR_ABC, IRT_P32), asizeref, ikey);
emitir(abc, asizeref, ikey);
return;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/luajit/src/lj_snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,8 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
lua_State *L = J->L;

/* Set interpreter PC to the next PC to get correct error messages. */
setcframe_pc(cframe_raw(L->cframe), pc+1);
setcframe_pc(L->cframe, pc+1);
setcframe_pc(cframe_raw(cframe_prev(L->cframe)), pc);

/* Make sure the stack is big enough for the slots from the snapshot. */
if (LJ_UNLIKELY(L->base + snap->topslot >= tvref(L->maxstack))) {
Expand Down
1 change: 1 addition & 0 deletions src/luajit/src/lj_target_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ typedef enum A64Ins {
A64I_FMOV_R_D = 0x9e660000,
A64I_FMOV_D_R = 0x9e670000,
A64I_FMOV_DI = 0x1e601000,
A64I_MOVI_DI = 0x2f000400,
} A64Ins;

#define A64I_BR_AUTH (LJ_ABI_PAUTH ? A64I_BRAAZ : A64I_BR)
Expand Down
4 changes: 1 addition & 3 deletions src/luajit/src/lj_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,10 +905,8 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr)
exd.J = J;
exd.exptr = exptr;
errcode = lj_vm_cpcall(L, NULL, &exd, trace_exit_cp);
if (errcode) {
setcframe_pc(cframe_raw(L->cframe), L); /* Point to any valid memory. */
if (errcode)
return -errcode; /* Return negated error code. */
}

if (exitcode) copyTV(L, L->top++, &exiterr); /* Anchor the error object. */

Expand Down
7 changes: 5 additions & 2 deletions src/luajit/src/luaconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#endif
#define LUA_LROOT "/usr/local"
#define LUA_LUADIR "/lua/5.1/"
#define LUA_LJDIR "/luajit-2.1/"

#ifdef LUA_ROOT
#define LUA_JROOT LUA_ROOT
Expand All @@ -51,7 +50,11 @@
#define LUA_RCPATH
#endif

#define LUA_JPATH ";" LUA_JROOT "/share" LUA_LJDIR "?.lua"
#ifndef LUA_LJDIR
#define LUA_LJDIR LUA_JROOT "/share/luajit-2.1"
#endif

#define LUA_JPATH ";" LUA_LJDIR "/?.lua"
#define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR
#define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR
#define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua"
Expand Down

0 comments on commit 8da8037

Please sign in to comment.