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 F31A0A04CE1; Wed, 31 Jan 2024 18:15:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F31A0A04CE1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706714129; bh=DF9OnKDWPhbw8CU9wVSIZukwThsyJO5UhpixO+EOpfE=; 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=l/gAeSmmXpzyhJZy+GTg4o9aOohwfysxOIgYzJ+l1MrONOk1yllCMEkZjtbEK2GXh jTpmLgzbS6kNFRUlK5alv+DhoY5ZZrXlc2XsdFexyI5Sq43Dqocik8lLswdqNBnrqF cuEHKeuG+zT3qJ6ebL0VHMglt1bP0crPNHNMPht8= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [95.163.41.84]) (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 25BCBA04CD2 for ; Wed, 31 Jan 2024 18:15:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 25BCBA04CD2 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1rVCJC-00000009LU7-2FS6; Wed, 31 Jan 2024 18:15:26 +0300 Date: Wed, 31 Jan 2024 18:15:26 +0300 To: Sergey Kaplun Message-ID: References: <74105e936020489fdfe7f0f984d5fe7a7c95c6e2.1706520765.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74105e936020489fdfe7f0f984d5fe7a7c95c6e2.1706520765.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9A3FCF9DB4FFE09550EB071B8444FE4D3AAC905CB603E818C182A05F5380850407189014BDD9DF7A45D1BE6A8D71B10A5FABBC700006A8F12767353036DA14F9EF15FB00FF16E125F X-C1DE0DAB: 0D63561A33F958A57EE833F72215CE4A5002B1117B3ED696300B1C964510FE467E0012C66AE17B00823CB91A9FED034534781492E4B8EEAD01200A96CB7104FFBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF77DD89D51EBB7742D3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF7FEE23B04E389DA745228CC2374FC9C90F7E69C0C0A0380644A37B0A2260449F60849098BFF6585ABAF4CF3B87E910B146D4CA3AADFCAF59DC6005D7219D774B59E71A41E3E2F8705F4332CA8FE04980913E6812662D5F2A54F6898A6FDCBDC72A617DFBE5FEC2C6383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqJaWtPsRtynWARmKLY8XAQ== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE4073A743FAC8DA86077B951B70A5BD4BD8E06831A864AB707B981AE5054A97140B904C9FB44FCBCE9EE92D99EB8CC7091A7ECEABDC5717908DEF544888E8238EB4872D6B4FCE48DF648AE208404248635DF X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH v2 luajit 12/26] test: enable in LuaJIT-tests 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the patch! LGTM, except for the single minor comment below. On Mon, Jan 29, 2024 at 01:45:12PM +0300, Sergey Kaplun wrote: > This patch names all subtests and includes the test in . > > Part of tarantool/tarantool#9398 > --- > test/LuaJIT-tests/lib/ffi/ffi_jit_arith.lua | 22 ++++++++++----------- > test/LuaJIT-tests/lib/ffi/index | 1 + > 2 files changed, 12 insertions(+), 11 deletions(-) > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_jit_arith.lua b/test/LuaJIT-tests/lib/ffi/ffi_jit_arith.lua > index 0554fe60..efe83cfd 100644 > --- a/test/LuaJIT-tests/lib/ffi/ffi_jit_arith.lua > +++ b/test/LuaJIT-tests/lib/ffi/ffi_jit_arith.lua > @@ -1,6 +1,6 @@ > local ffi = require("ffi") > > -do > +do --- int64_t arithmetic > local a = ffi.new("int64_t[?]", 101) > for i=1,100 do a[i] = -2 end > for i=1,100 do a[i] = i end > @@ -29,7 +29,7 @@ do > assert(w == 5050) > end > > -do > +do --- uint64_t arithmetic > local a = ffi.new("uint64_t[?]", 101) > for i=1,100 do a[i] = i end > local x, y, m = 0ull, 0ull, 0ull > @@ -48,32 +48,32 @@ do > assert(z == 0x123456789abcdef0ull % 100) > end > > -do > +do --- bit operations LL > local x = 0ll > for i=1,100 do x = x + (-2ll) ^ (bit.band(i, 15)+1ll) end > assert(x == 262120) > end > > -do > +do --- bit operations LL, non-const base on trace > local x, a = 0ll, -2ll > for i=1,100 do x = x + a ^ (bit.band(i, 15)+1ll) end > assert(x == 262120) > end > > -do > +do --- bit operations ULL > local x = 0ull > for i=1,100 do x = x + (-2ll) ^ (bit.band(i, 15)+1ull) end > assert(x == 262120) > end > > -do > +do --- number vs. cdata interoperability > for i=1,200 do local j = bit.band(i, 7); assert((j == 0ll) == (j == 0)) end > for i=1,200 do assert((i < 100ll) == (i < 100)) end > for i=1,200 do assert((i <= 100ll) == (i <= 100)) end > for i=-100,100 do assert((i > 100ull) == (i < 0)) end > end > > -do > +do --- comparisons checksum > local a = ffi.new("int64_t[?]", 100) > for i=0,99 do > a[i] = math.random(0, 2^32)*0x100000000LL + math.random(0, 2^32) > @@ -121,13 +121,13 @@ do > end > end > > -do > +do --- pointer subtraction > local a, b = ffi.new("char *"), ffi.new("char *") > local z > for i=1,100 do z = a-b end > end > > -do > +do --- char and 0LL base comparisons > local x = true > local abc = ffi.cast("const char *", "abc") > for i=1,100 do x = abc == "abc" end > @@ -142,8 +142,8 @@ do > assert(x == false) > end > > --- ra_destpair > -do > + > +do --- ra_destpair Does `ra` means `register allocator`? > local x, y = 0, 0 > for i=1,100 do > x = x + i/3LL > diff --git a/test/LuaJIT-tests/lib/ffi/index b/test/LuaJIT-tests/lib/ffi/index > index 8236ab98..0c1e5e66 100644 > --- a/test/LuaJIT-tests/lib/ffi/index > +++ b/test/LuaJIT-tests/lib/ffi/index > @@ -10,6 +10,7 @@ ffi_const.lua > ffi_convert.lua > ffi_enum.lua > ffi_gcstep_recursive.lua > +ffi_jit_arith.lua > istype.lua > jit_array.lua > jit_complex.lua > -- > 2.43.0 >