From e2e56dde4bac99a9937dd1d42a31b4d1cc96ce30 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 5 Oct 2026 19:26:34 +0100 Subject: The tier checks a number finite in integers (its exponent's bits all ones), off the number pipes the divisions and sums wait on: roots 10.9 to 9.6 ms (1.39x C). 040 newton.c: roots' loop in the forms the tier may make it (the check as numbers 9.7 ms, in integers 8.7, none 7.7; next in r's register as gcc keeps it 7.0) --- core/module-jit.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/module-jit.c b/core/module-jit.c index 43441b1..7110a19 100644 --- a/core/module-jit.c +++ b/core/module-jit.c @@ -4646,10 +4646,12 @@ static void tsmall_from_0(Tier *t, unsigned r, int fail) { } /* A number in d finite, else to fail. */ -static void tfinite_check(Tier *t, unsigned d, int fail) { - fp2(t->k->e, FABS, D2, d); - fcmp(t->k->e, D2, D8); - b_cond(t->k->e, HS, fail); +static void tfinite_check(Tier *t, unsigned d, int fail) { /* its exponent's bits all ones: not finite (in integers: off the number pipes, 040 newton.c) */ + Emit *e = t->k->e; + fp2(e, FMOV_XD, X10, d); + put(e, 0xD374F800 | X10 << 5 | X10); /* UBFX x10, x10, #52, #11 */ + cmp_imm(e, X10, 0x7FF); + b_cond(e, EQ, fail); } /* Affine value x of loop l at the round in register kr (XZR: round 0) -- cgit v1.2.3