From sven at anderson.de Fri May 3 00:26:21 2024 From: sven at anderson.de (Sven Anderson) Date: Fri, 3 May 2024 00:26:21 +0200 Subject: Fix for BMI2 detection for Intel CPUs in fat builds Message-ID: Hi, Due to a bug in the BMI2 detection in mpn/x86_64/fat/fat.c (missing load of the correct CPUID register) the codepath with the BMI2 and ADX instructions (_coreihwl and _coreibwl suffix) is never being used in fat binaries. Fixing it gave me a large performance boost. See attached patch. (Please reply also directly to me, I'm not subscribed to the list.) Best regards, Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: libgmp-fat.patch Type: application/octet-stream Size: 656 bytes Desc: not available URL: From vincent at vinc17.net Tue May 14 09:52:17 2024 From: vincent at vinc17.net (Vincent Lefevre) Date: Tue, 14 May 2024 09:52:17 +0200 Subject: GMP repository: "make" failure if yacc is not available Message-ID: <20240514075217.GK3047@qaa.vinc17.org> I'm trying to build GMP from its repository (18472:1040c6303455) on a new machine, and "make" gives the following error: make[3]: Entering directory '/home/vinc17/software/gmp/demos/calc' test -f calc.c || /bin/sh ../../ylwrap calc.y y.tab.c calc.c y.tab.h `echo calc.c | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/` y.output calc.output -- yacc -d ../../ylwrap: 176: yacc: not found make[3]: *** [Makefile:459: calc.c] Error 127 Is yacc a new requirement? If it is, it should be checked by the configure script. Note that neither yacc nor bison is mentioned as needed by "README.HG", in case this is specific to the use of the hg repository. -- Vincent Lef?vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From nisse at lysator.liu.se Wed May 15 08:05:11 2024 From: nisse at lysator.liu.se (=?utf-8?Q?Niels_M=C3=B6ller?=) Date: Wed, 15 May 2024 08:05:11 +0200 Subject: GMP repository: "make" failure if yacc is not available In-Reply-To: <20240514075217.GK3047@qaa.vinc17.org> (Vincent Lefevre's message of "Tue, 14 May 2024 09:52:17 +0200") References: <20240514075217.GK3047@qaa.vinc17.org> Message-ID: Vincent Lefevre writes: > Is yacc a new requirement? If it is, it should be checked by the > configure script. It's not a requirement when building from a release tar file, since then the files generated by bison are already included. > Note that neither yacc nor bison is mentioned 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 government surveillance. From tg at gmplib.org Wed May 15 21:00:11 2024 From: tg at gmplib.org (=?utf-8?Q?Torbj=C3=B6rn_Granlund?=) Date: Wed, 15 May 2024 21:00:11 +0200 Subject: Fix for BMI2 detection for Intel CPUs in fat builds In-Reply-To: (Sven Anderson's message of "Fri, 3 May 2024 00:26:21 +0200") References: Message-ID: <868r0adhok.fsf@shell.gmplib.org> Thanks, your proposed patch has been committed. -- Torbj?rn Please encrypt, key id 0xC8601622 From albin.ahlback at gmail.com Thu May 16 14:38:28 2024 From: albin.ahlback at gmail.com (=?UTF-8?Q?Albin_Ahlb=C3=A4ck?=) Date: Thu, 16 May 2024 14:38:28 +0200 Subject: Reduced number of allocated limbs after calling mpz_remove Message-ID: Hello, Standing at the following commit: changeset: 18465:7ecb3b2beea1 tag: tip user: Niels M?ller date: Sun Feb 18 20:20:57 2024 +0100 summary: mini-gmp: Fix bug in gcdext canonicalization, and strengthen related tests. I have noticed that `mpz_remove` may reduce the number of allocated limbs after a call. I haven't looked into this too much, but I suppose it is due to the variable `x` being initialized in the routine, whose limbs I believe are allocated in `mpz_tdiv_q`, is then being swapped with `dest`. It is stated in the documentation that "mpz_t and mpq_t variables never reduce their allocated space.", which is sort of true given that `x` and `dest` are only being swapped, but that requires the user to know what the internals are doing. Is this the expected behavior? Have I overlooked something perhaps? Please let me know if you need more information. Best, Albin