Lines Matching refs:dp

119     mp_digit *dp;  member
125 #define mp_iseven(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
126 #define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
247 tmpa = a->dp; in s_mp_add()
250 tmpb = b->dp; in s_mp_add()
253 tmpc = c->dp; in s_mp_add()
274 *tmpc = x->dp[i] + u; in s_mp_add()
322 tmpa = a->dp; in s_mp_sub()
323 tmpb = b->dp; in s_mp_sub()
324 tmpc = c->dp; in s_mp_sub()
373 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC); in mp_init()
374 if (a->dp == NULL) { in mp_init()
380 a->dp[i] = 0; in mp_init()
400 if (a->dp != NULL) { in mp_clear()
403 a->dp[i] = 0; in mp_clear()
407 XFREE(a->dp); in mp_clear()
410 a->dp = NULL; in mp_clear()
719 if (a->dp[0] > b) { in mp_cmp_d()
721 } else if (a->dp[0] < b) { in mp_cmp_d()
944 tmpa = a->dp + (a->used - 1); in mp_cmp_mag()
947 tmpb = b->dp + (a->used - 1); in mp_cmp_mag()
986 a->dp[0] |= *b++; in mp_read_unsigned_bin()
989 a->dp[0] = (*b & MP_MASK); in mp_read_unsigned_bin()
990 a->dp[1] |= ((*b++ >> 7U) & 1); in mp_read_unsigned_bin()
1013 b[x++] = (unsigned char) (t.dp[0] & 255); in mp_to_unsigned_bin()
1015 b[x++] = (unsigned char) (t.dp[0] | ((t.dp[1] & 0x01) << 7)); in mp_to_unsigned_bin()
1081 tmpc = c->dp + (c->used - 1); in mp_div_2d()
1128 tmp = a->dp; in mp_zero()
1160 tmpa = a->dp; in mp_copy()
1163 tmpb = b->dp; in mp_copy()
1206 bottom = a->dp; in mp_rshd()
1209 top = a->dp + b; in mp_rshd()
1263 while (a->used > 0 && a->dp[a->used - 1] == 0) { in mp_clamp()
1292 tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * size); in mp_grow()
1299 a->dp = tmp; in mp_grow()
1305 a->dp[i] = 0; in mp_grow()
1342 a->dp[0] = b & MP_MASK; in mp_set()
1343 a->used = (a->dp[0] != 0) ? 1 : 0; in mp_set()
1367 tmpa = a->dp + b->used - 1; in mp_div_2()
1370 tmpb = b->dp + b->used - 1; in mp_div_2()
1386 tmpb = b->dp + b->used; in mp_div_2()
1438 tmpc = c->dp; in mp_mul_2d()
1456 c->dp[(c->used)++] = r; in mp_mul_2d()
1545 top = a->dp + a->used - 1; in mp_lshd()
1548 bottom = a->dp + a->used - 1 - b; in mp_lshd()
1559 top = a->dp; in mp_lshd()
1584 q = a->dp[a->used - 1]; in mp_count_bits()
1618 c->dp[x] = 0; in mp_mod_2d()
1621 c->dp[b / DIGIT_BIT] &= in mp_mod_2d()
1787 ++(q.dp[n - t]); in mp_div()
1804 if (x.dp[i] == y.dp[t]) { 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()
1809 tmp |= ((mp_word) x.dp[i - 1]); in mp_div()
1810 tmp /= ((mp_word) y.dp[t]); in mp_div()
1813 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
1821 q.dp[i - t - 1] = (q.dp[i - t - 1] + 1) & MP_MASK; in mp_div()
1823 q.dp[i - t - 1] = (q.dp[i - t - 1] - 1) & MP_MASK; in mp_div()
1827 t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1]; in mp_div()
1828 t1.dp[1] = y.dp[t]; in mp_div()
1830 if ((res = mp_mul_d (&t1, q.dp[i - t - 1], &t1)) != MP_OKAY) { in mp_div()
1835 t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2]; in mp_div()
1836 t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1]; in mp_div()
1837 t2.dp[2] = x.dp[i]; in mp_div()
1842 if ((res = mp_mul_d (&y, q.dp[i - t - 1], &t1)) != MP_OKAY) { in mp_div()
1866 q.dp[i - t - 1] = (q.dp[i - t - 1] - 1UL) & MP_MASK; in mp_div()
2039 buf = X->dp[digidx--]; in s_mp_exptmod()
2263 a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT); in mp_2expt()
2404 tmpx = a->dp[ix]; in s_mp_mul_digs()
2407 tmpt = t.dp + ix; in s_mp_mul_digs()
2410 tmpy = b->dp; in s_mp_mul_digs()
2484 tmpx = a->dp + tx; in fast_s_mp_mul_digs()
2485 tmpy = b->dp + ty; in fast_s_mp_mul_digs()
2511 tmpc = c->dp; in fast_s_mp_mul_digs()
2537 a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * size); in mp_init_size()
2538 if (a->dp == NULL) { in mp_init_size()
2549 a->dp[x] = 0; in mp_init_size()
2576 r = ((mp_word) t.dp[2*ix]) + in s_mp_sqr()
2577 ((mp_word)a->dp[ix])*((mp_word)a->dp[ix]); in s_mp_sqr()
2580 t.dp[ix+ix] = (mp_digit) (r & ((mp_word) MP_MASK)); in s_mp_sqr()
2586 tmpx = a->dp[ix]; in s_mp_sqr()
2589 tmpt = t.dp + (2*ix + 1); in s_mp_sqr()
2593 r = ((mp_word)tmpx) * ((mp_word)a->dp[iy]); in s_mp_sqr()
2653 tmpx = a->dp[ix]; in s_mp_mul_high_digs()
2656 tmpt = &(t.dp[digs]); in s_mp_mul_high_digs()
2659 tmpy = b->dp + (digs - ix); in s_mp_mul_high_digs()
2697 b = n->dp[0]; in mp_montgomery_setup()
2759 tmpx = x->dp; in fast_mp_montgomery_reduce()
2805 tmpn = n->dp; in fast_mp_montgomery_reduce()
2848 tmpx = x->dp; in fast_mp_montgomery_reduce()
2899 tmpa = a->dp; in mp_mul_2()
2902 tmpb = b->dp; in mp_mul_2()
2932 tmpb = b->dp + b->used; in mp_mul_2()
3172 buf = X->dp[digidx--]; in mp_exptmod_fast()
3323 tmpx = a->dp + tx; in fast_s_mp_sqr()
3324 tmpy = a->dp + ty; in fast_s_mp_sqr()
3347 _W += ((mp_word)a->dp[ix>>1])*((mp_word)a->dp[ix>>1]); in fast_s_mp_sqr()
3363 tmpb = b->dp; in fast_s_mp_sqr()
3402 tmpa = a->dp; in mp_mul_d()
3405 tmpc = c->dp; in mp_mul_d()