-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull LuaJIT v2.1 and import complete LuaJIT git history #1111
Conversation
Thanks to Vyacheslav Egorov.
Thanks to Vyacheslav Egorov.
Thanks to Vyacheslav Egorov.
Thanks to drbo.
Contributed by Yaakov Selkowitz.
Reported by Elias Hogstvedt. Debugged and fixed by Vyacheslav Egorov.
Reported by Vyacheslav Egorov.
Thanks to Vyacheslav Egorov.
Thanks to Vyacheslav Egorov.
Thanks to Peter Cawley.
Thanks to Peter Cawley.
Thanks to Peter Cawley.
Thanks to Peter Cawley.
Broken since SIMD constants were switched to IR_FLOAD REF_NIL.
Broken since SIMD constants were switched to IR_FLOAD REF_NIL.
Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. Sponsored by Cisco Systems, Inc.
Many thanks to Demetrios Obenour for tracking down this long-standing bug.
Contributed by Alexey Kopytov.
Contributed by Alexey Kopytov.
Also fixes Illumos address space issue reported by Theo Schlossnagle.
d3e36e7 Merge branch 'master' into v2.1 f50bf75 Remove unnecessary mcode alloc pointer check. d62459f Limit mcode alloc probing, depending on the available pool size. 4e30836 Fix overly restrictive range calculation in mcode allocation. ff64836 Fix out-of-scope goto handling in parser. 3ab9f5a Remove internal __mode = "K" and replace with safe check. eef77a6 Fix annoying warning, due to deterministic binutils configuration. a9740d9 DynASM: Fix warning. a25c0b9 MIPS64, part 2: Add MIPS64 hard-float JIT compiler backend. 4416e88 Fix FOLD rules for math.abs() and FP negation. 019fb9d Fix soft-float math.abs() and negation. 130d1dc x64/LJ_GC64: Fix warning for DUALNUM build. f640ec7 x64/LJ_GC64: Fix (currently unused) integer stores in asm_tvptr(). 0a46ef1 ARM64: Cleanup and de-cargo-cult TValue store generation. d0759e4 Merge branch 'master' into v2.1 892d370 MIPS: Don't use RID_GP as a scratch register. ee33a1f MIPS: Fix emitted code for U32 to float conversion. 1abd779 MIPS: Backport workaround for compact unwind tables. 6bf3e4d Make checkptrGC() actually work. 5aa0201 ARM64: Fix AREF/HREF/UREF fusion. bd7e42e Fix extension docs about package.searchers. 71ff7ef Merge branch 'master' into v2.1 b93a1dd Bump copyright date to 2017. c94b921 LJ_GC64: Add build options and install instructions. c198167 Add some more extensions from Lua 5.2/5.3. ed4ce98 Merge branch 'master' into v2.1 a1e13fa Fix HTML formatting. 12c0df4 Merge branch 'master' into v2.1 a2013dd Fix cross-endian jit.bcsave for MIPS target. 8e5d7be ARM64: Remove unused variables in disassembler. ebec253 ARM64: Fuse BOR/BXOR and BNOT into ORN/EON. 3cfa9cb Merge branch 'master' into v2.1 fb61f7c Add "proto" field to jit.util.funcinfo(). 1973807 Add "proto" field to jit.util.funcinfo(). 4ccd876 ARM64: Use the correct FUSE check. 44b99ff ARM64: Fuse BOR(BSHL, BSHR) into EXTR/ROR. ec2756b Add missing FOLD rule for 64 bit shift+BAND simplification. 986854c ARM64: Fix code generation for S19 offsets. 3975b6c ARM64: Fuse various BAND/BSHL/BSHR/BSAR combinations. 2772cbc ARM64: Fuse FP multiply-add/sub. bfeb116 ARM64: Fuse XLOAD/XSTORE with STRREF/ADD/BSHL/CONV. 2ac2cd4 ARM64: Reorganize operand extension definitions. 48b0029 ARM64: Add missing ldrb/strb instructions to disassembler. 22511fb ARM64: Fix pc-relative loads of consts. Cleanup branch codegen. 3ad2bbf ARM64: Make use of tbz/tbnz and cbz/cbnz. 6538c8a Document 47 bit limit for lightuserdata. d7243e1 Eliminate use of lightuserdata derived from static data pointers. 8125989 ARM64: Emit more efficient trace exits. 1131fa2 Merge branch 'master' into v2.1 c3cae04 Update contact info. a566544 Generalize deferred constant handling in backend to 64 bit. 2b77da3 ARM64: Reject special case in emit_isk13(). 7a0c3a1 ARM64: Allow full VA range for mcode allocation. 04b6070 ARM64: Add JIT compiler backend. 13642b7 Whitespace. 202713a Fix amalgamated build. e577db5 Increase range of GG_State loads via IR_FLOAD with REF_NIL. 5400c1e MIPS: Fix TSETR barrier. 7a58a8f Report parent of stitched trace. 716f2da LJ_GC64: Various followup fixes. bdcaf4b LJ_GC64: Fix HREF for pointers. 6a25014 LJ_FR2: Fix slot 1 handling. 3f43f09 Merge branch 'master' into v2.1 a68c411 Fix GC step size calculation. 54b78e7 LJ_GC64: Various fixes. 63465fe LJ_GC64: Fix jit.on/off. cf80edb Fix -jp=a mode for builtins. f27b250 Merge branch 'master' into v2.1 fcc8244 ARM: Fix BLX encoding for Thumb interworking calls. 4ca3909 Merge branch 'master' into v2.1 8ada57e Looks like COLORTERM has gone out of fashion. 1a9a264 Merge branch 'master' into v2.1 9910ded Initialize uv->immutable for upvalues of loaded chunks. 03b03ef Windows/x86: Add MSVC flags for debug build with exception interop. f6f838f Merge branch 'master' into v2.1 02b9b55 Revert "OSX: Switch to Clang as the default compiler." 972a1a4 Fix exit status for 'luajit -b'. c98660c Must preserve J->fold.ins (fins) around call to lj_ir_ksimd(). 22e8e07 Merge branch 'master' into v2.1 d41469c Emit bytecode in .c/.h files with unsigned char type. 92d9ff2 Set arg table before evaluating LUA_INIT and -e chunks. 6be5ffd Adjust comment with defines. 7374046 Merge branch 'master' into v2.1 b74ddaf Fix for cdata vs. non-cdata arithmetics/comparisons. 37b377d Merge branch 'master' into v2.1 1914de7 Fix unused vars etc. in internal Lua files. 01e4754 Properly clean up state before restart of trace assembly. ce30766 Merge branch 'master' into v2.1 aef4edd Drop leftover regs in 'for' iterator assignment, too. 287a534 MIPS: Support MIPS16 interlinking. f598343 x64/LJ_GC64: Fix code generation for IR_KNULL call argument. a88dc57 Merge branch 'master' into v2.1 a7bec69 Fix PHI remarking in SINK pass. ce1ad87 LJ_GC64: Set correct nil value when clearing a cdata finalizer. cc05e79 LJ_GC64: Ensure all IR slot fields are initialized. 58ca165 LJ_GC64: Allow optional use of the system memory allocator. 7d43402 Merge branch 'master' into v2.1 3206307 Fix Valgrind suppressions. 1c0454c Merge branch 'master' into v2.1 a5f8a48 Don't try to record outermost pcall() return to lower frame. 384ce2f MIPS: Fix build failures and warnings. 56fe899 Proper fix for LJ_GC64 changes to asm_href(). d9986fb MIPS64, part 1: Add MIPS64 support to interpreter. e3c4c9a DynASM/MIPS: Add missing MIPS64 instructions. 5e2b609 Fix compiler warning. e77638f x64/LJ_GC64: Fix __call metamethod for tailcall. 6360f6e Fix collateral damage from LJ_GC64 changes to asm_href(). 9fa843a Cleanup install docs. 3f1031c Use MAP_TRYFIXED for the probing memory allocator, if available. bfe2a35 Merge branch 'master' into v2.1 747feb6 x86: Don't spill an explicit REF_BASE in the IR. 2868715 x64/LJ_GC64: Add missing backend support and enable JIT compilation. 6c8258d LJ_FR2: Add support for trace recording and snapshots. 8f868a9 LJ_GC64: Update IR type sizes. f26679c LJ_GC64: Add support for 64 bit GCobj constants in the IR. 9e99ccc Strip out old infrastructure for 64 bit constants. 7fb75cc Embed 64 bit constants directly in the IR, using two slots. a406797 Always walk IR constants in ascending order. 3152ed9 Simplify GCtrace * reference embedding for trace stitching. a657fa0 Make the IR immovable after assembly. 5135876 Add ra_addrename(). ccae333 Load SIMD constants with IR_FLOAD from GG_State. 786dbb2 Add IR_FLOAD with REF_NIL for field loads from GG_State. cfa188f Move common 32/64 bit in-memory FP constants to jit_State. 1931b38 LJ_GC64: Introduce IRT_PGC. 475a6ae Merge branch 'master' into v2.1 37e1e70 Add guard for obscure aliasing between open upvalues and SSA slots. d4f3b11 Workaround for MinGW headers lacking some exception definitions. 4fe400c Merge branch 'master' into v2.1 5837c2a Remove assumption that lj_math_random_step() doesn't clobber FPRs. 573daa9 Fix dependencies. 35b09e6 Windows/x86: Add full exception interoperability. 6a99732 Merge branch 'master' into v2.1 f05280e x86/x64: Fix instruction length decoder. 221268b Use the GDB JIT API in a thread-safe manner. ac42037 Constrain value range of lj_ir_kptr() to unsigned 32 bit pointers. d8ac623 Merge branch 'master' into v2.1 7b26e9c Fix GCC 6 -Wmisleading-indentation warnings. 344fe5f Merge branch 'master' into v2.1 2f0001f Fix handling of non-numeric strings in arithmetic coercions. 4c6498d Merge branch 'master' into v2.1 cc4f5d0 Whitespace. d13d420 Merge branch 'master' into v2.1 73680a5 x86/x64: Search for exit jumps with instruction length decoder. 0c6fdc1 Rewrite memory block allocator. 101115d Merge branch 'master' into v2.1 e5b5e07 MIPS: Fix BC_ISNEXT fallback path. 096a7cf x64/LJ_GC64: Fix BC_UCLO check for fast-path. ac9193c x86: Improve disassembly of BMI2 instructions. d150fbf Merge branch 'master' into v2.1 1c6fd13 Fix recording of select(n, ...) with off-trace varargs 25b3779 Merge branch 'master' into v2.1 4ab6367 Cygwin: Allow cross-builds to non-Cygwin targets. 296f0ca Windows/x64/LJ_GC64: Fix math.frexp() and math.modf() (again). 6e623b9 Merge branch 'master' into v2.1 62af101 MIPS: Fix use of ffgccheck delay slots in interpreter. 892887e x86: Generate BMI2 shifts and rotates, if available. 6801e71 x86: Detect BMI2 instruction support. c24c8e5 x64/LJ_GC64: Fix JIT glue code in interpreter. d714561 Merge branch 'master' into v2.1 9531eb2 Windows: Remove intermediate files at end of build. e03e597 Fix compiler warnings. df7bb5b Merge branch 'master' into v2.1 e23fc10 Fix display of NULL (light)userdata in -jdump. c730540 Fix formatting of some small denormals at low precision. 713e340 Merge branch 'master' into v2.1 7e05355 Fix install for cross-builds. cf3e01e Merge branch 'master' into v2.1 ddadbe8 Fix compiler warnings. be25592 ARM: Fix build problem with external frame unwinding. 64c6da6 MIPS soft-float: Fix code generation for HREF. 75d046d DynASM/x86: Add ADX instructions. 3e4a196 RELEASE LuaJIT-2.1.0-beta2 8290076 Update changelog. f423194 Merge branch 'master' into v2.1 db1b399 Bump copyright date to 2016. 6f3eed9 Fix Android/x86 build. 1c45c6a Fix build with JIT disabled. 18f6aa9 Use internal implementation for converting FP numbers to strings. 339a1fd Windows/x64/LJ_GC64: Fix math.frexp() and math.modf(). 6cb38f7 Merge branch 'master' into v2.1 a443889 Don't allocate unused 2nd result register in JIT compiler backend. f547a14 MIPS: Add soft-float support to JIT compiler backend. 825dcdc Generalize LJ_SOFTFP dependencies in lj_asm.c. bfbcd72 PS4: Switch default build to amalgamated and LJ_GC64 mode. 60de2f3 MIPS: Switch to dual-number mode. Fix soft-float interpreter. git-subtree-dir: lib/luajit git-subtree-split: d3e36e7
…pgrade This commit affects only the git history and not the contents of the code. The unsquashed LuaJIT commit history is merged into our lib/luajit subtree. This should make it easier for us to pull in changes to LuaJIT from multiple branches, because git subtree will know which commits we have and which ones we don't. The code is left unchanged. There were some conflicts where we had changed something compared with LuaJIT upstream but I resolved all of those in favor of keeping our code the same. (If we actually don't want changes then we can push reverts later.)
Here is a Hydra run showing that the performance impact of the new LuaJIT changes from upstream is neutral: https://hydra.snabb.co/build/1077739/download/2/report.html. Have to get Hydra automatically testing PRs! |
I like the concept. Would you like it merged to kbara-next? |
@kbara Thanks but I have merged it directly onto the Just thinking it will be easier if over time the branches become more topic-specific (e.g. LuaJIT) and reviewers work in smaller groups with common subject matter interest (e.g. luajit, aarch64, etc.) This way we won't spread the Feeling the way along as always... shout if I mess up! |
Sounds good! |
Add missing cltable include
Here is an unusual PR :-) 2,125 commits!
There are two merge commits here that each do something related:
v2.1
branch. These are squashed into a single commit (736cc36) as we have done in the past.v2.1
branch is represented in the Snabb repo under thelib/luajit/
subtree.So why import the history? This is so that we can work on LuaJIT within the Snabb source tree: make our own changes, pull changes from upstream, pull changes from new feature branches, etc. This does not work so well if we only have the squashed version of the history: we can't pull from multiple branches without them conflicting and rolling back each others' changes. More discussion over on #1109 (comment).
Have to look at the potential costs/benefits of increasing the size of our commit history, including individual LuaJIT changes in procedures like
git bisect
, potentially increasing the size of the repo on a fresh checkout, etc.Overall I would like to be able to hack on LuaJIT directly in the Snabb tree and have it covered by all of our usual workflows and CI tests and so on. I see our own workflows and infrastructure being much more powerful than what LuaJIT upstream offers at the moment. So I think it makes sense to develop our subtree as a first-class citizen and pull changes from all other branches of interest.
Feedback welcome!
Edit with more Git info
The upshot of having the complete history is that we should be able to pull changes from any branch of LuaJIT like this:
So for example we could pull in and CI-benchmark-torture experimental features like vmprofile (LuaJIT/LuaJIT#290), intrinsics (LuaJIT/LuaJIT#116), new garbage collectors that have been written by @corsix and @fsfod, and so on. If they are good we can merge them directly into Snabb. If other people are interested in our LuaJIT changes we/they can use
git subtree push
to push them out to a branch of a LuaJIT repo (i.e. separate from the Snabb code and repo.)