From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 873096EC42; Wed, 16 Sep 2026 13:16:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 873096EC42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1789553791; bh=mTpdpBhvl+FCuSqW+Peh7bYLJ6oq+/kUKbuGc7ctDJM=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=fEOPHBbfRqktuH1G41EbyJwCRPGlJoIXMxsfHaSYv0OLNdFvBCOBO4LKsa9/uJSoN M05FXBOLgeCL8thRHvVvVja9YHC6zJgxqH7KkSeBwVrAqjNXG4cuRBzwffwtRxrd2d lon3fRPV8mGZl3iaVmIsK8R0w7LR2wBNccEb33KQ= Received: from send57.i.mail.ru (send57.i.mail.ru [89.221.237.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id F2F196EC42 for ; Wed, 16 Sep 2026 13:16:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F2F196EC42 Received: by exim-smtp-759f5f99bf-k2766 with esmtpa (envelope-from ) id 1x6mgn-00000000Bcf-2qqc; Wed, 16 Sep 2026 13:16:30 +0300 Message-ID: <2176392c-e219-4ad5-b658-8a375bb23a4b@vk.team> Date: Wed, 16 Sep 2026 13:16:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sergey Bronnikov , Sergey Kaplun , Evgeniy Temirgaleev Cc: tarantool-patches@dev.tarantool.org References: <20260908174027.337233-1-m.elhimov@vk.team> <7ca96010-f094-4df5-9a80-fa28612417af@tarantool.org> Content-Language: en-US In-Reply-To: <7ca96010-f094-4df5-9a80-fa28612417af@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-618D5548: 871342AD49B9826A33594132A326AF8BD51DE7FF4A90E215C227EB178FE467DC093FB54D7AC7951C X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD964331FA9A592EAE90807CE87B91C25BEBB1A188FEC4753A1182A05F538085040950BF49A44203B833DE06ABAFEAF67051E18D3AC14F30BFE204AB7993BA4670B6B7995677FB1BAB6 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78BAADB77C21FF6F2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566562BCE9B9754B08E9A198EA227593B9C6155A0F85450AF5DAFBF9649DC1550928EEF46B7454FC60B9742502CCDD46D0D9E541A154B51D14B2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C339FCB531FA8CD46035872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-87b9d050: 1 X-C1DE0DAB: 0D63561A33F958A5C311ACC0597040E55002B1117B3ED6961E3EB06CD3E89EC9C89B063BDC7FAC35823CB91A9FED034534781492E4B8EEAD0AA277257C6A5E3DBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34C77DD89D51EBB774225B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6593FDD24D3849D6F146EFEACDE9D1F9D9255328E52376597396A6C3B71CDB04962A65254BF4E224492B8341EE9D5BE9A0ADBC388623A3EAA6DC84856A9291A24E80B2A4695A61A89C3C7CEAA0681F5848F4C41F94D744909CE9D6718F459EE2962AE54DA86D399E591103B389C0A9E82E8 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXOcIETfglQORZ0zpDET4Zrk3igikrdHlWO39lL/rqhtAsl0Q2O/NArY= X-Mailru-Sender: 689FA8AB762F73937C9FA53A4753B313EA7930459B85062D1760E80DD18B182504767AC3346707AE567B8845310477678B5D19FF33E2B21BC8157BDAF8912DC0981874AA068F0975204DA63403278206F52067E1A4DAC7CAC77752E0C033A69E3453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] dbg: fix mapping of FPMATHOP to string X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mikhail Elhimov via Tarantool-patches Reply-To: Mikhail Elhimov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review! Please, see patchset with corrections in separate thread. On 15.09.2026 13:39, Sergey Bronnikov wrote: > Hi, Mikhail, > > thanks for the patch! Please see my comments. > > Sergey > > On 9/8/26 20:40, Mikhail Elhimov wrote: >> Closes tarantool/tarantool#13159 > it is desired to add a description for the changes (why `exp2` was > removed etc.) Done >> --- >> Branch: >> https://github.com/tarantool/luajit/tree/elhimov/gh-13159-fix-fpmathop-mapping >> Related issue: https://github.com/tarantool/tarantool/issues/13159 >> >>   src/luajit_dbg.py                             |  1 - >>   .../debug-extension-tests.py                  | 64 ++++++++++++++++++- >>   2 files changed, 63 insertions(+), 2 deletions(-) >> >> diff --git a/src/luajit_dbg.py b/src/luajit_dbg.py >> index 80057a4e..76001b7d 100644 >> --- a/src/luajit_dbg.py >> +++ b/src/luajit_dbg.py >> @@ -1722,7 +1722,6 @@ IRFPMS = [ >>       'ceil', >>       'trunc', >>       'sqrt', >> -    'exp2', >>       'log', >>       'log2', >>       'other' >> diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py >> b/test/tarantool-debugger-tests/debug-extension-tests.py >> index 895171a4..9989032b 100644 >> --- a/test/tarantool-debugger-tests/debug-extension-tests.py >> +++ b/test/tarantool-debugger-tests/debug-extension-tests.py >> @@ -688,6 +688,58 @@ class TestLJIRFloadAbs(TestCaseBase): >>       ) >>     +class TestLJIRFPMathOpBase(TestCaseBase): >> +    location = 'lj_cf_print' >> +    extension_cmds = ( >> +        'n\n'  # Load L. >> +        'lj-trace ' + '&((GG_State *)L)->J->cur' >> +    ) >> + >> +    @classmethod >> +    def setUpClass(cls): >> +        cls.lua_script = ( >> +            'jit.opt.start("hotloop=1")\n' >> +            'local function trace(a)\n' >> +            '  local x = {}\n' >> +            '  return x\n' >> +            'end\n' >> +            'trace(1)\n' >> +            'trace(1)\n' >> +            'print()\n' >> +        ).format(cls.lua_expr) >> +        cls.pattern = r'num FPMATH .* ref: ' + RX_IRN + r' lit: ' + >> cls.op >> +        super(TestLJIRFPMathOpBase, cls).setUpClass() >> + >> + >> +@unittest.skipIf(machine in ('arm64', 'aarch64'), >> +                 "not used as there is no corresponding hardware >> instruction") >> +class TestLJIRFPMathFloor(TestLJIRFPMathOpBase): >> +    lua_expr = 'math.floor(a)' >> +    op = 'floor' >> + >> + >> +@unittest.skipIf(machine in ('arm64', 'aarch64'), >> +                 "not used as there is no corresponding hardware >> instruction") >> +class TestLJIRFPMathCeil(TestLJIRFPMathOpBase): >> +    lua_expr = 'math.ceil(a)' >> +    op = 'ceil' >> + >> + >> +class TestLJIRFPMathSqrt(TestLJIRFPMathOpBase): >> +    lua_expr = 'math.sqrt(a)' >> +    op = 'sqrt' >> + >> + >> +class TestLJIRFPMathLog(TestLJIRFPMathOpBase): >> +    lua_expr = 'math.log(a)' >> +    op = 'log' >> + > > Usually we add a patch with fix for the problem and a test that covers > a problem. > > I propose leave a testcase TestLJIRFPMathLog and move other testcases > to a separate commit. > Done. Tests for floor/ceil/sqrt are added as separate commit (see the mentioned patchset in separate thread) >> + >> +class TestLJIRFPMathLog2(TestLJIRFPMathOpBase): >> +    lua_expr = 'math.log(a, 3)' >> +    op = 'log2' >> + >> + >>   # XXX: Implemented only for GC64 in LuaJIT until backporting the >>   # corresponding commit. >>   if IS_GC64: >> @@ -1051,7 +1103,17 @@ class TestLJCTypeBase(TestCaseBase): >>       pattern = r'\[\d+\] ' >>     -for test_cls in TestCaseBase.__subclasses__(): >> +def get_leaf_subclasses(cls): >> +    subclasses = cls.__subclasses__() >> +    if not subclasses: >> +        yield cls >> +    else: >> +        for sub in subclasses: >> +            for leaf in get_leaf_subclasses(sub): >> +                yield leaf >> + >> + >> +for test_cls in get_leaf_subclasses(TestCaseBase): >>       test_cls.test = lambda self: self.check() >>     if __name__ == '__main__': -- Best regards, Mikhail Elhimov