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 EEBD75C2EC5; Thu, 17 Aug 2023 17:30:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EEBD75C2EC5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692282610; bh=Ju84dfVM9/94ceF5oF0jehZWWI2WFZkIW95OyyH3zbM=; 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=lf6HvQ2VwaVJuelx7x9iK8MvFMUUekhZBTzQRJUXcHbMB58nhadu/h8ioFnr2d3Qq ThHxMzeECXWEyV8fBCZ9zBeavR5HMJy1nUU0nwpqliZRmjUVbe6ohUByjDpV3WS3Pb gDqc8Pwl4D48cVJ6gvZym83vsmRs2qbgcAn9bua0= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [95.163.41.78]) (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 136175C2EC5 for ; Thu, 17 Aug 2023 17:30:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 136175C2EC5 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1qWe0l-00DEiE-2I; Thu, 17 Aug 2023 17:30:08 +0300 Message-ID: Date: Thu, 17 Aug 2023 17:30:07 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Sergey Kaplun References: <37c2435a3529beb36c2e428f9c8e8b5c007c68e7.1691592488.git.skaplun@tarantool.org> <76c36c3b-fc98-4494-e275-f9a903fab61c@tarantool.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD93AA62145E837FE28E96D0DBF739299FC3DB55B78047F7EFC182A05F5380850404C228DA9ACA6FE270FC2B07E84599A74F2A39B15FEEDCA929CFD9785175BD9F72C7FBAC064355BAB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70A10A23A3B64B805EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063781BF90BB6B3E56078638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82CEABA6A5F894F5965D121748B9428C5117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC1F9C260F03842663A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B19F804269016115C9D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3AD0E433DBF1FBFA3302FCEF25BFAB345C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407978DA827A17800CE79F72382A8EA570EC2DBA43225CD8A89F616AD31D0D18CD5C35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5E3423BB3F6CD10C5964657BFCB1D9D5E9CA7FDC079330CF9F87CCE6106E1FC07E67D4AC08A07B9B0E753FA5741D1AD02CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34CC972AA0E2E780C4218185F5EA7D026AB0BB27867489BCC690BBB5129F7665041FC23B5EEDBF54581D7E09C32AA3244C28B9B7CBA01B318D3BF3DDF3DE159A9381560E2432555DBBBAD658CF5C8AB4025DA084F8E80FEBD3FFA33E6B6B2F82C47A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFRrmMqSMPxp2mbq8m8xfAg== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A7692C60D3886691E59BF2A39B15FEEDCA92D776CA2DFBE07C79EBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 17/19] MIPS64: Fix register allocation in assembly of HREF. 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: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, On 8/17/23 16:50, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the review! > > On 17.08.23, Sergey Bronnikov wrote: >> Hi, Sergey! >> >> >> Thanks for the patch! >> >> Test is passed after reverting the patch. >> >> >> On 8/9/23 18:36, Sergey Kaplun wrote: >>> From: Mike Pall >>> >>> Contributed by James Cowgill. >>> >>> (cherry-picked from commit 99cdfbf6a1e8856f64908072ef10443a7eab14f2) >>> >>> The issue is observed for the following merged IRs: >>> | p64 HREF 0001 "a" ; or other keys >>> | > p64 EQ 0002 [0x4002d0c528] ; nilnode >>> Sometimes, when we need to rematerialize a constant during evicting of >>> the register. So, the instruction related to constant rematerialization >>> is placed in the delay branch slot, which suppose to contain the loads >>> of trace exit number to the `$ra` register. The resulting assembly is >>> the following (for example): >>> | beq ra, r1, 0x400abee9b0 ->exit >>> | lui r1, 65531 ; delay slot without setting of the `ra` >>> This leading to the assertion failure during trace exit in >>> `lj_trace_exit()`, since a trace number is incorrect. >>> >>> This patch moves the constant register allocations above the main >>> instruction emitting code in `asm_href()`. >>> >>> Sergey Kaplun: >>> * added the description and the test for the problem >> Test is passed after reverting the patch. LuaJIT was built with and >> without GC64. > The test case is for MIPS, since the changes are only for MIPS too. > But in general it is good practise to test other arches too, for > observing any inconsistencies. Okey, LGTM now. >> >>