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 632296D6096; Tue, 7 Nov 2023 14:07:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 632296D6096 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1699355278; bh=k+Z/Ds+bdqxmfluKDuVUd6X22SdYsHhgQWUM3Tq3ENw=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=MVomefJBjDUTm4/hSXGwWYSwTQJU0ee1D5g2yp9UL/M/LNUkNL+nz6UUf7v96BrKK L47Ulj89naXcPyIgRLaMYAFA8VSdisQ4iX5wBtcQ4ntr8KOEX4IEefyNGA4VqlXwJO x0yEr619eZRudhPzVSHpdLDQxCkM+bMDi2JUSivE= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [95.163.41.96]) (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 820E96D6096 for ; Tue, 7 Nov 2023 14:07:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 820E96D6096 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1r0Jw2-00Ge8C-26; Tue, 07 Nov 2023 14:07:55 +0300 Date: Tue, 7 Nov 2023 11:05:50 +0000 To: Sergey Kaplun Message-ID: References: <20231107105418.18356-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231107105418.18356-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9DD83A8ACFE75317590AE4B9F68355E47A66D42917648982000894C459B0CD1B926EFCEC86D89DED66E9AF28B96982D5A4A43D7D8601D9D9223B53866B3CF53F4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EED5D2FAB4CEB1EDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637670E1B164B70895C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D853599E54E6EEB019DC2C6A40CFA7BDBF117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA9CEDA8D6C8C3B0531D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE367F1C1C3ABB44F3A6E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB861051D4BA689FC2E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F890A246B268E114E6D8C47C27EEC5E9FB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5687A5CBD4F6EF1C0E4402EBED8DD9FC5411A8D1EFCC30483F87CCE6106E1FC07E67D4AC08A07B9B065B78C30F681404DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFD3D00D82F1970CC0F2F5AC8AFAE0F938CC72173A0D1EBF61AAE731FB520E7BDE212E5196DFD6A13F2B33B16BC67043E016458B8E068B2F85A0DAB9E627CA999AA74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojoiosMWyUVReCNXNPjP7KeQ== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531263FD1CE6CE2D5CF8C16B6D271ABFF68DB6346839D2957A62326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] x64: Properly fix __call metamethod return dispatch. 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for the patch! LGTM as obvious, except the single nit regarding the commit message. On 07.11.23, Sergey Kaplun wrote: > From: Mike Pall > > Reported by Sergey Kaplun. > > (cherry-picked from commit d133d67c881f363f0b5584ebd21a965eb3435aa1) > > This patch is the follow-up for the commit > 1672bdc0ffbee9f32fadb6943909d6af7eb9a7b1 ("x64: Fix __call metamethod > return dispatch."). This patch uses the incorrect macro x64 (which is I don't get which one of the aforementioned patches is "this": *this* one fixing the issue, or *that* one, that doesn't. > undefined in dasm) instead of X64. `KBASE` (r15d) is still compared > against `BASE` (edx) instead of `KBASEa` (r15) against rdx. > > This patch fixes the typo, so the correct registers are chosen. Side note: I hope it definitely is, but we still have no tests for it. > > Sergey Kaplun: > * added the description for the problem > > Part of tarantool/tarantool#9145 > --- > > The test is omitted for the same reason as it was omitted in the 1672bdc > commit: it is too hard (or even impossible) to create the test case. > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-1110-x64-return-dispatch > Tarantool PR: https://github.com/tarantool/tarantool/pull/9335 > Relate issues and PRs: > * https://github.com/LuaJIT/LuaJIT/pull/636 > * https://github.com/LuaJIT/LuaJIT/issues/1110 > * https://github.com/tarantool/tarantool/issues/9145 > > src/vm_x86.dasc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc > index 9fa9a3f7..6a353796 100644 > --- a/src/vm_x86.dasc > +++ b/src/vm_x86.dasc > @@ -1451,7 +1451,7 @@ static void build_subroutines(BuildCtx *ctx) > | mov LFUNC:RB, [RA-8] > | add NARGS:RD, 1 > | // This is fragile. L->base must not move, KBASE must always be defined. > - |.if x64 > + |.if X64 Bonjour. > | cmp KBASEa, rdx // Continue with CALLT if flag set. > |.else > | cmp KBASE, BASE // Continue with CALLT if flag set. > -- > 2.42.0 > -- Best regards, IM