elease, 6.3.0.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
that size.
To the GMP application, the allocation size of an mpz_t is then bounded
by the largest "expected size" for any operation ever using that mpz_t
as output (+ effects of any mpz_swap or mpz_realloc2 in the
*application* code), which should be sufficient to get predictable
memory u
lications can either just
#include mini-gmp.c (but then, beware that it defines several macros
and functions outside of the advertised interface), and if needed
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
__
ocstring for `mpz_remove`), or fixing this in `mpz_remove`.
I don't have a strong opinion on how to fix this discrepancy between
docs and implementation. But I feel rather strongly that mini-gmp
shpuldn't make this promise, so code that rely on it will not work with
mini-gmp.
Regar
ot; rather
than "never"). Do you think the "never reduce their allocated space"
property is important for your usecase, or for other GMP applications
general? If the strong statement is kept, this should perhaps be mention
as another execption in mini-gmp
as needed by "README.HG",
> in case this is specific to the use of the hg repository.
You're right that bison should be listed in README.HG.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale g
nd ChangeLog
changes since the previous version of the patch.
Thanks for the review,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bug
1. */
- if (mpz_cmpabs_ui (s, 1) > 0)
+ /* Require that 2 |s| < |b/g|, or s == sgn(a) */
+ if (mpz_cmp_si (s, mpz_sgn (a)) != 0)
{
mpz_mul_2exp (temp3, s, 1);
if (mpz_cmpabs (temp3, temp2) >= 0)
@@ -456,8 +460,8 @@
if (mpz_sgn (temp3) != 0)
return 0;
- /
s1) > 0 || mpz_cmpabs (t0, t1) > 0)
{
mpz_swap (s0, s1);
mpz_swap (t0, t1);
}
}
And I think this is the only condition that isn't fully symmetrical, so
perhaps not surprising if it needs a special case.
Regards,
/Niels
confusing), then we ncessarily have |t| != |t'|,
and we must choose candidate to get the smaller one.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
Niels Möller writes:
> Guido Vranken writes:
>
>> Computing extended gcd using mpz_gcdext where a = 1, b = 2:
>>
>> libgmp: g: 1, s: 1, t: 0
>> mini-gmp: g: 1, s: -1, t: 1
>> This violates the docs: "s = sgn(a) if abs(b) = 2", e.g. s must be 1
>&
e inequalities as you
suggest, 1 = gcd(1,1) would still be an exception (since in that case,
we'd get |s|, |t| < 1/2, i.e., s = t = 0, which isn't reasonable).
Can you suggest any doc change to make it clearer?
Regards,
/Niels
--
Niels Möller. PGP key CB49
ctures, and not enabled in your build.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listin
ASM_START()
PROLOGUE(mpn_bdiv_q_1)
@@ -87,7 +87,7 @@ PROLOGUE(mpn_pi1_bdiv_q_1)
L(unorm):
lsr x12, x9, cnt
cbz n, L(eu1)
- sub tnc, xzr, cnt
+ sub tnc, wzr, cnt
L(tpu): ldr x9, [up],#8
lsl x7, x9, tnc
--
Niels Möller. PGP key C
onfigure tests, but defined by configure
based on
case $limb_chosen in
longlong) DEFN_LONG_LONG_LIMB="#define _LONG_LONG_LIMB 1";;
*)DEFN_LONG_LONG_LIMB="/* #undef _LONG_LONG_LIMB */" ;;
esac
AC_SUBST(DEFN_LONG_LONG_LIMB)
So not clear to me if/how GMP_LIMB_B
t turns it into a valid gmp.h
header file.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
relevant include directories.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
When debugging configure issues, the first step is to check config.log. That
should tell you in detail what configure tried to compile or run, and how it
failed.
Regards,
/Niels
"Gabriel Staples, ElectricRCAircraftGuy.com" skrev: (3
november 2023 08:26:03 CET)
>I could really use some help
leave as
is.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
d by Vincent.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
`0` if the `k` is odd (i.e., it either flips all the bits
> in the even case or leaves them in the odd case)?
I think intention is to conditionally flip all the bits. And in
addition, neg should always be either all ones or all zeros.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8B
Hubert Kario writes:
> On Friday, 25 August 2023 07:51:10 CEST, Niels Möller wrote:
>> And that's for all inputs? Nice.
> Well, not all, I mostly tested ones that had obvious patterns, like
> zero to power zero, 0xff to power 0xff, full word to power of 1, full
> word to power
wer in a circuit, seem too dependent both on hardware details
and on the kind of access the attacker can gain to the system. And
rather difficult to devise general and portable countermeasures. That
said, if GMP can provide advice and/or tools to do it, that's nice of
course.
Regards,
/Niels
--
Niels Mölle
owm_sec, and
recommending mpn_sec_powm for applications that need side-channel silence.
> A possible implementation of your 2-3 points (I didn't look at
> documentation) could be the following.
Looks rather neat! But I'm still not quite convinced that it is worth
doing.
Regards,
/Niels
Niels Möller writes:
> It's preferable to use the mpn_powm_sec. When using mpz_t, I see no
> reasonable to avoid leakage of the normalized size (or number of
> all-zero limbs at the most significant end).
One possibly unreasonable approach for consideration:
1. Document that the mpz
ns, which is a bit confusing.
It would be desirable to with a larger rework; it would be better to (i)
use byte strings, rather than mpz_t values, for the interface to
applications, and (ii) use only mpn-level GMP functions internally. And
I would recommend the same approach for any other implementation of R
even
fixing all GMP-specific tests would likely not solve your problem (but
feel free to try that out, if you believe that would be useful).
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
__
re --host=x86_64-w64-mingw32
and run tests using wine. On debian, the cross compiler is in the
package "gcc-mingw-w64-x86-64-win32".
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale gove
Vincent Lefevre writes:
> No problems when testing MPFR with MINI_GMP_LIMB_TYPE = long, int,
> short and char, with -m64 and with -m32.
Thanks for testing. I've now committed that change.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet
Vincent Lefevre writes:
> On 2023-07-19 21:24:03 +0200, Niels Möller wrote:
>> I think that's needed, to be able to support any size of
>> MINI_GMP_LIMB_TYPE. Something like
>>
>> #define umullo_limb(u, v) \
>> (sizeof(mp_limb_t) >= sizeof(int)
LIMB_TYPE. Something like
#define umullo_limb(u, v) \
(sizeof(mp_limb_t) >= sizeof(int)) ? (u)*(v) : (unsigned int)(u) * (v))
If I understand you correctly, the two multiplies in
gmp_udiv_qrnnd_preinv and gmp_udiv_qr_3by2 are the only places where we
need a mullo operation, i.e., producing the
O m4 macros). I
haven't double checked what assembly files actually look like after
preprocessing, though.
And something similar for __gmp_binvert_limb_table.
But I have no clue about the arm64 abi. Is PIC defined in the failing
build, or should it be?
Regards,
/Niels
--
Niels
e able to track down, please carefully follow
the instructions at https://gmplib.org/manual/Reporting-Bugs.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gm
f("y = %ld\n", y);
return 0;
}
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
dd something like
-Werror (turn all warnings into compile errors) to the compiler flags
get's to deal with the work of suppressing any false positives.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government
880a30d859339cb;hb=HEAD
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
f
them:
https://gmplib.org/repo/gmp/file/tip/mpn/x86_64/core2/hamdist.asm#l194
movq %xmm0, %rax
For the memory accesses, e.g.,
movq (up), %xmm1
I agree changing those to movd sounds scary.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet
movd
(i) solves the problem on (older) macos, and
(ii) produces identical object code on systems with more up-to-date
assemblers.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
s to a merit 14 prime_gap, which is rare. */
odds_in_composite_sieve = 5 * nbits;
Thanks for reporting.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
_
(mod m)
should give? But docs for mpz_*_pow_ui does say that 0^0 yields 1, so
for consitency, powm should give 1 mod m, which I think is what the code
(with fix) does.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale gover
mpz_tdiv_r (r, r, m);
>return;
> }
Should solve the problem, but maybe a bit overkill to call mpz_tdiv_r. Perhaps
mpz_set_ui (r, mpz_cmpabs_ui (m, 1) != 0);
or even (mn == 0 check just above this code rules out |m| < 1)
mpz_set_ui (r, mpz_cmpabs_ui (m, 1));
Regards,
oss_compilation set properly. For some backwards
compatiblity reasons one has to explicitly pass --build as well, even
when config.guess figures out the build system type perfectly right.
Documented in some detail at
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.h
figure is almost
sure to break.
But it could make sense to enable in certain nightly builds with known
compilers, if one has the ambition that the code should build without
(certain) warnings in that configuration, and stay that way.
Regards,
/Niels
--
Niels Möller. P
ni-gmp, I guess one could tweak the check-mini-gmp
make target, or the arguments passed to it in nightly builds.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government sur
>> +++ b/mini-gmp/mini-gmp.cFri Apr 15 07:20:40 2022 +0200
>> @@ -90,6 +90,7 @@ see https://www.gnu.org/licenses/. */
>> #define gmp_assert_nocarry(x) do { \
>> mp_limb_t __cy = (x); \
>> assert (__cy == 0);\
>> +(void)
make outputs: make: *** No targets specified and no
> makefile found. Stop.
If there's no makefile, that sounds like the configure step failed.
Check if it produced any errors (and if it did, more details can be
found in config.log).
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8
patch:
--- a/mini-gmp/mini-gmp.c Tue Feb 15 09:18:40 2022 +0100
+++ b/mini-gmp/mini-gmp.c Fri Apr 15 07:20:40 2022 +0200
@@ -90,6 +90,7 @@ see https://www.gnu.org/licenses/. */
#define gmp_assert_nocarry(x) do { \
mp_limb_t __cy = (x); \
a
g/repo/gmp/file/tip/bootstrap.c#l33.
But probably still shouln't define macros not used within mini-gmp.c;
any additional utility macros should probably go in mini-gmp.h, and be
compatible with public macros from gmp.h.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6
environment,
maybe it would work better to install, e.g., bash, and set
CONFIG_SHELL=/usr/bin/bash (that's a feature I've never had to use)?
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholes
est that you disable or ignore that warning. Operations
on unsigned types is well defined by the C standard, and gmp depends on
practically all possible cornercases to work according to spec.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email i
gnulib package?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
pected behavior of gcc. But to me it seems reasonable of gcc to try to
share a register when an inline asm template is instantiated with
identical expressions for two of the inputs (as in the squaring
umul_ppmm(xh, xl, u, u). And the additional & seems to be the documented
way to tell it to not do that for this asm template.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
ing.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
firefox, no idea if it
attempts to use HTTP/2) and clicking those links works for me. Maybe
some temporary error? If problem persists, you'd need to share more
details on what tools you use to download.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet e
ty,
so that (f(1) - b) / DECKSIZE == -1.
So your problem really is with % in C++, GMP just follows the
conventions for the builtin integers. I'm not even sure if rounding is
specified by the C++ standards, but rounding towards zero is what all C
and C++ implementations I'm aware of use.
Regards,
/Niels
ding in edge cases not exercised by most applications, and it also
has a pretty thorough test suite that tends to detect compiler bugs.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
follow bug reporting instructions in the fine
manual.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
gnum size, and
will raise an emacs exception long before hitting GMP's limits, and the
emacs process can go on running with no issues.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government sur
orresponding configure.ac setup. Not sure it's worth the effort,
since the multilib organization works fine, and works for *all*
libraries with arch-dependent headers.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesal
(foo)' | m4 mpn/asm-defs.m4 -
3
$ echo 'm4_length(foo, bar)' | m4 mpn/asm-defs.m4 -
3
$ echo $?
0
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance
you provide a bit
more context. How do you handle the callback on overflow? If you longjmp
out, how do you arrange so that your mpz variables are in a consistent
state?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesal
which is a different
case.
sub_ddmmss (rh, rl, ah, 0, bh, bl)
should be the same as
rh = ah - bh - (bl > 0);
rl = -bl;
So we have a borrow to propagate except of also bl == 0, and hence some
runtime carry logic is needed.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is pref
round code for special-form ECC-related primes.
And, which I guess is more relevant in the sub_ddmmss context, it also
means that there's little need for separate instructions for adding and
subtracting constants.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677
t...@gmplib.org (Torbjörn Granlund) writes:
> The two - signs ought to be ~, I think. Let me think a buit more about that.
If I remember ARM conventions correctly, subtract with carry is defined
as
{cout, r} = a + ~b + cin
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is prefer
fine with other packages,
and possibly for gmp too *if* configured with --disable-assembly). Don't
do that.
The relation between C and asm files is a bit intricate, and you have to
either leave ABI choice completely to configure, or tell it in the
documented way what you want.
Regards,
/Niels
pened to "long", long ago? Just like
intmax_t, long was supposed to be the platform's largest supported
integer type. Maybe we'll see a "long intmax_t" type when 128-bit types
become more established ;-)
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
ll how I install
more or less everything that I install from sources rather than from
binary packages.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
__
e clean" generally deletes only files that
were created by running make. To delete things created by running
configure, you need to run "make distclean".
And I also highly recommend using a separate build directory for each
configuration.
Regards,
/Niels
--
Niels Möller. PG
Renaming fields and dropping leading underscores in
mini-gmp might make sense. But keeping them the same makes it easier to
copy code between gmp and mini-gmp, which also has benefits.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email i
imb
array as input, use mpz_roinit_n.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
to undersnd the error, but
Sun C 5.11 must be a pretty old C++ compiler, right? Maybe it simply
doesn't understand current C++?
Do you really need the C++ glue to boostrap gmp and gcc? If not, try
configuring gmp with --disable-cxx.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid
don't think copyright assignment is needed for
these fixes).
I wasn't aware that emacs uses GMP or mini-gmp, cool!
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government
failing case.
> /* Define to 1 if you have the `vsnprintf' function and it works properly. */
> #define HAVE_VSNPRINTF 1
I guess it's hard for configure to check for proper return value when cross
compiling.
Regards,
/Niels
--
Niels Möller. PGP-encrypted e
change to delete the suggestion to use
TESTS_ENVIRONMENT to run wine.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.
fails:
>
> ```
> make[5]: Entering directory '/home/claude/wintmp/src/gmp/tests'
> wine: Bad EXE format for Z:\bin\bash..
It seems that's a bad suggestion these days, thanks for reporting. I'm
fairly confident it used to work with some older version of automake,
before the current fancier
gw32-gcc.
> Trying a fat build (thanks for the pointer to this method, I think
> it's what I really need) also fails, at `make check`:
Can't say why this fails. If you have tried different configs in the
same build tree, try starting over from make dis
you say */
#define GMP_HLIMB_BIT ((mp_limb_t) 1 << (GMP_LIMB_BITS / 2))
#define GMP_LLIMB_MASK (GMP_HLIMB_BIT - 1)
I see no reasonable way that can end up defining GMP_LLIMB_MASK as 1.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Interne
o/gmp/rev/0688aef1f7e3. There probably were some
mention of the problem on gmp lists at the time, but I can't look for
that at the moment.
Seems unrelated to the stack alignment issue, though.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email i
value). Which is smaller than the mpz_t limit.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmpl
mpz_t limit, though).
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
and will tell you
which libraries it loads.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.
t...@gmplib.org (Torbjörn Granlund) writes:
> Or simply:
>
> dh = (dh << dcnt) + (dl >> (GMP_LIMB_BITS - 1 - dcnt) >> 1);
Looks better, thanks.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholes
< dcnt) + (-(dcnt > 0) & (dl >> (LIMB_SHIFT_MASK & - dcnt)));
I'd expect compilers for common archs will generate the same code. It
depends on GMP_LIMB_BITS being a power of 2, though.
Vaguely related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157. But
unlike rotate, an extra m
o nowhere.
I also wonder if any other architectures (ARM?) needs anything similar?
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing
#Headers-and-Libraries.
: Note however that prototypes for GMP functions with FILE * parameters
: are only provided if is included too.
> #include
> #include
These two includes need to be in the opposite order.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368
expected, it seems unlikely that ul doesn't hold the
proper input value.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bug
gmp_compile="$CC_FOR_BUILD $LDFLAGS conftest.c -o conftest$i"
>if AC_TRY_EVAL(gmp_compile); then
> if (./conftest) 2>_FD_CC; then
> gmp_cv_prog_exeext_for_build=$i
> @@ -3966,7 +3966,7 @@ main (int argc, char **argv)
>return 0;
> }
>
igure out how the gcc scripts set the gmp host
type. Is gmp's config.* involved in any way? If all else fails, you
could try hacking the configure script in the gmp tree, to hard code all
host-related variables and ignore whatever is passed in from outside.
Regards,
/Niels
--
Niels Möller. PGP-encrypt
claring alloca, is that expecting that a replacement
alloca.c is used as a fallback? As far as I see, we don't do that in
gmp.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_
le/commit/73d3c6d5586cc0fd81eab081078144d621de07b4
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.or
"Marco Bodrato" writes:
> The wrapper you propose is more elegant than the workaround I used.
> I removed the _TESTING definition and pushed it:
>
> https://gmplib.org/repo/gmp/rev/14649658a790
Thanks!
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is pre
as a way to check that POWM_SEC_TABLE is
sane.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
ing the core dump collection "services" you mention).
And as Vincent says, there are many ways to crash due to bugs, without
triggering any assertion failure. And you should avoid generating core
dumps for those crashes too.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is pre
lished
https://www.gnu.org/philosophy/kind-communication.html
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmpl
to
have a check for __MIN_GMP_TESTING in mini-gmp.c, and a prototype in
t-lucm.c.
A different way to do it is to add a wrapper in testutils.c (which
*includes* mini-gmp.c, in order to get access to internals), and a
prototype for that wrapper in testutils.h. Then nothing special is
needed in mini-gmp.c itself
t. But with the
first variant, the first shift can be issued in parallel with ctz,
reducing the critical path of the gcd loop.
We'd need some benchmarking to see if it makes a difference.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email i
<-- min (u, v) */
vlimb += (vgtu & t);
/* u <-- |u - v| */
ulimb = (t ^ vgtu) - vgtu;
count_trailing_zeros (c, t);
ASSERT (c + 1 < GMP_LIMB_BITS);
ulimb >>= (c + 1);
}
vlimb = (vlimb << 1) | 1;
return vlimb << zero_bits
goto has its uses, but this case with multiple target labels is more
like the infamous COME FROM... https://en.wikipedia.org/wiki/COMEFROM
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale gover
"Marco Bodrato" <bodr...@mail.dm.unipi.it> writes:
> Il Ven, 25 Maggio 2018 2:10 pm, Niels Möller ha scritto:
>> That fails with undefined behavior if by chance t == 2^31, so that c ==
>> 31.
>>
>> I don't see how that can happen, though, since ulimb,
1 - 100 of 127 matches
Mail list logo