Lines Matching refs:mp_word
66 typedef unsigned long mp_word __attribute__((mode(TI))); typedef
72 typedef u64 mp_word; typedef
115 #define MP_WARRAY (1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
514 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_mul()
1775 mp_word tmp; in mp_div()
1776 tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT); in mp_div()
1777 tmp |= ((mp_word) x.dp[i - 1]); in mp_div()
1778 tmp /= ((mp_word) y.dp[t]); in mp_div()
1779 if (tmp > (mp_word) MP_MASK) in mp_div()
1781 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
2124 (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) { in mp_sqr()
2338 mp_word r; in s_mp_mul_digs()
2345 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in s_mp_mul_digs()
2377 r = ((mp_word)*tmpt) + in s_mp_mul_digs()
2378 ((mp_word)tmpx) * ((mp_word)*tmpy++) + in s_mp_mul_digs()
2379 ((mp_word) u); in s_mp_mul_digs()
2382 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_mul_digs()
2385 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_digs()
2422 register mp_word _W; in fast_s_mp_mul_digs()
2457 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); in fast_s_mp_mul_digs()
2465 _W = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_mul_digs()
2524 mp_word r; in s_mp_sqr()
2538 r = ((mp_word) t.dp[2*ix]) + in s_mp_sqr()
2539 ((mp_word)a->dp[ix])*((mp_word)a->dp[ix]); in s_mp_sqr()
2542 t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2545 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2555 r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]); in s_mp_sqr()
2560 r = ((mp_word) *tmpt) + r + r + ((mp_word) u); in s_mp_sqr()
2563 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2566 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2570 r = ((mp_word) *tmpt) + ((mp_word) u); in s_mp_sqr()
2571 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2572 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); in s_mp_sqr()
2591 mp_word r; in s_mp_mul_high_digs()
2597 && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in s_mp_mul_high_digs()
2624 r = ((mp_word)*tmpt) + in s_mp_mul_high_digs()
2625 ((mp_word)tmpx) * ((mp_word)*tmpy++) + in s_mp_mul_high_digs()
2626 ((mp_word) u); in s_mp_mul_high_digs()
2629 *tmpt++ = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_mul_high_digs()
2632 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in s_mp_mul_high_digs()
2677 *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK; in mp_montgomery_setup()
2696 mp_word W[MP_WARRAY]; in fast_mp_montgomery_reduce()
2712 register mp_word *_W; in fast_mp_montgomery_reduce()
2762 register mp_word *_W; in fast_mp_montgomery_reduce()
2772 *_W++ += ((mp_word)mu) * ((mp_word)*tmpn++); in fast_mp_montgomery_reduce()
2777 W[ix + 1] += W[ix] >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
2786 register mp_word *_W, *_W1; in fast_mp_montgomery_reduce()
2797 *_W++ += *_W1++ >> ((mp_word) DIGIT_BIT); in fast_mp_montgomery_reduce()
2814 *tmpx++ = (mp_digit)(*_W++ & ((mp_word) MP_MASK)); in fast_mp_montgomery_reduce()
3020 P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { in mp_exptmod_fast()
3254 mp_word W1; in fast_s_mp_sqr()
3268 mp_word _W; in fast_s_mp_sqr()
3295 _W += ((mp_word)*tmpx++)*((mp_word)*tmpy--); in fast_s_mp_sqr()
3303 _W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]); in fast_s_mp_sqr()
3310 W1 = _W >> ((mp_word)DIGIT_BIT); in fast_s_mp_sqr()
3341 mp_word r; in mp_mul_d()
3369 r = ((mp_word) u) + ((mp_word)*tmpa++) * ((mp_word)b); in mp_mul_d()
3372 *tmpc++ = (mp_digit) (r & ((mp_word) MP_MASK)); in mp_mul_d()
3375 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT)); in mp_mul_d()