Lines Matching refs:DIGIT_BIT
74 #define DIGIT_BIT 28 macro
83 #define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
114 #define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
262 u = *tmpc >> ((mp_digit)DIGIT_BIT); in s_mp_add()
277 u = *tmpc >> ((mp_digit)DIGIT_BIT); in s_mp_add()
519 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_mul()
1065 if (b >= (int)DIGIT_BIT) { in mp_div_2d()
1066 mp_rshd (c, b / DIGIT_BIT); in mp_div_2d()
1070 D = (mp_digit) (b % DIGIT_BIT); in mp_div_2d()
1078 shift = DIGIT_BIT - D; in mp_div_2d()
1379 *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1)); in mp_div_2()
1412 if (c->alloc < (int)(c->used + b/DIGIT_BIT + 1)) { in mp_mul_2d()
1413 if ((res = mp_grow (c, c->used + b / DIGIT_BIT + 1)) != MP_OKAY) { in mp_mul_2d()
1419 if (b >= (int)DIGIT_BIT) { in mp_mul_2d()
1420 if ((res = mp_lshd (c, b / DIGIT_BIT)) != MP_OKAY) { in mp_mul_2d()
1426 d = (mp_digit) (b % DIGIT_BIT); in mp_mul_2d()
1435 shift = DIGIT_BIT - d; in mp_mul_2d()
1581 r = (a->used - 1) * DIGIT_BIT; in mp_count_bits()
1606 if (b >= (int) (a->used * DIGIT_BIT)) { in mp_mod_2d()
1617 for (x = (b / DIGIT_BIT) + ((b % DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) { in mp_mod_2d()
1621 c->dp[b / DIGIT_BIT] &= in mp_mod_2d()
1622 (mp_digit) ((((mp_digit) 1) << (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1)); in mp_mod_2d()
1764 norm = mp_count_bits(&y) % DIGIT_BIT; in mp_div()
1765 if (norm < (int)(DIGIT_BIT-1)) { in mp_div()
1766 norm = (DIGIT_BIT-1) - norm; in mp_div()
1805 q.dp[i - t - 1] = ((((mp_digit)1) << DIGIT_BIT) - 1); in mp_div()
1808 tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT); in mp_div()
2040 bitcnt = (int) DIGIT_BIT; in s_mp_exptmod()
2044 y = (buf >> (mp_digit)(DIGIT_BIT - 1)) & 1; in s_mp_exptmod()
2158 (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) { in mp_sqr()
2255 if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) { in mp_2expt()
2260 a->used = b / DIGIT_BIT + 1; in mp_2expt()
2263 a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT); in mp_2expt()
2277 if ((res = mp_2expt (a, b->used * 2 * DIGIT_BIT)) != MP_OKAY) { in mp_reduce_setup()
2303 if (((unsigned long) um) > (((mp_digit)1) << (DIGIT_BIT - 1))) { in mp_reduce()
2329 if ((res = mp_mod_2d (x, DIGIT_BIT * (um + 1), x)) != MP_OKAY) { in mp_reduce()
2384 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in s_mp_mul_digs()
2423 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_digs()
2502 _W = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_mul_digs()
2583 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2604 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2610 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2636 && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in s_mp_mul_high_digs()
2671 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_high_digs()
2716 *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK; in mp_montgomery_setup()
2817 W[ix + 1] += W[ix] >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
2837 *_W++ += *_W1++ >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
2911 rr = *tmpa >> ((mp_digit)(DIGIT_BIT - 1)); in mp_mul_2()
2956 bits = mp_count_bits (b) % DIGIT_BIT; in mp_montgomery_calc_normalization()
2959 if ((res = mp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1)) != MP_OKAY) { in mp_montgomery_calc_normalization()
2969 for (x = bits - 1; x < (int)DIGIT_BIT; x++) { in mp_montgomery_calc_normalization()
3063 P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_exptmod_fast()
3173 bitcnt = (int)DIGIT_BIT; in mp_exptmod_fast()
3177 y = (mp_digit)(buf >> (DIGIT_BIT - 1)) & 1; in mp_exptmod_fast()
3354 W1 = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_sqr()
3419 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in mp_mul_d()