[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Tue Aug 25 18:10:05 UTC 2015


details:   /var/hg/gmp/rev/07dd3e0fbd86
changeset: 16777:07dd3e0fbd86
user:      Torbjorn Granlund <torbjorng at google.com>
date:      Tue Aug 25 20:09:48 2015 +0200
description:
Output computed numbers in base-10 instead of base-16 to avoid bugs on Solaris, FreeBSD, and old NetBSD.

details:   /var/hg/gmp/rev/cb9c1322abdf
changeset: 16778:cb9c1322abdf
user:      Torbjorn Granlund <torbjorng at google.com>
date:      Tue Aug 25 20:10:02 2015 +0200
description:
ChangeLog

diffstat:

 ChangeLog                 |   7 ++++++-
 mpn/x86_64/x86_64-defs.m4 |  22 +++++++++++-----------
 2 files changed, 17 insertions(+), 12 deletions(-)

diffs (72 lines):

diff -r 0fe018bd50ee -r cb9c1322abdf ChangeLog
--- a/ChangeLog	Sun Aug 23 21:30:13 2015 +0200
+++ b/ChangeLog	Tue Aug 25 20:10:02 2015 +0200
@@ -1,3 +1,8 @@
+2015-08-25  Torbjörn Granlund  <torbjorng at google.com>
+
+	* mpn/x86_64/x86_64-defs.m4: Output computed numbers in base-10 instead
+	of base-16 to avoid bugs on Solaris, FreeBSD, and old NetBSD.
+
 2015-08-23  Torbjörn Granlund  <torbjorng at google.com>
 
 	* mpn/x86_64/fat/fat.c (__gmpn_cpuvec_init): Add more entries, handle
@@ -19,7 +24,7 @@
 	* config.sub: Corresponding changes.
 	* configure.ac: Corresponding changes.
 	* mpn/x86_64/skylake/gmp-mparam.h: New file.
-	
+
 2015-08-15  Torbjörn Granlund  <torbjorng at google.com>
 
 	* mpn/generic/mullo_basecase.c: Provide alternative code, make default.
diff -r 0fe018bd50ee -r cb9c1322abdf mpn/x86_64/x86_64-defs.m4
--- a/mpn/x86_64/x86_64-defs.m4	Sun Aug 23 21:30:13 2015 +0200
+++ b/mpn/x86_64/x86_64-defs.m4	Tue Aug 25 20:10:02 2015 +0200
@@ -338,16 +338,16 @@
 define(`mulx',`dnl
 .byte	0xc4`'dnl
 ifelse(`$#',3,`dnl
-,0x`'eval(0xe2^32*regnumh($1)^128*regnumh($3),16)`'dnl
-,0x`'eval(0xfb-8*regnum($2),16)`'dnl
+,eval(0xe2^32*regnumh($1)^128*regnumh($3))`'dnl
+,eval(0xfb-8*regnum($2))`'dnl
 ,0xf6`'dnl
-,0x`'eval(0xc0+(7 & regnum($1))+8*(7 & regnum($3))-0xc0*ix($1),16)`'dnl
+,eval(0xc0+(7 & regnum($1))+8*(7 & regnum($3))-0xc0*ix($1))`'dnl
 ',`$#',4,`dnl
-,0x`'eval(0xe2^32*regnumh($2)^128*regnumh($4),16)`'dnl
-,0x`'eval(0xfb-8*regnum($3),16)`'dnl
+,eval(0xe2^32*regnumh($2)^128*regnumh($4))`'dnl
+,eval(0xfb-8*regnum($3))`'dnl
 ,0xf6`'dnl
-,0x`'eval(0x40+(7 & regnum($2))+8*(7 & regnum($4)),16)`'dnl
-,0x`'eval(($1 + 256) % 256,16)`'dnl
+,eval(0x40+(7 & regnum($2))+8*(7 & regnum($4)))`'dnl
+,eval(($1 + 256) % 256)`'dnl
 ')')
 
 dnl  Usage
@@ -375,7 +375,7 @@
 dnl  detected.  Offsets that don't fit one byte are not handled correctly.
 
 define(`adx_helper',`dnl
-,0x`'eval(0x48+regnumh($1)+4*regnumh($2),16)`'dnl
+,eval(0x48+regnumh($1)+4*regnumh($2))`'dnl
 ,0x0f`'dnl
 ,0x38`'dnl
 ,0xf6`'dnl
@@ -384,11 +384,11 @@
 define(`adx',`dnl
 ifelse(`$#',2,`dnl
 adx_helper($1,$2)dnl
-,0x`'eval(0xc0+(7 & regnum($1))+8*(7 & regnum($2))-0xc0*ix($1),16)`'dnl
+,eval(0xc0+(7 & regnum($1))+8*(7 & regnum($2))-0xc0*ix($1))`'dnl
 ',`$#',3,`dnl
 adx_helper($2,$3)dnl
-,0x`'eval(0x40+(7 & regnum($2))+8*(7 & regnum($3)),16)`'dnl
-,0x`'eval(($1 + 256) % 256,16)`'dnl
+,eval(0x40+(7 & regnum($2))+8*(7 & regnum($3)))`'dnl
+,eval(($1 + 256) % 256)`'dnl
 ')')
 
 define(`adcx',`dnl


More information about the gmp-commit mailing list