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 D46696EC40; Thu, 19 Aug 2021 00:16:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D46696EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629321400; bh=u0g7jnKPGrACqEgMLtEIUAaWWFrbw4iX026DbtZY6g0=; 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=Jg9tYSPtSAQiEjYN4C+1qE2tvBjhXcPVAOtDJzoV4Umz5uT1mebpdoco1oUDrIjRT sKUDaaWz5r8KblAPi30pqBu3BQGhrScRSAUjqQl2O38gV9JVnv0c9y4GvVdifh4LAb GU92Bd91EPm/ubcs+8N2+zONYLXqqT5oCWlF0SAo= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 49F436EC40 for ; Thu, 19 Aug 2021 00:16:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 49F436EC40 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mGSvM-0005Et-Kt; Thu, 19 Aug 2021 00:16:37 +0300 Date: Wed, 18 Aug 2021 23:51:26 +0300 To: Sergey Kaplun , Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org Message-ID: <20210818205126.GJ5743@tarantool.org> References: <3c9433a3166bcc2396efb01e89261dea370bd5c1.1629315033.git.imun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3c9433a3166bcc2396efb01e89261dea370bd5c1.1629315033.git.imun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD9BCE6B93DE0C6C3914462CDB1732D383C182A05F5380850403F924B7F593903E324B31EAE9C75D4DF6B15389063739773572681F92EF46BA9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F2919D563845004AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C1CDCB5E4A85220F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8BFC78CCBC9CC21292DBE718BFFC91AF0117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BF1175FABE1C0F9B6A471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CDDB9BF3B882869D543847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5593EA984C964ADFD2862EDC8172A4B4DB628B167E3E756D2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75C29D03FC76C37677410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D342F9EE325F82A28A81C1B467BB07EDD9F2A67521513A3DD34D0D3AD4664FEB15AD59ACCFF075A7E801D7E09C32AA3244CBA2CB4D45E6BDC6CF7DAE99B51AF0884BBA718C7E6A9E042927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGSxK+6r6oBFxON8xygAMEg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D0DCDBC85FA9E972C0025541873B4A927A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] ARM64: Fix exit stub patching. 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Found several typos after sending the patch. Fixed and force-pushed the changes to the branch. On 18.08.21, Igor Munkin wrote: > From: Mike Pall > > Contributed by Javier Guerra Giraldez. > > (cherry picked from commit 9da06535092d6d9dec442641a26c64bce5574322) > > When the side trace is assembled, it is linked to its parent trace. For > this purpose, JIT runs through the parent trace mcode and updates jump > instruction targeted to the corresponding exitno. Prior to this patch, > these instructions were patched unconditionally, that leads to errors if > the jump target address is out of the value ranges specified in ARM64 > references[1][2][3][4][5][6]. > > As a result of the patch considers value ranges of > the jump targets and updates directly only those instructions fitting > the particular jump range. Moreover, the corresponding jump in the pad > leading to is also patched, so those instructions, > that are not updated before, targets to the linked side trace too. > > Additionaly, there is some refactoring of jump targets assembling in Typo fixed: s/Additionaly/Additionally/. > scope of this patch. > > Igor Munkin: > * added the description and the test for the problem > > [1]: https://developer.arm.com/documentation/dui0801/g/A64-General-Instructions/B > [2]: https://developer.arm.com/documentation/dui0801/g/A64-General-Instructions/B-cond > [3]: https://developer.arm.com/documentation/dui0801/g/A64-General-Instructions/CBZ > [4]: https://developer.arm.com/documentation/dui0801/g/A64-General-Instructions/CBNZ > [5]: https://developer.arm.com/documentation/dui0801/g/A64-General-Instructions/TBZ > [6]: https://developer.arm.com/documentation/dui0801/g/A64-General-Instructions/TBNZ > > Resoves tarantool/tarantool#6098 Typo fixed: s/Resoves/Resolves/. > Part of tarantool/tarantool#5629 > > Signed-off-by: Igor Munkin > --- > > Issue: https://github.com/tarantool/tarantool/issues/6098 > Branch: https://github.com/tarantool/luajit/tree/imun/gh-6098-fix-luajit-tests-suite-failures > CI: https://github.com/tarantool/tarantool/commit/67f92d2 > Related PR in LuaJIT repo: https://github.com/LuaJIT/LuaJIT/pull/429 > > diff --git a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua > new file mode 100644 > index 00000000..05e8904c > --- /dev/null > +++ b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua > @@ -0,0 +1,129 @@ > +for i = 1, FUNCS do > + -- XXX: FNEW is NYI, hence loop recording fails at this point. > + -- The recording is aborted on purpose: we are going to record > + -- number of traces for functions in . > + -- Otherwise, loop recording might lead to a very long trace > + -- error (via return to a lower frame), or a trace with lots of > + -- side traces. We need neither of this, but just bunch of > + -- traces filling the avaiable mcode area. ================================================================================ diff --git a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua index 05e8904c..4dcf3e22 100644 --- a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua +++ b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua @@ -82,7 +82,7 @@ for i = 1, FUNCS do -- Otherwise, loop recording might lead to a very long trace -- error (via return to a lower frame), or a trace with lots of -- side traces. We need neither of this, but just bunch of - -- traces filling the avaiable mcode area. + -- traces filling the available mcode area. local function tnew(p) return { a = p + 1, f = p + 6, k = p + 11, p = p + 16, u = p + 21, z = p + 26, ================================================================================ > + local function tnew(p) > -- > 2.25.0 > -- Best regards, IM