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 D8D706EC40; Thu, 23 Sep 2021 16:55:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D8D706EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632405338; bh=QR+LD9DWmG7gf2B64pxvrhcH5D74tl3YpEWZ7BjtxOs=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=WE8yiUroUs7TGVDsWUBnvo6BYsf+n2UVyoLdcJROkiYJfGuLHAd67p/5PQ/aEhAgk LSFPv9VSOVRY5AP/F9bCplcVt+1Ty4sS1t3dYfhIqmGGQ7o6LbNwa2JlvYxx5eMeVG PEjsxcrClJHb4xlFF4FjXaU/iwLUDc/33fOxpogo= Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 B9F1C6EC40 for ; Thu, 23 Sep 2021 16:55:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B9F1C6EC40 Received: by mail-lf1-f46.google.com with SMTP id y28so26897267lfb.0 for ; Thu, 23 Sep 2021 06:55:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n8oV+snbBFYe82o1Dgwi7eWrRHXL+qLUzvfe6s0Bt1s=; b=VK53bs4xLEmHvzLmlZ5tVHyPaHjN3TmYibe5iiR8t7MomVgjghvwYj4FLCPPDhJput zKbFCR8LASPojWdPSZjlzSIXGgBoB4hz3Q0TsQHCBbnUAx2OPhnPEh5XT/GqNZji4puP PwVCoSM8WXVSASEMqVyU0gKf+3VeyLs9HjKMASTb3c42e+qx+lkbj5u1c4JeI+wmP7pn 0l06iuZ8zLKd+82NAeCE15vIjl5duDbgKd3uBRsbYQ2IAO+n+rSn3cWVwQcZcbzeeEbZ /KuWXPFSV6Z/4oFuO7GNJSxlpgqtkQFeIRbgNZa+ERob+OItqB8abSh9mlumOdc1xS19 FD0w== X-Gm-Message-State: AOAM530HYZoMUglPGV04kfgcGlJnao13HxYvIlklBjLYEMcmIfKFrYX/ 56g9/IpCKtEg3IO9ujakiG+DqOdZH8YrtpxW X-Google-Smtp-Source: ABdhPJzuqf5bXnQwsC6zu9o0BnvBLzZRjDcOFauFMVu/PkS7h/kcQ2hdWBaIGbeg79pMuXLEuLW4HQ== X-Received: by 2002:a05:6512:3f8c:: with SMTP id x12mr4367927lfa.320.1632405332313; Thu, 23 Sep 2021 06:55:32 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id a18sm596996ljd.4.2021.09.23.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 06:55:32 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Thu, 23 Sep 2021 16:55:24 +0300 Message-ID: X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 0/4] jit: fix math.min/math.max inconsistencies 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Message-ID: <20210923135524.ELuOgMwtCGwR-iDLny8UtLMqa4OHd0VnMojl3FsjI8I@z> Once applied, this patch set will fix math.min/math.max inconsistencies and add test case for them. This patch backports the fix[1] from the vanilla LuaJIT, along with other[2][3] math module fixes. [1]: https://github.com/LuaJIT/LuaJIT/commit/03208c81 [2]: https://github.com/LuaJIT/LuaJIT/commit/d75e2627 [3]: https://github.com/LuaJIT/LuaJIT/commit/5655be45 Maxim Kokryashkin (2): Cleanup math function compilation and fix inconsistencies. test: add test for gh-6163 min/max Mike Pall (2): Fix math.min()/math.max() inconsistencies. Don't compile math.modf() anymore. src/lib_math.c | 24 +++--- src/lj_asm.c | 6 -- src/lj_asm_arm.h | 7 +- src/lj_asm_arm64.h | 7 +- src/lj_asm_x86.h | 2 - src/lj_ffrecord.c | 35 +-------- src/lj_ir.h | 4 +- src/lj_ircall.h | 14 ++-- src/lj_opt_fold.c | 78 ++++++++++--------- src/lj_opt_split.c | 3 - src/lj_target_x86.h | 6 -- src/lj_vmmath.c | 10 +-- src/vm_arm.dasc | 4 +- src/vm_arm64.dasc | 4 +- src/vm_x64.dasc | 2 +- src/vm_x86.dasc | 2 +- .../gh-6163-jit-min-max.test.lua | 18 +++++ 17 files changed, 99 insertions(+), 127 deletions(-) create mode 100644 test/tarantool-tests/gh-6163-jit-min-max.test.lua --- Issue: https://github.com/tarantool/tarantool/issues/6163 GitHub branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-6163-min-max 2.33.0