Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit 00/19] Prerequisites for improve assertions
@ 2023-08-09 15:35 Sergey Kaplun via Tarantool-patches
  2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 01/19] MIPS: Use precise search for exit jump patching Sergey Kaplun via Tarantool-patches
                   ` (21 more replies)
  0 siblings, 22 replies; 97+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-08-09 15:35 UTC (permalink / raw)
  To: Igor Munkin, Sergey Bronnikov; +Cc: tarantool-patches

This patch-set contains all commits are necessary to avoid conflicts
during the backporting of 8ae5170c "Improve assertions" [1], that are
caused by outdating from the upstream.

This patch-set:
- includes several new ports (see patches 4-6, 8, 19) -- only
  description is added for such patches.
- fixes some MIPS misbehaviour (1, 3, 17) -- include tests (*), except
  the first one, since it depends on memory mapping.
- fixes non-Linux/macOS build (7)
- backportes patches, that was excluded or partially stripped before (10,
  14, 15)
- includes refactoring (2, 9, 18)
- fixes general bugs (16)
- fixes gcc 7.1 -Wimplicit-fallthrough warnings (11 - 13)

Note: that only patches 3, 16, 17 adds some new tests.
Other patches just provided description, and the patch 13 adds
-Wimplicit-fallthrough for GCC (>= 7.1) builds.

Patches are backported in the free order as far as they are unrelated
to each other.

(*) To run tests for mips64 in qemu:

Compile with the following command:

| make -j -f Makefile.original HOST_CC="gcc " \
|         CROSS=mips64el-unknown-linux-gnu- \
|         CCDEBUG=" -g -ggdb3" CFLAGS=" -O0" \
|         XCFLAGS=" -DLUA_USE_APICHECK -DLUA_USE_ASSERT "

Be avare, that mips64el-unknown-linux-gnu-gcc should provide n64 abi by
default.
Side note: installed on Gentoo with the following command
| crossdev -t mips64el --abis n64 --ex-gdb

And run the corresponding test (-g 7776 to use GDB server on 7776
port):
| LUA_PATH="src/?.lua;test/tarantool-tests/?.lua;test/tarantool-tests/?/init.lua;;" \
| LD_LIBRARY_PATH="/usr/lib/gcc/mips64el-unknown-linux-gnu/13/" \
|   qemu-mips64el  -g 7776 -L /usr/mips64el-unknown-linux-gnu/ \
|     src/luajit -jdump=ta test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua

If you want to connect to the running test from multiarch-gdb:
| mips64el-unknown-linux-gnu-gdb src/luajit
| (gdb) target remote 0.0.0.0:7776
| ...
| 0x000000400297fd00 in __start () from /usr/mips64el-unknown-linux-gnu/lib64/ld.so.1
| (gdb) c

[1]: https://github.com/LuaJIT/LuaJIT/commit/8ae5170c

Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-8825-mips-ppc-refactoring
PR: https://github.com/tarantool/tarantool/pull/8969
Related Issues:
* https://github.com/tarantool/tarantool/issues/8825
* https://github.com/LuaJIT/LuaJIT/pull/362
* https://github.com/LuaJIT/LuaJIT/issues/812

Mike Pall (17):
  MIPS: Use precise search for exit jump patching.
  MIPS: Fix handling of spare long-range jump slots.
  MIPS64: Add soft-float support to JIT compiler backend.
  PPC: Add soft-float support to interpreter.
  PPC: Add soft-float support to JIT compiler backend.
  Windows: Add UWP support, part 1.
  FFI: Eliminate hardcoded string hashes.
  Cleanup math function compilation and fix inconsistencies.
  Fix GCC 7 -Wimplicit-fallthrough warnings.
  DynASM: Fix warning.
  ARM: Fix GCC 7 -Wimplicit-fallthrough warnings.
  Fix debug.getinfo() argument check.
  Fix LJ_MAX_JSLOTS assertion in rec_check_slots().
  Prevent integer overflow while parsing long strings.
  MIPS64: Fix register allocation in assembly of HREF.
  DynASM/MIPS: Fix shadowed variable.
  MIPS: Add MIPS64 R6 port.

Sergey Kaplun (2):
  test: introduce mcode generator for tests
  build: fix non-Linux/macOS builds

 cmake/SetDynASMFlags.cmake                    |    5 +
 cmake/SetTargetFlags.cmake                    |    6 +
 doc/ext_ffi_api.html                          |    2 +
 dynasm/dasm_arm.h                             |    2 +
 dynasm/dasm_arm64.h                           |    1 +
 dynasm/dasm_mips.h                            |   14 +-
 dynasm/dasm_mips.lua                          |  629 ++++++---
 dynasm/dasm_ppc.h                             |    1 +
 dynasm/dasm_x86.h                             |   18 +-
 dynasm/dynasm.lua                             |    1 +
 src/Makefile.original                         |    3 +
 src/host/buildvm_asm.c                        |    2 +-
 src/jit/bcsave.lua                            |   84 +-
 src/jit/dis_mips.lua                          |  293 +++-
 src/jit/dis_mips64r6.lua                      |   17 +
 src/jit/dis_mips64r6el.lua                    |   17 +
 src/lib_ffi.c                                 |   36 +-
 src/lib_io.c                                  |    4 +-
 src/lib_misc.c                                |   16 +-
 src/lib_package.c                             |   24 +-
 src/lj_alloc.c                                |    6 +-
 src/lj_arch.h                                 |   80 +-
 src/lj_asm.c                                  |   19 +-
 src/lj_asm_arm.h                              |    4 +-
 src/lj_asm_mips.h                             |  379 ++++-
 src/lj_asm_ppc.h                              |  322 ++++-
 src/lj_ccall.c                                |   38 +-
 src/lj_ccall.h                                |    4 +-
 src/lj_ccallback.c                            |   34 +-
 src/lj_clib.c                                 |   20 +-
 src/lj_cparse.c                               |   87 +-
 src/lj_cparse.h                               |    2 +
 src/lj_crecord.c                              |    4 +-
 src/lj_debug.c                                |   16 +-
 src/lj_emit_mips.h                            |   17 +-
 src/lj_err.c                                  |    1 +
 src/lj_ffrecord.c                             |    2 +-
 src/lj_frame.h                                |    2 +-
 src/lj_ircall.h                               |   45 +-
 src/lj_iropt.h                                |    2 +-
 src/lj_jit.h                                  |   18 +-
 src/lj_lex.c                                  |    2 +-
 src/lj_mcode.c                                |   14 +-
 src/lj_obj.h                                  |    3 +
 src/lj_opt_sink.c                             |    2 +-
 src/lj_opt_split.c                            |    2 +-
 src/lj_parse.c                                |    3 +-
 src/lj_profile_timer.c                        |    8 +-
 src/lj_profile_timer.h                        |    8 +-
 src/lj_record.c                               |    4 +-
 src/lj_snap.c                                 |   21 +-
 src/lj_target_mips.h                          |   52 +-
 src/luajit.c                                  |    1 +
 src/vm_mips64.dasc                            |  413 +++++-
 src/vm_ppc.dasc                               | 1249 ++++++++++++++---
 ...x-mips64-spare-side-exit-patching.test.lua |   65 +
 ...8-fix-side-exit-patching-on-arm64.test.lua |   78 +-
 ...-mips64-href-delay-slot-side-exit.test.lua |  101 ++
 .../lj-812-too-long-string-separator.test.lua |   31 +
 test/tarantool-tests/utils/frontend.lua       |   24 +
 test/tarantool-tests/utils/jit/generators.lua |  115 ++
 61 files changed, 3565 insertions(+), 908 deletions(-)
 create mode 100644 src/jit/dis_mips64r6.lua
 create mode 100644 src/jit/dis_mips64r6el.lua
 create mode 100644 test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua
 create mode 100644 test/tarantool-tests/lj-362-mips64-href-delay-slot-side-exit.test.lua
 create mode 100644 test/tarantool-tests/lj-812-too-long-string-separator.test.lua
 create mode 100644 test/tarantool-tests/utils/jit/generators.lua

-- 
2.41.0


^ permalink raw reply	[flat|nested] 97+ messages in thread

end of thread, other threads:[~2023-08-31 15:35 UTC | newest]

Thread overview: 97+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 15:35 [Tarantool-patches] [PATCH luajit 00/19] Prerequisites for improve assertions Sergey Kaplun via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 01/19] MIPS: Use precise search for exit jump patching Sergey Kaplun via Tarantool-patches
2023-08-15  9:36   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 12:40     ` Sergey Kaplun via Tarantool-patches
2023-08-16 13:25   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 02/19] test: introduce mcode generator for tests Sergey Kaplun via Tarantool-patches
2023-08-15 10:14   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 12:55     ` Sergey Kaplun via Tarantool-patches
2023-08-16 13:06       ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 14:32   ` Sergey Bronnikov via Tarantool-patches
2023-08-16 15:20     ` Sergey Kaplun via Tarantool-patches
2023-08-16 16:08       ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 03/19] MIPS: Fix handling of spare long-range jump slots Sergey Kaplun via Tarantool-patches
2023-08-15 11:13   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:05     ` Sergey Kaplun via Tarantool-patches
2023-08-16 15:02   ` Sergey Bronnikov via Tarantool-patches
2023-08-16 15:32     ` Sergey Kaplun via Tarantool-patches
2023-08-16 16:08       ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 04/19] MIPS64: Add soft-float support to JIT compiler backend Sergey Kaplun via Tarantool-patches
2023-08-15 11:27   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:10     ` Sergey Kaplun via Tarantool-patches
2023-08-16 16:07   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 05/19] PPC: Add soft-float support to interpreter Sergey Kaplun via Tarantool-patches
2023-08-15 11:40   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:13     ` Sergey Kaplun via Tarantool-patches
2023-08-17 14:53   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 06/19] PPC: Add soft-float support to JIT compiler backend Sergey Kaplun via Tarantool-patches
2023-08-15 11:46   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:21     ` Sergey Kaplun via Tarantool-patches
2023-08-17 14:33   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 07/19] build: fix non-Linux/macOS builds Sergey Kaplun via Tarantool-patches
2023-08-15 11:58   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:40     ` Sergey Kaplun via Tarantool-patches
2023-08-17 14:31   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 08/19] Windows: Add UWP support, part 1 Sergey Kaplun via Tarantool-patches
2023-08-15 12:09   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:50     ` Sergey Kaplun via Tarantool-patches
2023-08-16 16:40   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 09/19] FFI: Eliminate hardcoded string hashes Sergey Kaplun via Tarantool-patches
2023-08-15 13:07   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:52     ` Sergey Kaplun via Tarantool-patches
2023-08-16 17:04     ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:35 ` [Tarantool-patches] [PATCH luajit 10/19] Cleanup math function compilation and fix inconsistencies Sergey Kaplun via Tarantool-patches
2023-08-11  8:06   ` Sergey Kaplun via Tarantool-patches
2023-08-15 13:10   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 17:15   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 11/19] Fix GCC 7 -Wimplicit-fallthrough warnings Sergey Kaplun via Tarantool-patches
2023-08-15 13:17   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 13:59     ` Sergey Kaplun via Tarantool-patches
2023-08-17  7:37   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 12/19] DynASM: Fix warning Sergey Kaplun via Tarantool-patches
2023-08-15 13:21   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 14:01     ` Sergey Kaplun via Tarantool-patches
2023-08-17  7:39   ` Sergey Bronnikov via Tarantool-patches
2023-08-17  7:51     ` Sergey Bronnikov via Tarantool-patches
2023-08-17  7:58       ` Sergey Kaplun via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 13/19] ARM: Fix GCC 7 -Wimplicit-fallthrough warnings Sergey Kaplun via Tarantool-patches
2023-08-15 13:25   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 14:08     ` Sergey Kaplun via Tarantool-patches
2023-08-17  7:44   ` Sergey Bronnikov via Tarantool-patches
2023-08-17  8:01     ` Sergey Kaplun via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 14/19] Fix debug.getinfo() argument check Sergey Kaplun via Tarantool-patches
2023-08-15 13:35   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 14:20     ` Sergey Kaplun via Tarantool-patches
2023-08-16 20:13       ` Maxim Kokryashkin via Tarantool-patches
2023-08-17  8:29   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 15/19] Fix LJ_MAX_JSLOTS assertion in rec_check_slots() Sergey Kaplun via Tarantool-patches
2023-08-15 14:07   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 14:22     ` Sergey Kaplun via Tarantool-patches
2023-08-17  8:57   ` Sergey Bronnikov via Tarantool-patches
2023-08-17  8:57     ` Sergey Kaplun via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 16/19] Prevent integer overflow while parsing long strings Sergey Kaplun via Tarantool-patches
2023-08-15 14:38   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 14:52     ` Sergey Kaplun via Tarantool-patches
2023-08-17 10:53   ` Sergey Bronnikov via Tarantool-patches
2023-08-17 13:57     ` Sergey Kaplun via Tarantool-patches
2023-08-17 14:28       ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 17/19] MIPS64: Fix register allocation in assembly of HREF Sergey Kaplun via Tarantool-patches
2023-08-16  9:01   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 15:17     ` Sergey Kaplun via Tarantool-patches
2023-08-16 20:14       ` Maxim Kokryashkin via Tarantool-patches
2023-08-17 11:06   ` Sergey Bronnikov via Tarantool-patches
2023-08-17 13:50     ` Sergey Kaplun via Tarantool-patches
2023-08-17 14:30       ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 18/19] DynASM/MIPS: Fix shadowed variable Sergey Kaplun via Tarantool-patches
2023-08-16  9:03   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 15:22     ` Sergey Kaplun via Tarantool-patches
2023-08-17 12:01   ` Sergey Bronnikov via Tarantool-patches
2023-08-09 15:36 ` [Tarantool-patches] [PATCH luajit 19/19] MIPS: Add MIPS64 R6 port Sergey Kaplun via Tarantool-patches
2023-08-16  9:16   ` Maxim Kokryashkin via Tarantool-patches
2023-08-16 15:24     ` Sergey Kaplun via Tarantool-patches
2023-08-17 13:03   ` Sergey Bronnikov via Tarantool-patches
2023-08-17 13:59     ` Sergey Kaplun via Tarantool-patches
2023-08-16 15:35 ` [Tarantool-patches] [PATCH luajit 00/19] Prerequisites for improve assertions Sergey Kaplun via Tarantool-patches
2023-08-17 14:06   ` Maxim Kokryashkin via Tarantool-patches
2023-08-17 14:38 ` Sergey Bronnikov via Tarantool-patches
2023-08-31 15:17 ` Igor Munkin via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox