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 E51DCE3CD9F; Tue, 14 Jan 2025 14:07:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E51DCE3CD9F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1736852859; bh=Srid1T8NDqkca42uVpPz534/SkCwS/h3vn84c3HvftI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=aA26dX054VABFUogdb9Olgk9hXq1EhwvRBkt3cv4SYLP5mOMNxiqi/MS7P2XNMNhL 41qlpi8nMVdElC9N/AMVDoc3jxDMx+dhcbV80VNXr764CIf74vkR+iQkGcFjhoYHgj Msp/rvglWolwjLBGLwKh6yYsSXagS4EsQhH59DWE= Received: from send175.i.mail.ru (send175.i.mail.ru [95.163.59.14]) (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 3F33756C77E for ; Tue, 14 Jan 2025 14:07:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3F33756C77E Received: by exim-smtp-6758d5575c-qs8cl with esmtpa (envelope-from ) id 1tXelk-000000008OQ-1NBR; Tue, 14 Jan 2025 14:07:36 +0300 To: Sergey Bronnikov Date: Tue, 14 Jan 2025 14:06:56 +0300 Message-ID: X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9FE29E411368906F797F5421AD5CD452F645B5AF9C0CCF0FC182A05F5380850404C228DA9ACA6FE27401EECE9C5975BCA3DE06ABAFEAF6705DDB8D70B705C9416E24AC13F99428A998E7CFC23E8784A43 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76A312A092B0E1E4AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A85D247F7B1E5F958638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8BF8281FCFCCFAC805DE49839B6C0DB75F6DA69C1183DF7D4CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F3E38EE449E3E2AE389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC821E93C0F2A571C7BF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BB07C9E286C61B7F975ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5A113F8F83EFB8C775002B1117B3ED6966181143AC9919C9BBFF4097FFC9E796F823CB91A9FED034534781492E4B8EEAD27E9584FBD6BDD31C79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF77DD89D51EBB7742D3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFCEC095EF0FC747568BAD2F7846D4503A4E643C97A85A8AE1514A359FE52A8B1BEBD4E4314DA7806569A713A3E5A0090D57D426AD821F71D3FB9820D6A1E32F59DB6748B72A65B9C15F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj7YQzuqfQVvz4xsheR8LEbg== X-DA7885C5: 479CF053360E07C2F255D290C0D534F973DC1D150D68451BE5C0197873B8559000AE597BA68905385B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F739381B31377CF4CA219F595BC79E03710C81C9CFEB810537B57B30C245DBB372909E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 0/2] Refactoring and FMA optimizations 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" The first commit in the patchset helps to avoid conflicts during the backporting of the second patch, which fixes the ARM64 behaviour for FMA optimization. Since the first patch is just a refactoring, it may be easily applied too. Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-918-fma-optimization Related issues: * https://github.com/LuaJIT/LuaJIT/issues/24 * https://github.com/LuaJIT/LuaJIT/issues/918 * https://github.com/tarantool/tarantool/issues/10709 Mike Pall (2): Cleanup CPU detection and tuning for old CPUs. Disable FMA by default. Use -Ofma or jit.opt.start("+fma") to enable. doc/running.html | 8 ++ src/Makefile.original | 1 - src/lib_jit.c | 65 +++++------- src/lj_arch.h | 6 +- src/lj_asm_arm.h | 6 +- src/lj_asm_arm64.h | 3 +- src/lj_asm_ppc.h | 3 +- src/lj_asm_x86.h | 33 ++----- src/lj_dispatch.c | 7 -- src/lj_emit_x86.h | 5 +- src/lj_errmsg.h | 4 - src/lj_jit.h | 98 ++++++++++--------- src/lj_vmmath.c | 13 ++- src/ljamalg.c | 10 -- src/vm_arm64.dasc | 4 +- ...lj-918-fma-numerical-accuracy-jit.test.lua | 36 +++++++ .../lj-918-fma-numerical-accuracy.test.lua | 31 ++++++ .../lj-918-fma-optimization.test.lua | 25 +++++ 18 files changed, 214 insertions(+), 144 deletions(-) create mode 100644 test/tarantool-tests/lj-918-fma-numerical-accuracy-jit.test.lua create mode 100644 test/tarantool-tests/lj-918-fma-numerical-accuracy.test.lua create mode 100644 test/tarantool-tests/lj-918-fma-optimization.test.lua -- 2.47.1