Givaro 4.2.1
reclonglong.h File Reference

Macros

#define recint__BITS4   (W_TYPE_SIZE / 4)
 
#define recint__ll_B   ((UWtype) 1 << (W_TYPE_SIZE / 2))
 
#define recint__ll_lowpart(t)
 
#define recint__ll_highpart(t)
 
#define recint__MPN(x)
 
#define recint_count_leading_zeros_gcc_clz(count, x)
 
#define recint_count_trailing_zeros_gcc_ctz(count, x)
 
#define __umulsidi3(u, v)
 
#define mpn_recint_umul_ppmm   recint__MPN(recint_umul_ppmm)
 
#define mpn_recint_umul_ppmm_r   recint__MPN(recint_umul_ppmm_r)
 
#define mpn_recint_udiv_qrnnd   recint__MPN(recint_udiv_qrnnd)
 
#define mpn_recint_udiv_qrnnd_r   recint__MPN(recint_udiv_qrnnd_r)
 
#define recint_add_ssaaaa(sh, sl, ah, al, bh, bl)
 
#define recint_sub_ddmmss(sh, sl, ah, al, bh, bl)
 
#define recint_umul_ppmm(w1, w0, u, v)
 
#define recint_smul_ppmm(w1, w0, u, v)
 
#define __recint_udiv_qrnnd_c(q, r, n1, n0, d)
 
#define UDIV_NEEDS_NORMALIZATION   1
 
#define recint_udiv_qrnnd   __recint_udiv_qrnnd_c
 
#define recint_count_leading_zeros(count, x)
 
#define RECINT_COUNT_LEADING_ZEROS_0   (W_TYPE_SIZE - 1)
 
#define RECINT_COUNT_LEADING_ZEROS_NEED_CLZ_TAB
 
#define RECINT_COUNT_LEADING_ZEROS_SLOW
 
#define recint_count_trailing_zeros(count, x)
 
#define UDIV_PREINV_ALWAYS   0
 
#define UMUL_TIME   1
 
#define UDIV_TIME   UMUL_TIME
 

Functions

UWtype __recint_umul_ppmm (UWtype *, UWtype, UWtype)
 
UWtype __recint_umul_ppmm_r (UWtype, UWtype, UWtype *)
 
UWtype __recint_udiv_qrnnd (UWtype *, UWtype, UWtype, UWtype)
 
UWtype __recint_udiv_qrnnd_r (UWtype, UWtype, UWtype, UWtype *)
 

Variables

const unsigned char __clz_tab [129]
 

Macro Definition Documentation

◆ recint__BITS4

#define recint__BITS4   (W_TYPE_SIZE / 4)

◆ recint__ll_B

#define recint__ll_B   ((UWtype) 1 << (W_TYPE_SIZE / 2))

◆ recint__ll_lowpart

#define recint__ll_lowpart ( t)
Value:
((UWtype) (t) & (recint__ll_B - 1))
#define recint__ll_B

◆ recint__ll_highpart

#define recint__ll_highpart ( t)
Value:
((UWtype) (t) >> (W_TYPE_SIZE / 2))
#define W_TYPE_SIZE
Definition recdefine.h:144

◆ recint__MPN

#define recint__MPN ( x)
Value:
__##x

◆ recint_count_leading_zeros_gcc_clz

#define recint_count_leading_zeros_gcc_clz ( count,
x )
Value:
do { \
(count) = __builtin_clzl (x); \
} while (0)

◆ recint_count_trailing_zeros_gcc_ctz

#define recint_count_trailing_zeros_gcc_ctz ( count,
x )
Value:
do { \
(count) = __builtin_ctzl (x); \
} while (0)

◆ __umulsidi3

#define __umulsidi3 ( u,
v )
Value:
({UWtype __hi, __lo; \
recint_umul_ppmm (__hi, __lo, u, v); \
((UDWtype) __hi << W_TYPE_SIZE) | __lo; })

◆ mpn_recint_umul_ppmm

#define mpn_recint_umul_ppmm   recint__MPN(recint_umul_ppmm)

◆ mpn_recint_umul_ppmm_r

#define mpn_recint_umul_ppmm_r   recint__MPN(recint_umul_ppmm_r)

◆ mpn_recint_udiv_qrnnd

#define mpn_recint_udiv_qrnnd   recint__MPN(recint_udiv_qrnnd)

◆ mpn_recint_udiv_qrnnd_r

#define mpn_recint_udiv_qrnnd_r   recint__MPN(recint_udiv_qrnnd_r)

◆ recint_add_ssaaaa

#define recint_add_ssaaaa ( sh,
sl,
ah,
al,
bh,
bl )
Value:
do { \
UWtype __x; \
__x = (al) + (bl); \
(sh) = (ah) + (bh) + (__x < (al)); \
(sl) = __x; \
} while (0)

◆ recint_sub_ddmmss

#define recint_sub_ddmmss ( sh,
sl,
ah,
al,
bh,
bl )
Value:
do { \
UWtype __x; \
__x = (al) - (bl); \
(sh) = (ah) - (bh) - ((al) < (bl)); \
(sl) = __x; \
} while (0)

