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 3345A6FC82; Fri, 12 Nov 2021 01:59:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3345A6FC82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1636671570; bh=jJg0vTqqigiepxFWoWFOPVmJFEQ0gmODszyw/DCMXC0=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Lua9xXv2muKWCpZpXryW/Orth2J1mnMEwAOixxRJ/lvWAkeJigrXdRrQlZ6kSzgMg UmjXmCzYXzVozyXIhXOPzZHGlpgnhZK0tiCEpjXLTnMseiwj/KSBVJaHFI2jdTopJs C9bNMC1YJnIQC0U29K/HiawfvTcSR8h7EEslgOCM= Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 6AC7C70356 for ; Fri, 12 Nov 2021 01:58:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6AC7C70356 Received: by mail-lf1-f50.google.com with SMTP id bi37so12703575lfb.5 for ; Thu, 11 Nov 2021 14:58:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9VD+4eqmRncJn7kKxECB0gtEiGdg2Jhvfj+7ZcdyEx0=; b=y8Y0cNm6L5dUUaOneO/mzYewcZ8BxTU9P1vBU9zoleLRffO+vGqGMj1WlGIzVfxpIY WskGqPclkvakLlGPWIfbDQY5KoNaNiE93m+TptWoakkvArdUhzW5+rEz3OBAWzEXhLRh 85hyKhiFWXz0rBGAO/298mye87duuwsGAAkqTULxRt6vT+8BCnO7BEJKgRyuOdrYyc/F J5I5ttd2VyNJDQltgGIEnpbUUBijINTkeT00Jf3EUN5Cb7JdVtI8NX/K8kt2oEmls22d 6gGv5Fpih08qBzYiWKD4DyfBRo1rLi+IA/kB5KUMx6aM9hXB+FPOR4Af5u7vs7yf/diE T4yA== X-Gm-Message-State: AOAM531xTJL/mdl1HRb/7sa8bpOmadVqa82a/UQKhv6Bmqm6vqa/byWs jcF7yBhT+/1L7/QhuXoQAwg0rSsUKdejzUm5 X-Google-Smtp-Source: ABdhPJz9ctmZsI9EumI8TXntVOOPdjIemFWeWnj5IxQipysPItEHVrXUNVOxEtAz2TCO5slhyha6yA== X-Received: by 2002:a05:6512:234c:: with SMTP id p12mr9398881lfu.157.1636671518713; Thu, 11 Nov 2021 14:58:38 -0800 (PST) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id g10sm398734lfv.113.2021.11.11.14.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Nov 2021 14:58:38 -0800 (PST) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Fri, 12 Nov 2021 01:58:22 +0300 Message-Id: <99a77ae454a8adc47c194de172a1e7974092a234.1636671272.git.m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v3 2/3] Don't compile math.modf() anymore. 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" From: Mike Pall It's rarely used and properly compiling it would be difficult, so this commit disables compilation for it. Part of tarantool/tarantool#6548 --- src/lib_math.c | 2 +- src/lj_ffrecord.c | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/lib_math.c b/src/lib_math.c index ef9dda2d..4e6d2458 100644 --- a/src/lib_math.c +++ b/src/lib_math.c @@ -45,7 +45,7 @@ LJLIB_ASM_(math_sinh) LJLIB_REC(math_htrig IRCALL_sinh) LJLIB_ASM_(math_cosh) LJLIB_REC(math_htrig IRCALL_cosh) LJLIB_ASM_(math_tanh) LJLIB_REC(math_htrig IRCALL_tanh) LJLIB_ASM_(math_frexp) -LJLIB_ASM_(math_modf) LJLIB_REC(.) +LJLIB_ASM_(math_modf) LJLIB_ASM(math_log) LJLIB_REC(math_log) { diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index 8dfa80ed..214d6314 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c @@ -601,22 +601,6 @@ static void LJ_FASTCALL recff_math_htrig(jit_State *J, RecordFFData *rd) J->base[0] = emitir(IRTN(IR_CALLN), tr, rd->data); } -static void LJ_FASTCALL recff_math_modf(jit_State *J, RecordFFData *rd) -{ - TRef tr = J->base[0]; - if (tref_isinteger(tr)) { - J->base[0] = tr; - J->base[1] = lj_ir_kint(J, 0); - } else { - TRef trt; - tr = lj_ir_tonum(J, tr); - trt = emitir(IRTN(IR_FPMATH), tr, IRFPM_TRUNC); - J->base[0] = trt; - J->base[1] = emitir(IRTN(IR_SUB), tr, trt); - } - rd->nres = 2; -} - static void LJ_FASTCALL recff_math_pow(jit_State *J, RecordFFData *rd) { J->base[0] = lj_opt_narrow_pow(J, J->base[0], J->base[1], -- 2.33.0