[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Tue Mar 1 10:00:50 CET 2011
details: /var/hg/gmp/rev/7638a0ea7964
changeset: 13952:7638a0ea7964
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Mar 01 10:00:01 2011 +0100
description:
Cast truth value to mask's type.
details: /var/hg/gmp/rev/5c5df85750ef
changeset: 13953:5c5df85750ef
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Mar 01 10:00:48 2011 +0100
description:
Trivial merge.
diffstat:
ChangeLog | 5 +++++
gmp-impl.h | 10 +++++-----
mpn/generic/mod_1_1.c | 6 +++---
mpn/x86/atom/sse2/aorsmul_1.asm | 5 ++---
4 files changed, 15 insertions(+), 11 deletions(-)
diffs (98 lines):
diff -r e42801a3626b -r 5c5df85750ef ChangeLog
--- a/ChangeLog Mon Feb 28 22:58:27 2011 +0100
+++ b/ChangeLog Tue Mar 01 10:00:48 2011 +0100
@@ -1,3 +1,8 @@
+2011-02-28 Niels Möller <nisse at lysator.liu.se>
+
+ * mpn/generic/mod_1_1.c (add_mssaaaa): Typo fix, define
+ add_mssaaaa, not add_sssaaaa.
+
2011-02-28 Torbjorn Granlund <tege at gmplib.org>
* mpn/generic/rootrem.c (mpn_rootrem): Combine two similar scalar
diff -r e42801a3626b -r 5c5df85750ef gmp-impl.h
--- a/gmp-impl.h Mon Feb 28 22:58:27 2011 +0100
+++ b/gmp-impl.h Tue Mar 01 10:00:48 2011 +0100
@@ -2648,7 +2648,7 @@
if (p < d0) \
{ \
v--; \
- mask = -(p >= d1); \
+ mask = -(mp_limb_t) (p >= d1); \
p -= d1; \
v += mask; \
p -= mask & d1; \
@@ -2777,7 +2777,7 @@
{ \
_qh += (nh) + 1; \
_r = - _qh * (d); \
- _mask = -(_r > _ql); /* both > and >= should be OK */ \
+ _mask = -(mp_limb_t) (_r > _ql); /* both > and >= are OK */ \
_qh += _mask; \
_r += _mask & (d); \
} \
@@ -2785,7 +2785,7 @@
{ \
add_ssaaaa (_qh, _ql, _qh, _ql, (nh) + 1, (nl)); \
_r = (nl) - _qh * (d); \
- _mask = -(_r > _ql); /* both > and >= should be OK */ \
+ _mask = -(mp_limb_t) (_r > _ql); /* both > and >= are OK */ \
_qh += _mask; \
_r += _mask & (d); \
if (UNLIKELY (_r >= (d))) \
@@ -2808,14 +2808,14 @@
if (__builtin_constant_p (nl) && (nl) == 0) \
{ \
_r = ~(_qh + (nh)) * (d); \
- _mask = -(_r > _ql); /* both > and >= should be OK */ \
+ _mask = -(mp_limb_t) (_r > _ql); /* both > and >= are OK */ \
_r += _mask & (d); \
} \
else \
{ \
add_ssaaaa (_qh, _ql, _qh, _ql, (nh) + 1, (nl)); \
_r = (nl) - _qh * (d); \
- _mask = -(_r > _ql); /* both > and >= should be OK */ \
+ _mask = -(mp_limb_t) (_r > _ql); /* both > and >= are OK */ \
_r += _mask & (d); \
if (UNLIKELY (_r >= (d))) \
_r -= (d); \
diff -r e42801a3626b -r 5c5df85750ef mpn/generic/mod_1_1.c
--- a/mpn/generic/mod_1_1.c Mon Feb 28 22:58:27 2011 +0100
+++ b/mpn/generic/mod_1_1.c Tue Mar 01 10:00:48 2011 +0100
@@ -68,8 +68,8 @@
#endif
#endif /* defined (__GNUC__) */
-#ifndef add_sssaaaa
-#define add_sssaaaa(s2, s1, s0, a1, a0, b1, b0) \
+#ifndef add_mssaaaa
+#define add_mssaaaa(s2, s1, s0, a1, a0, b1, b0) \
do { \
UWtype __s0, __s1, __c0, __c1; \
__s0 = (a0) + (b0); \
@@ -249,7 +249,7 @@
}
else
{
- mp_limb_t mask = - (r1 >= b);
+ mp_limb_t mask = -(mp_limb_t) (r1 >= b);
r1 -= mask & b;
}
diff -r e42801a3626b -r 5c5df85750ef mpn/x86/atom/sse2/aorsmul_1.asm
--- a/mpn/x86/atom/sse2/aorsmul_1.asm Mon Feb 28 22:58:27 2011 +0100
+++ b/mpn/x86/atom/sse2/aorsmul_1.asm Tue Mar 01 10:00:48 2011 +0100
@@ -62,10 +62,9 @@
push %ebx
mov 16(%esp), rp
mov 20(%esp), up
- mov 24(%esp), %eax
+ mov 24(%esp), n
movd 28(%esp), %mm7
- mov %eax, n
- and $1, %eax
+ test $1, n
jz L(fi0or2)
movd (up), %mm0
pmuludq %mm7, %mm0
More information about the gmp-commit
mailing list