[Gmp-commit] /var/hg/gmp: Use gmp_uint_least32_t in bitfields instead of unsi...

mercurial at gmplib.org mercurial at gmplib.org
Sat Dec 19 10:59:46 UTC 2015


details:   /var/hg/gmp/rev/b038d524a264
changeset: 17006:b038d524a264
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Sat Dec 19 11:59:42 2015 +0100
description:
Use gmp_uint_least32_t in bitfields instead of unsigned int.

diffstat:

 ChangeLog              |  5 +++++
 gmp-impl.h             |  4 ++--
 mpn/generic/trialdiv.c |  4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 4d37cb433803 -r b038d524a264 ChangeLog
--- a/ChangeLog	Mon Dec 14 18:50:05 2015 +0100
+++ b/ChangeLog	Sat Dec 19 11:59:42 2015 +0100
@@ -1,3 +1,8 @@
+2015-12-19  Marc Glisse  <marc.glisse at inria.fr>
+
+	* gmp-impl.h (fft_table_nk): Use gmp_uint_least32_t.
+	* mpn/generic/trialdiv.c (gmp_primes_ptab): Likewise.
+
 2015-12-14  Torbjörn Granlund  <torbjorng at google.com>
 
 	* mpn/x86_64/fat/fat.c (gmp_workaround_skylake_cpuid_bug):
diff -r 4d37cb433803 -r b038d524a264 gmp-impl.h
--- a/gmp-impl.h	Mon Dec 14 18:50:05 2015 +0100
+++ b/gmp-impl.h	Sat Dec 19 11:59:42 2015 +0100
@@ -2295,8 +2295,8 @@
 
 struct fft_table_nk
 {
-  unsigned int n:27;
-  unsigned int k:5;
+  gmp_uint_least32_t n:27;
+  gmp_uint_least32_t k:5;
 };
 
 #ifndef FFT_TABLE_ATTRS
diff -r 4d37cb433803 -r b038d524a264 mpn/generic/trialdiv.c
--- a/mpn/generic/trialdiv.c	Mon Dec 14 18:50:05 2015 +0100
+++ b/mpn/generic/trialdiv.c	Sat Dec 19 11:59:42 2015 +0100
@@ -65,8 +65,8 @@
 struct gmp_primes_ptab {
   mp_limb_t ppp;	/* primes, multiplied together */
   mp_limb_t cps[7];	/* ppp values pre-computed for mpn_mod_1s_4p */
-  unsigned int idx:24;	/* index of  first primes in dtab */
-  unsigned int np :8;	/* number of primes related to this entry */
+  gmp_uint_least32_t idx:24;	/* index of  first primes in dtab */
+  gmp_uint_least32_t np :8;	/* number of primes related to this entry */
 };
 
 


More information about the gmp-commit mailing list