From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Subject: [Tarantool-patches] [PATCH luajit v3 2/3] Don't compile math.modf() anymore. Date: Fri, 12 Nov 2021 01:58:22 +0300 [thread overview] Message-ID: <99a77ae454a8adc47c194de172a1e7974092a234.1636671272.git.m.kokryashkin@tarantool.org> (raw) In-Reply-To: <cover.1636671272.git.m.kokryashkin@tarantool.org> From: Mike Pall <mike> 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
next prev parent reply other threads:[~2021-11-11 22:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-11 22:58 [Tarantool-patches] [PATCH luajit v3 0/3] fix math.min/max inconsistencies Maxim Kokryashkin via Tarantool-patches 2021-11-11 22:58 ` [Tarantool-patches] [PATCH luajit v3 1/3] Fix math.min()/math.max() inconsistencies Maxim Kokryashkin via Tarantool-patches 2021-11-11 22:58 ` Maxim Kokryashkin via Tarantool-patches [this message] 2021-11-11 22:58 ` [Tarantool-patches] [PATCH luajit v3 3/3] Cleanup math function compilation and fix inconsistencies Maxim Kokryashkin via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=99a77ae454a8adc47c194de172a1e7974092a234.1636671272.git.m.kokryashkin@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=max.kokryashkin@gmail.com \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit v3 2/3] Don'\''t compile math.modf() anymore.' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox