diff options
| author | eunhhu <[email protected]> | 2026-10-05 19:26:34 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-05 19:26:34 +0100 |
| commit | e2e56dde4bac99a9937dd1d42a31b4d1cc96ce30 (patch) | |
| tree | 640c7aba218a3a1a3ccefd034edc88923253c40f /core/module-jit.c | |
| parent | b5c275f6b908aad08b98bc0cc643f8602ebfb157 (diff) | |
| download | pure-e2e56dde4bac99a9937dd1d42a31b4d1cc96ce30.tar.gz pure-e2e56dde4bac99a9937dd1d42a31b4d1cc96ce30.zip | |
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)
Diffstat (limited to 'core/module-jit.c')
| -rw-r--r-- | core/module-jit.c | 10 |
1 files changed, 6 insertions, 4 deletions
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) |
