gcd_11 asm
Torbjörn Granlund
tg at gmplib.org
Fri Aug 23 22:14:43 UTC 2019
"Marco Bodrato" <bodrato at mail.dm.unipi.it> writes:
It is not elegant, I agree, but maybe joining them both in a single .asm
file, so that the jump is local?
We might do that, but it makes things a lot more complicated as there
will be more variants (almost a cross product of the current _22 and _11
variants).
> I'd say this is a very generic problem. Our fine library will mishave
> too if somebody overrode mpn_mul_basecase with something incompatible.
If _mul_basecase does not behave as the documented function is supposed
to, of course. But in this case the library will misbehave if somebody
overrides the assembly version of mul_gcd_11 with the C code we distribute
in mpn/generic/gcd_11.c ...
I think the situation with our private gcd_11 is really no worse than
with some other internal functions or tables. It is perhaps a bit of a
mine for our own development, as if we e.g. remove the toplevel
x86_64/gcd_11.asm and as a result configure ends of with the C gcd_11,
things will likely break.
For now, I can say that they both are great pieces of code.
Even if... maybe I'd call them _1o1o and _2o2o, as someone suggested :-)
Do you want an entry point also for _22 which accepts even operand(s)?
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-devel
mailing list