<HTML><BODY><div class="cl-rc6ij5b771"><div>Hi, Sergey!</div><div> </div><div>Thanks for the patch set! It LGTM.<br> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Best regards,</div><div>Evgeniy Temirgaleev</div></div></div><br><div class="mail-quote-collapse"><blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px"><span>From: Sergey Kaplun <<a href="mailto:skaplun@tarantool.org">skaplun@tarantool.org</a>><br>To: Sergey Bronnikov <<a href="mailto:sergeyb@tarantool.org">sergeyb@tarantool.org</a>>, Evgeniy Temirgaleev <<a href="mailto:e.temirgaleev@tarantool.org">e.temirgaleev@tarantool.org</a>><br>Cc: tarantool-patches@dev.tarantool.org, Sergey Kaplun <<a href="mailto:skaplun@tarantool.org">skaplun@tarantool.org</a>><br>Date: Saturday, May 30, 2026 7:04 PM +03:00</span><br> <div><div id=""><div class="cl-wtl6czaqt7"><div class="js-helper_mr_css_attr js-readmsg-msg_mr_css_attr"><div id="style_17801570850312098333_mr_css_attr"><div id="style_17801570850312098333_BODY_mr_css_attr">This patch set provides the various improvements to the FFI interface.<br>The first two patches add support for OSX calling conventions for<br>varargs functions and fix the JIT-compiled code for varargs functions on<br>macOS arm64. The next patch adds handling for HFA structures with an<br>array in them. The fourth patch adds many fixups for x64/arm64 calling<br>conventions. The last one patch is a follow-up to it to fix the macOS<br>regression introduced in the fourth patch.<br><br>Branch: <a href="https://github.com/tarantool/luajit/tree/skaplun/ffi-c-call-conventions">https://github.com/tarantool/luajit/tree/skaplun/ffi-c-call-conventions</a><br><br>Related issues:<br>* <a href="https://github.com/tarantool/tarantool/issues/12480">https://github.com/tarantool/tarantool/issues/12480</a><br>* <a href="https://github.com/tarantool/tarantool/issues/6097">https://github.com/tarantool/tarantool/issues/6097</a><br>* <a href="https://github.com/LuaJIT/LuaJIT/issues/205">https://github.com/LuaJIT/LuaJIT/issues/205</a><br>* <a href="https://github.com/LuaJIT/LuaJIT/issues/1357">https://github.com/LuaJIT/LuaJIT/issues/1357</a><br>* <a href="https://github.com/LuaJIT/LuaJIT/issues/1455">https://github.com/LuaJIT/LuaJIT/issues/1455</a><br><br>Mike Pall (5):<br>FFI: Unify stack setup for C calls in interpreter.<br>FFI/ARM64/OSX: Handle non-standard OSX C calling conventions.<br>ARM64: Fix pass-by-value struct calling conventions.<br>FFI: Various ABI and calling convention fixes.<br>FFI/MacOS: Fix calling convention for enums.<br><br>src/lj_asm_arm64.h | 75 +-<br>src/lj_ccall.c | 133 ++--<br>src/lj_ccall.h | 13 +-<br>src/lj_cparse.c | 9 +-<br>src/lj_crecord.c | 27 +<br>src/lj_ctype.h | 2 +-<br>src/vm_arm.dasc | 8 +-<br>src/vm_arm64.dasc | 8 +-<br>src/vm_mips.dasc | 1 -<br>src/vm_mips64.dasc | 1 -<br>src/vm_ppc.dasc | 3 +-<br>src/vm_x64.dasc | 8 +-<br>src/vm_x86.dasc | 22 +-<br>.../ffi-call-empty-struct.test.lua | 47 ++<br>test/tarantool-tests/ffi-ccall/CMakeLists.txt | 13 +-<br>test/tarantool-tests/ffi-ccall/libfficcall.c | 650 ++++++++++++++++++<br>.../ffi-vector-arguments.test.lua | 62 ++<br>.../gh-6097-arm64-osx-ffi-vararg.test.lua | 43 ++<br>...57-arm64-struct-array-pass-by-val.test.lua | 23 +<br>.../lj-1455-arm64-ffi-ccall-hfa.test.lua | 82 +++<br>.../lj-1455-bitfield0-a16.test.lua | 27 +<br>.../lj-1455-ffi-conventions.test.lua | 441 ++++++++++++<br>.../lj-205-arm64-osx-ffi-enum-arg.test.lua | 63 ++<br>.../lj-205-arm64-osx-ffi-small-arg.test.lua | 29 +<br>24 files changed, 1703 insertions(+), 87 deletions(-)<br>create mode 100644 test/tarantool-tests/ffi-call-empty-struct.test.lua<br>create mode 100644 test/tarantool-tests/ffi-vector-arguments.test.lua<br>create mode 100644 test/tarantool-tests/gh-6097-arm64-osx-ffi-vararg.test.lua<br>create mode 100644 test/tarantool-tests/lj-1357-arm64-struct-array-pass-by-val.test.lua<br>create mode 100644 test/tarantool-tests/lj-1455-arm64-ffi-ccall-hfa.test.lua<br>create mode 100644 test/tarantool-tests/lj-1455-bitfield0-a16.test.lua<br>create mode 100644 test/tarantool-tests/lj-1455-ffi-conventions.test.lua<br>create mode 100644 test/tarantool-tests/lj-205-arm64-osx-ffi-enum-arg.test.lua<br>create mode 100644 test/tarantool-tests/lj-205-arm64-osx-ffi-small-arg.test.lua<br><br>--<br>2.54.0</div></div></div></div></div></div></blockquote></div></div></BODY></HTML>