[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bignum branch

From: Eli Zaretskii
Subject: Re: bignum branch
Date: Sun, 15 Jul 2018 18:01:55 +0300

> From: Tom Tromey <address@hidden>
> Date: Sun, 15 Jul 2018 07:46:39 -0600
> Cc: address@hidden
> Andy> b) Use 64bit long long for EMACS_INT, and do extra work to pass native
> Andy> values into GMP in two halves, i.e. something like:
> Andy>     EMACS_INT i;
> Andy>     mpz_t val, tmp;
> Andy>     mpz_init_set_si(val, (i >> 32));
> Andy>     mpz_mul_2exp(val, val, 32);
> Andy>     mpz_init_set_si(tmp, (i & 0xffffffff);
> Andy>     void mpz_ior(val, val, tmp);
> Andy>     mpz_clear(tmp);
> I was thinking this is what I' have emacs do when
> sizeof(EMACS_INT) > sizeof(long).

Yes, we need such wrappers in those cases.  Another use case is a
32-bit build --with-wide-int.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]