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 E8C315B18F7; Wed, 16 Aug 2023 16:26:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E8C315B18F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692192377; bh=0h8Y5jC28T/HfpvudOqrMaUB76A6fPIxH3SU7owfLZg=; 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=at0cVlrUhgp2UWtSnywIIR1HJJxkTBOl1ZeSYht8q5oCb53C/1vrzxMIcz9uuHyod 8d6LbkXeKitoJFfg5Gja/aO00+9bnVYTh147tjUrkLeNK511hOPzGFn1iy+6VRPf2n fK69qTSWzbSu8+cenvO5yXByTqadKujzVvu2qyEc= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 E7FFB532601 for ; Wed, 16 Aug 2023 16:26:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E7FFB532601 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qWGXD-0001rl-0M; Wed, 16 Aug 2023 16:26:03 +0300 Date: Wed, 16 Aug 2023 16:21:15 +0300 To: Maxim Kokryashkin Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9700E0DCE2907754D1F9D5B7CD6B34A186ED0A35A424B74BD182A05F53808504091DF15FDC659F1FBC268C578A85CCE2DC50D213BB917571927CB8ED0BBDD26C3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CF4D16325FBE1EEDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378B6D775AC58C227F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8E8D250898ADBC61F0C363BB26F65361C117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCE1488AC3D4DED311A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BAE9A1BBD95851C5BAAAE862A0553A39223F8577A6DFFEA7C741622C43FECC0DC43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5ACD3C863BD1F08F697B6EA7DC1A5A4FBEAF0B08A1BD6E2FEF87CCE6106E1FC07E67D4AC08A07B9B0F254576263B31EA9CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF5839FD83B0A9C50E44AA0A8CD76C1351CF1901FAC69667E86CA054D47CDA0DF506ED036F265C54224F7434E9608BF9F454C73A233CD241CA55BDEC1873F78A6A74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVl7ekwB6hiUHVsYTF/e0w== X-DA7885C5: 94C192FA7AEAAAFE2EB3EFF9884A3B2C597D1AAC0D1A44A7D8CF4733B7BFB48F262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986BC3782388E550A40C5BC5C23670531E880FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 06/19] PPC: Add soft-float support to JIT compiler backend. 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maxim! Thanks for the review! See my answers below. On 15.08.23, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM, except for a few typos and a single question below. > On Wed, Aug 09, 2023 at 06:35:55PM +0300, Sergey Kaplun via Tarantool-patches wrote: > > From: Mike Pall > > > > Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. > > Sponsored by Cisco Systems, Inc. > > > > (cherry-picked from commit 71b7bc88341945f13f3951e2bb5fd247b639ff7a) > > > > The software floating point library is used on machines which do not > > have hardware support for floating point [1]. This patch enables > > support for such machines in the JIT compiler for powerpc. > Typo: s/powerpc/PowerPC/ Fixed, thanks! > > This includes: > > * All fp-depending paths are instrumented with `LJ_SOFTFP` macro. > Typo: s/fp-depending/fp-dependent/ Fixed. > > * `asm_sfpmin_max()` is introduced for min/max operations on soft-float > > point. > > * `asm_sfpcomp()` is introduced for soft-float point comparisons. > > > > [1]: https://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html > > > > Sergey Kaplun: > > * added the description for the feature > > > > Part of tarantool/tarantool#8825 > > --- > > +#if LJ_SOFTFP > > + case IR_SLOAD: case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: > > + case IR_STRTO: > Why are those fp-dependent? Should we write an explanation? I supposed, that is used lo for possible half of a fp value. Also, there is no need to use it on hard-float machines. I suppose, that the comment as is is OK. Same for the stores. > > + if (!uselo) > > + ra_allocref(as, ir->op1, RSET_GPR); /* Mark lo op as used. */ > > + break; > > +#endif > > case IR_CALLN: > > + case IR_CALLS: > > case IR_CALLXS: > > if (!uselo) > > ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ > > break; > > +#if LJ_SOFTFP > > + case IR_ASTORE: case IR_HSTORE: case IR_USTORE: case IR_TOSTR: > > +#endif > > case IR_CNEWI: > > /* Nothing to do here. Handled by lo op itself. */ > > break; > > @@ -1800,8 +2019,19 @@ static void asm_stack_restore(ASMState *as, SnapShot *snap) > > if ((sn & SNAP_NORESTORE)) > > continue; > > if (irt_isnum(ir->t)) { > > -- Best regards, Sergey Kaplun