jets: add the direct atom optimization to +mod

+mod was going to libgmp when both operands fit in 31-bits.
This commit is contained in:
Elliot Glaysher 2020-04-27 17:41:34 -07:00
parent 17d895241d
commit bc9c4b67d6

View File

@ -10,15 +10,10 @@
u3qa_mod(u3_atom a,
u3_atom b)
{
#if 0
if ( b == 3 && a == 2684227708 ) {
printf("dword at 0x27ff84ff8 is %" PRIu64 "\r\n", *(c3_d *)0x27ff84ff8);
*(c3_d *)0x27ff84ff8 = 25;
printf("see, we modified it\r\n");
}
#endif
if ( 0 == b ) {
return u3m_bail(c3__exit);
} else if ( _(u3a_is_cat(a)) && _(u3a_is_cat(b)) ) {
return a % b;
} else {
mpz_t a_mp, b_mp;