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 94E0F1510520; Wed, 27 Aug 2025 12:07:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 94E0F1510520 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1756285667; bh=ATuNCReiLUVY8RD62lHs3xuPOS8kDOLX23t2bickR8M=; 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=cqn3Wq/NHiJjbIJ+EkKWBe2BPwhps+S/93eVirh1YDcut95hb0hfJVZ59k/VK773t 2TPl7J9nvUy3IXcjYiqYTrsN6/QPpOKG0Etu7ZpWnagUVX2/5uNczsVOggBTNinnWo B/RcOXDsWxbFt1rayah17yt8AKk45oQWqqHw1r3c= Received: from send196.i.mail.ru (send196.i.mail.ru [95.163.59.35]) (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 7849F254C7F for ; Wed, 27 Aug 2025 12:07:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7849F254C7F Received: by exim-smtp-6944cbb85b-vng8w with esmtpa (envelope-from ) id 1urC89-000000006Ki-1f29; Wed, 27 Aug 2025 12:07:45 +0300 Date: Wed, 27 Aug 2025 12:08:27 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <0183aa1f346bf87d8e626274323c87e2291e75bf.1753344905.git.skaplun@tarantool.org> <73234419-5e68-45cb-ac13-da2b103ee26e@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73234419-5e68-45cb-ac13-da2b103ee26e@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9771EFB8797C310D1D30A345599E830D57F491595A94C6D7D182A05F5380850404C228DA9ACA6FE2787A0FEF4178CA2A53DE06ABAFEAF6705928969B80E975E617FA05EFE8FEFC771021035654F677716 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75C385DEB91CEC222EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566B0A081E0BBE08647B5FC53A71462BEBA83F5748E12EC3C77EC24D5C4923CBB80389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D52CD31C43BF465FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE74F0F518E68DBD4F843847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A57A7BABB2783BBB015002B1117B3ED69687F0EFBD69378B24559C6C5561145D6F823CB91A9FED034534781492E4B8EEADB05233B9BC4759D3 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D349FD10E01B3CDC9E2FCA036BB2ADCFB39F9585733E67C6FF8FA790F4C7ADF82C158C72FB4C196CE8A1D7E09C32AA3244C14E9E944486BA60277DD89D51EBB774201CEE2626901CC65EA455F16B58544A2E30DDF7C44BCB90DA5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVXNcwk+fZooKZB7ee4buQss= X-DA7885C5: 9A01790E4B204A67F255D290C0D534F9E64F2128D9F26159A23C282F69FD27E4E21D998C0621A2555B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393FE9E42A757851DB6E989A9A9274358A1833A35EE94659F23AF8F2E4F0F34EED8E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/3] ARM64: More improvements to the generation of immediates. 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review! Please consider my answers below. On 25.08.25, Sergey Bronnikov wrote: > Hi, Sergey! > > thanks for the patch! > > In general LGTM, I would suggest fixing the description in commit message. > > See below. > > Sergey > > On 7/24/25 12:03, Sergey Kaplun wrote: > > From: Mike Pall > > > > (cherry picked from commit 69138082a3166105faa8cbb25fadb1e4298686c0) > > > > This patch refactors the emitting of immediates for the arm64 > > architecture. The main changes are the following: > > * Use `emit_getgl()`, `emit_setgl()` instead of `emit_lso()`, where it > > is possible, since it makes the code cleaner. > > * The `RID_GL` is allocated for `g` at the start of the trace emitting. > > Also, this register is considered as a candidate to be used as a base > > for the N-step offset in `emit_kdelta()`. > > * The address of `tmptv` is not rematerialized to the register from the > > constant not. It is calculated via the adding the corresponding This "not" looks excessive. Rewritten as the following: | * The address of `tmptv` is not rematerialized to the register from the | constant. It is calculated via the adding the corresponding offset to | `RID_GL`. > > offset to `RID_GL`. > it is not clear for me what for hunks with `emit_dm` are needed. | emit_dm(as, ins, d, m); Means emit the ins with values to the D and M instruction fields as registers `d`, `m` respectively. In the case of this patch, it emits simply: | mov rd, rm Where `rd` is the register associated with `ASM_REF_TMP1` (`REF_TRUE`) and `rm` is `RID_GL`. So this is simply moving the value of `g` from the `RID_GL` register to the register, which will be an argument for the C function call like `lj_gc_step_jit()`. Move is used instead of the constant value loading. > > -- Best regards, Sergey Kaplun