summaryrefslogtreecommitdiff
path: root/longlong.h
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2001-01-30 14:29:28 +0100
committertege <tege@gmplib.org>2001-01-30 14:29:28 +0100
commite0653222bf10d9e85c49ed27d3da237d5edf6250 (patch)
tree1dd1e97655a3a9706908a3eba26914e5ef2f4bfc /longlong.h
parent0cdae93f95a0d3cde45941945d200ac9747d41c6 (diff)
downloadgmp-e0653222bf10d9e85c49ed27d3da237d5edf6250.tar.gz
Add add_ssaaaa and sub_ddmmss for 64-bit sparc.
Diffstat (limited to 'longlong.h')
-rw-r--r--longlong.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/longlong.h b/longlong.h
index a5a9b7d60..2b5221e48 100644
--- a/longlong.h
+++ b/longlong.h
@@ -1180,6 +1180,27 @@ extern USItype __MPN(udiv_qrnnd) _PROTO ((USItype *, USItype, USItype, USItype))
#endif /* udiv_qrnnd */
#endif /* __sparc__ */
+#if defined (__sparc__) && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ( \
+ "addcc %4,%5,%1\n" \
+ " addccc %6,%7,%%g0\n" \
+ " addc %2,%3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "%rJ" (ah), "rI" (bh), "%rJ" (al), "rI" (bl), \
+ "rJ" ((al) >> 32), "rJ" ((bl) >> 32) \
+ __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ( \
+ "subcc %4,%5,%1\n" \
+ " subccc %6,%7,%%g0\n" \
+ " subc %2,%3,%0" \
+ : "=r" (sh), "=&r" (sl) \
+ : "%rJ" (ah), "rI" (bh), "%rJ" (al), "rI" (bl), \
+ "rJ" ((al) >> 32), "rJ" ((bl) >> 32) \
+ __CLOBBER_CC)
+#endif
+
#if defined (__vax__) && W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addl2 %5,%1\n\tadwc %3,%0" \