Lines Matching refs:r
521 u64 r[ECC_MAX_DIGITS * 2]; in vli_mmod_special() local
523 vli_set(r, product, ndigits * 2); in vli_mmod_special()
524 while (!vli_is_zero(r + ndigits, ndigits)) { in vli_mmod_special()
525 vli_umult(t, r + ndigits, c, ndigits); in vli_mmod_special()
526 vli_clear(r + ndigits, ndigits); in vli_mmod_special()
527 vli_add(r, r, t, ndigits * 2); in vli_mmod_special()
531 while (vli_cmp(r, t, ndigits * 2) >= 0) in vli_mmod_special()
532 vli_sub(r, r, t, ndigits * 2); in vli_mmod_special()
533 vli_set(result, r, ndigits); in vli_mmod_special()
555 u64 r[ECC_MAX_DIGITS * 2]; in vli_mmod_special2() local
563 vli_set(r, product, ndigits); in vli_mmod_special2()
566 vli_clear(r + ndigits, ndigits); in vli_mmod_special2()
567 carry = vli_is_negative(r, ndigits); in vli_mmod_special2()
569 r[ndigits - 1] &= (1ull << 63) - 1; in vli_mmod_special2()
582 vli_sub(r, r, qc, ndigits * 2); in vli_mmod_special2()
584 vli_add(r, r, qc, ndigits * 2); in vli_mmod_special2()
586 while (vli_is_negative(r, ndigits * 2)) in vli_mmod_special2()
587 vli_add(r, r, m, ndigits * 2); in vli_mmod_special2()
588 while (vli_cmp(r, m, ndigits * 2) >= 0) in vli_mmod_special2()
589 vli_sub(r, r, m, ndigits * 2); in vli_mmod_special2()
591 vli_set(result, r, ndigits); in vli_mmod_special2()
653 u64 r[ECC_MAX_DIGITS * 2]; in vli_mmod_barrett() local
659 vli_mult(r, mod, q + ndigits, ndigits); in vli_mmod_barrett()
660 vli_sub(r, product, r, ndigits * 2); in vli_mmod_barrett()
661 while (!vli_is_zero(r + ndigits, ndigits) || in vli_mmod_barrett()
662 vli_cmp(r, mod, ndigits) != -1) { in vli_mmod_barrett()
665 carry = vli_sub(r, r, mod, ndigits); in vli_mmod_barrett()
666 vli_usub(r + ndigits, r + ndigits, carry, ndigits); in vli_mmod_barrett()
668 vli_set(result, r, ndigits); in vli_mmod_barrett()