◆ recint_umul_ppmm

#define recint_umul_ppmm ( w1,
w0,
u,
v )
Value:
do { \
UWtype __x0, __x1, __x2, __x3; \
UHWtype __ul, __vl, __uh, __vh; \
UWtype __u = (u), __v = (v); \
\
__ul = recint__ll_lowpart (__u); \
__uh = recint__ll_highpart (__u); \
__vl = recint__ll_lowpart (__v); \
__vh = recint__ll_highpart (__v); \
\
__x0 = (UWtype) __ul * __vl; \
__x1 = (UWtype) __ul * __vh; \
__x2 = (UWtype) __uh * __vl; \
__x3 = (UWtype) __uh * __vh; \
\
__x1 += recint__ll_highpart (__x0);/* this can't give carry */ \
__x1 += __x2; /* but this indeed can */ \
if (__x1 < __x2) /* did we get it? */ \
__x3 += recint__ll_B; /* yes, add it in the proper pos. */ \
\
(w1) = __x3 + recint__ll_highpart (__x1); \
(w0) = (__x1 << W_TYPE_SIZE/2) + recint__ll_lowpart (__x0); \
} while (0)
#define recint__ll_lowpart(t)
#define recint__ll_highpart(t)

◆ recint_smul_ppmm

#define recint_smul_ppmm ( w1,
w0,
u,
v )
Value:
do { \
UWtype __w1; \
UWtype __xm0 = (u), __xm1 = (v); \
recint_umul_ppmm (__w1, w0, __xm0, __xm1); \
(w1) = __w1 - (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \
- (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \
} while (0)

◆ __recint_udiv_qrnnd_c

#define __recint_udiv_qrnnd_c ( q,
r,
n1,
n0,
d )

◆ UDIV_NEEDS_NORMALIZATION

#define UDIV_NEEDS_NORMALIZATION   1

◆ recint_udiv_qrnnd

#define recint_udiv_qrnnd   __recint_udiv_qrnnd_c

◆ recint_count_leading_zeros

#define recint_count_leading_zeros ( count,
x )
Value:
do { \
UWtype __xr = (x); \
UWtype __a; \
\
if (W_TYPE_SIZE == 32) \
{ \
__a = __xr < ((UWtype) 1 << 2*recint__BITS4) \
? (__xr < ((UWtype) 1 << recint__BITS4) ? 1 : recint__BITS4 + 1) \
: (__xr < ((UWtype) 1 << 3*recint__BITS4) ? 2*recint__BITS4 + 1 \
: 3*recint__BITS4 + 1); \
} \
else \
{ \
for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \
if (((__xr >> __a) & 0xff) != 0) \
break; \
++__a; \
} \
\
(count) = W_TYPE_SIZE + 1 - __a - __clz_tab[__xr >> __a]; \
} while (0)
#define recint__BITS4
const unsigned char __clz_tab[129]

◆ RECINT_COUNT_LEADING_ZEROS_0

#define RECINT_COUNT_LEADING_ZEROS_0   (W_TYPE_SIZE - 1)

◆ RECINT_COUNT_LEADING_ZEROS_NEED_CLZ_TAB

#define RECINT_COUNT_LEADING_ZEROS_NEED_CLZ_TAB

◆ RECINT_COUNT_LEADING_ZEROS_SLOW

#define RECINT_COUNT_LEADING_ZEROS_SLOW

◆ recint_count_trailing_zeros

#define recint_count_trailing_zeros ( count,
x )
Value:
do { \
UWtype __ctz_x = (x); \
int __ctz_c; \
\
if (LIKELY ((__ctz_x & 0xff) != 0)) \
(count) = __clz_tab[__ctz_x & -__ctz_x] - 2; \
else \
{ \
for (__ctz_c = 8 - 2; __ctz_c < W_TYPE_SIZE - 2; __ctz_c += 8) \
{ \
__ctz_x >>= 8; \
if (LIKELY ((__ctz_x & 0xff) != 0)) \
break; \
} \
\
(count) = __ctz_c + __clz_tab[__ctz_x & -__ctz_x]; \
} \
} while (0)

◆ UDIV_PREINV_ALWAYS

#define UDIV_PREINV_ALWAYS   0

◆ UMUL_TIME

#define UMUL_TIME   1

◆ UDIV_TIME

#define UDIV_TIME   UMUL_TIME

Function Documentation

◆ __recint_umul_ppmm()

UWtype __recint_umul_ppmm ( UWtype * ,
UWtype ,
UWtype  )
extern

◆ __recint_umul_ppmm_r()

UWtype __recint_umul_ppmm_r ( UWtype ,
UWtype ,
UWtype *  )
extern

◆ __recint_udiv_qrnnd()

UWtype __recint_udiv_qrnnd ( UWtype * ,
UWtype ,
UWtype ,
UWtype  )
extern

◆ __recint_udiv_qrnnd_r()

UWtype __recint_udiv_qrnnd_r ( UWtype ,
UWtype ,
UWtype ,
UWtype *  )
extern

Variable Documentation

◆ __clz_tab

const unsigned char __clz_tab[129]
extern