From b7eefc8b7d07020a637937c7038d4fdba6bc594f Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Sun, 7 Apr 2013 22:44:18 +0200 Subject: (sparc64): Define umul_ppmm, add_ssaaaa, and count_leading_zeros conditionally under the symbol__sparc_vis3. --- longlong.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'longlong.h') diff --git a/longlong.h b/longlong.h index ca9d54c39..45474d195 100644 --- a/longlong.h +++ b/longlong.h @@ -1757,6 +1757,25 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype); : "rJ" (ah), "rI" (bh), "rJ" (al), "rI" (bl), \ "rJ" ((al) >> 32), "rI" ((bl) >> 32) \ __CLOBBER_CC) +#ifdef __sparc_vis3 +#undef add_ssaaaa +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ( \ + "addcc %r4, %5, %1\n" \ + " addxc %r2, %r3, %0" \ + : "=r" (sh), "=&r" (sl) \ + : "rJ" (ah), "rJ" (bh), "%rJ" (al), "rI" (bl) __CLOBBER_CC) +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + UDItype __m0 = (m0), __m1 = (m1); \ + (pl) = __m0 * __m1; \ + __asm__ ("umulxhi\t%2, %1, %0" \ + : "=r" (ph) \ + : "%r" (__m0), "r" (__m1)); \ + } while (0) +#define count_leading_zeros(count, x) \ + __asm__ ("lzd\t%1,%0" : "=r" (count) : "r" (x)) +#endif #endif #if (defined (__vax) || defined (__vax__)) && W_TYPE_SIZE == 32 -- cgit v1.2.1