[Gmp-commit] /var/hg/gmp: Use asm just for gcc.
mercurial at gmplib.org
mercurial at gmplib.org
Tue Mar 22 07:19:57 CET 2011
details: /var/hg/gmp/rev/4d2e8ab2a4a1
changeset: 14092:4d2e8ab2a4a1
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Mar 22 07:19:49 2011 +0100
description:
Use asm just for gcc.
diffstat:
mpn/generic/div_qr_2.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 1b37551f5a16 -r 4d2e8ab2a4a1 mpn/generic/div_qr_2.c
--- a/mpn/generic/div_qr_2.c Mon Mar 21 22:56:29 2011 +0100
+++ b/mpn/generic/div_qr_2.c Tue Mar 22 07:19:49 2011 +0100
@@ -46,6 +46,8 @@
* add_csaac accepts two addends and a carry in, and generates a sum
and a carry out. A little like a "full adder".
*/
+#if defined (__GNUC__) && ! defined (__INTEL_COMPILER)
+
#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32
#define add_sssaaaa(s2, s1, s0, a1, a0, b1, b0) \
__asm__ ("add\t%7, %k2\n\tadc\t%5, %k1\n\tadc\t$0, %k0" \
@@ -83,6 +85,7 @@
"r" ((UDItype)(a1)), "r" ((UDItype)(b1)), \
"%r" ((UDItype)(a0)), "rI" ((UDItype)(b0)))
#endif
+#endif /* __GNUC__ */
#ifndef add_sssaaaa
#define add_sssaaaa(s2, s1, s0, a1, a0, b1, b0) \
@@ -109,7 +112,6 @@
(s) = __s; \
(co) = __c + (__s < (ci)); \
} while (0)
-
#endif
/* Typically used with r1, r0 same as n3, n2. Other types of overlap
@@ -333,7 +335,7 @@
r1 |= r0 >> (GMP_LIMB_BITS - shift);
r0 <<= shift;
udiv_qr_3by2 (q, r2, r1, r2, r1, r0, d1, d0, di);
- qp[i] = q;
+ qp[i] = q;
}
np[0] = (r1 >> shift) | (r2 << (GMP_LIMB_BITS - shift));
More information about the gmp-commit
mailing list