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 F3D4E6EC40; Thu, 23 Sep 2021 16:56:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F3D4E6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632405399; bh=QbUDL4Tet7fEwPsGBK3oEExamN2iJUH+oP4QZe0cs8Y=; 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=L5KExCM1RRnQKtYMPLFVgxDh/+0I9hiJagCBG9Pkx1J2fE/wIZlACz0J1yQc4IxWN nIzrrHuqxA8gMJ9y3Uv9DSucCdB7Pk0xuBw3Mk42TyW2c2g5GHyClmwuwHMSNuCjYb CqpNKc592c791pia4l+UGW4dtWasSHQI+kvw1Qyc= Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 F2A5E6EC41 for ; Thu, 23 Sep 2021 16:55:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F2A5E6EC41 Received: by mail-lf1-f51.google.com with SMTP id u8so26380940lff.9 for ; Thu, 23 Sep 2021 06:55:50 -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:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s6aNf6OPBZo9WWK/y35YK45KCZWTWgskGbMrAHfwLfM=; b=EC3QU3qU0SBI+xQw2OZOhK+eJAuFuZuW9R3VZ73Ddf1dzyvDFebgJpzPg2vNYI1Rb7 07m/dT0UMgw98Kp/+8NlzKk+qLd21tWoEb8lntHwxm9dD0bpdJ3p7jFUItllLEnvWD4g fMPOofT9QWKNJHKo0Rv8kONJOeQC+qUYKmbSuo7bmCiNBX3FzFRQR2WShBswacohaWhU We7eI/JSar8SQP68AdEmPlcuEU8Ax/MPp1Nz8BOqI0uD1sedlgrDzrRBmR0jfJgEtQ2+ 35gJg1Ozoj+k4Ti9G4w8iIpR0z5QfaLA0Lypb/xgJaNCyuncZEiIZmMkhQ4A4heprrfE T53g== X-Gm-Message-State: AOAM531XEdqEzfaEbTQW4kyMXFGXkuOF/8WlLOOvbrWOGzxNE3mthz30 xeXZb41oOStlq243+ZAR7fjfhB8/PnIjbE9I X-Google-Smtp-Source: ABdhPJxtMhzYx/eWQYG5HlG+m6sPogAanXq4Bgk6ZAmiHq4tCXoDJ6vVRzKTN5YFuufYQNnVwabUjA== X-Received: by 2002:a05:651c:281:: with SMTP id b1mr5440031ljo.372.1632405349762; Thu, 23 Sep 2021 06:55:49 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id a18sm596996ljd.4.2021.09.23.06.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 06:55:49 -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:26 +0300 Message-Id: <63dae3f0dbd003d9f6fdf0678906b3761c00ab49.1632404890.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 2/4] 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. --- 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