o neon assembly files. To handle the case that we don't want the
compiler to emit any neon instructions, but will still want to use neon
in assembly files which are used at runtime only if the fat machinery
thinks the processor supports it.
Regards,
/Niels
--
Niels Möller. PGP-encrypted
Harley Kooper <5398...@gmail.com> writes:
> It was created by GNU MP configure 4.3.2, which was
> generated by GNU Autoconf 2.61. Invocation command line was
Please try a more recent version than the ancient 4.3.2.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is pref
ni...@lysator.liu.se (Niels Möller) writes:
> It shouldn't be too hard to rewrite randseed_mt to use mpn_powm, right?
> Which probably didn't exist when the original version was written.
Or if we want to take advantage of the structure, we need an mpn
function to reduce numbers modulo 2
ni...@lysator.liu.se (Niels Möller) writes:
> and for a five-operand
> function like gcdext, I can't easily get the correct count
Actually, in the case of gcdext, there are three result arguments, which
mustn't overlap with each other.
So there are only 16 cases of valid overlap wh
use tests.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
s,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs
an try to force any windows program linking
with gmp to define __USE_MINGW_ANSI_STDIO in each and every compilation
unit, so I hope things will work well enough with a mix.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale gove
, even on x86_64 (not sure about windows on arm64,
though, I haven't bothered to ever try compiling anything for windows
phones).
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
--
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
libraries under test is broken/unsupported, or at least
isn't supported with the Solaris runtime linker.
(I should probably not speculate more on exactly how it fails, but I'd
be happy to hear the precise explanation if someone here really knows
the automake magic involved).
Regards,
/Niels
--
Ni
quot;can
only be preprocessed with gcc" sounded like you expected the above
incorrect command to somehow succeed in case CC=gcc, and break only if
gcc is replaced by Oracles compiler. But it's broken regardless of
compiler; the separate m4 step is always required.
Do you follow?
Regards,
/N
nk it's
possible to force gcc to link it statically, but that's discouraged by
the gcc people. I haven't tried to really understand the pros and cons.
Anyway, gmp uses plain libtool for the shared libraries, so if anything
really is fishy with how they are produced, that's most likely
e assembly
> files.
Right, precisely which internal functions get included in the library
depends on both platform and configure arguments.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale go
then examine and report any errors you get.
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.
he
documented way to tell gcc it shouldn't do that.
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
"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,
<-- 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
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
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
torage. This is the initial state after
mpz_init.
_mp_alloc == 0 and _mp_size != 0 is a read-only value, _mp_d is neither
written, reallocated or freed by mpz functions. It must not be passed as
destination argument to any mpz function. Should also link to docs for
mpz_roinit_n and MPZ_ROINIT_N.
x) count_trailing_zeros_gcc_ctz(count,
>> x)
>> -#define COUNT_LEADING_ZEROS_0 64
>> #endif /* __aarch64__ */
>>
>> #if defined (__clipper__) && W_TYPE_SIZE == 32
>
> I confirm that this fixes the problem.
Thanks for testing. Pushed
ni...@lysator.liu.se (Niels Möller) writes:
> Pushed now.
And below, a patch to delete all mention of COUNT_LEADING_ZEROS_0,
except for tune/many.pl, which I'm not familiar with. What do you think?
Regards,
/Niels
diff -Nprc2 gmp.0e10f8f34eb4/longlong.h gmp/longlong.h
*** gmp.0e10f8f34
#ifdef
COUNT_LEADING_ZEROS_0, but I found no matches when greping through the
sources. I could be missing something, of course.
Or maybe it should be used at some places, but currently isn't.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to who
mp builds. I
think GNU standard is to enable -g by default when building with gcc
(which has always had reasonable support for generating useful debug
info also when optimizing).
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale g
. Seems less brittle to me than passing the
corresponding command line options, in particular for fat builds (i.e.,
some files with neon assembly, used at runtime only after some check of
available instructions), where one might not want the C compiler to emit
any neon instructions.
Regards,
/Niel
s, and only consider choices of
gmp-ABI which are consistent with the user's compiler-ABI.
It's a bit unclear to me in which cases there are multiple gmp-ABI
consistent with the same compiler-ABI.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is
.,
./configure CC='gcc -m32' CXX='g++ -m32'
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
to the user. I think it would be better to not automatically add -m64 in
this case, but just display a loud message suggesting a reconfigure with
CC='gcc -m64'.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government
. But CFLAGS is *not* interpreted by configure in any way.
Please use the documented mechanism to get the configuration you want.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government
zeros_gcc_ctz(count, x)
-#define COUNT_LEADING_ZEROS_0 64
#endif /* __aarch64__ */
#if defined (__clipper__) && W_TYPE_SIZE == 32
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
t128_t on compilers that support that).
/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/listin
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
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
"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
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
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
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.
_
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
< 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
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
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.
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
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
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
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
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
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
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
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
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.
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
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
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.
__
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
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
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
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
/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
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
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
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
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
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
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.
___
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
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
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
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
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
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
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
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
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
`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
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
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
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
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
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
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.
__
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
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
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
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
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
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
>> +++ 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)
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
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,
1 - 100 of 123 matches
Mail list logo