Lines Matching refs:limb

131 typedef uint64_t limb;  typedef
132 typedef limb limb_aX __attribute((__aligned__(1)));
133 typedef limb felem[NLIMBS];
136 static const limb bottom57bits = 0x1ffffffffffffff;
137 static const limb bottom58bits = 0x3ffffffffffffff;
145 out[0] = (*((limb *) & in[0])) & bottom58bits; in bin66_to_felem()
163 (*((limb *) & out[0])) = in[0]; in felem_to_bin66()
247 static void felem_scalar(felem out, const felem in, limb scalar) in felem_scalar()
261 static void felem_scalar64(felem out, limb scalar) in felem_scalar64()
275 static void felem_scalar128(largefelem out, limb scalar) in felem_scalar128()
298 static const limb two62m3 = (((limb) 1) << 62) - (((limb) 1) << 5); in felem_neg()
299 static const limb two62m2 = (((limb) 1) << 62) - (((limb) 1) << 4); in felem_neg()
324 static const limb two62m3 = (((limb) 1) << 62) - (((limb) 1) << 5); in felem_diff64()
325 static const limb two62m2 = (((limb) 1) << 62) - (((limb) 1) << 4); in felem_diff64()
355 static const limb two63m6 = (((limb) 1) << 63) - (((limb) 1) << 6); in felem_diff_128_64()
356 static const limb two63m5 = (((limb) 1) << 63) - (((limb) 1) << 5); in felem_diff_128_64()
594 static const limb bottom52bits = 0xfffffffffffff;
607 out[0] = ((limb) in[0]) & bottom58bits; in felem_reduce()
608 out[1] = ((limb) in[1]) & bottom58bits; in felem_reduce()
609 out[2] = ((limb) in[2]) & bottom58bits; in felem_reduce()
610 out[3] = ((limb) in[3]) & bottom58bits; in felem_reduce()
611 out[4] = ((limb) in[4]) & bottom58bits; in felem_reduce()
612 out[5] = ((limb) in[5]) & bottom58bits; in felem_reduce()
613 out[6] = ((limb) in[6]) & bottom58bits; in felem_reduce()
614 out[7] = ((limb) in[7]) & bottom58bits; in felem_reduce()
615 out[8] = ((limb) in[8]) & bottom58bits; in felem_reduce()
619 out[1] += ((limb) in[0]) >> 58; in felem_reduce()
620 out[1] += (((limb) (in[0] >> 64)) & bottom52bits) << 6; in felem_reduce()
625 out[2] += ((limb) (in[0] >> 64)) >> 52; in felem_reduce()
627 out[2] += ((limb) in[1]) >> 58; in felem_reduce()
628 out[2] += (((limb) (in[1] >> 64)) & bottom52bits) << 6; in felem_reduce()
629 out[3] += ((limb) (in[1] >> 64)) >> 52; in felem_reduce()
631 out[3] += ((limb) in[2]) >> 58; in felem_reduce()
632 out[3] += (((limb) (in[2] >> 64)) & bottom52bits) << 6; in felem_reduce()
633 out[4] += ((limb) (in[2] >> 64)) >> 52; in felem_reduce()
635 out[4] += ((limb) in[3]) >> 58; in felem_reduce()
636 out[4] += (((limb) (in[3] >> 64)) & bottom52bits) << 6; in felem_reduce()
637 out[5] += ((limb) (in[3] >> 64)) >> 52; in felem_reduce()
639 out[5] += ((limb) in[4]) >> 58; in felem_reduce()
640 out[5] += (((limb) (in[4] >> 64)) & bottom52bits) << 6; in felem_reduce()
641 out[6] += ((limb) (in[4] >> 64)) >> 52; in felem_reduce()
643 out[6] += ((limb) in[5]) >> 58; in felem_reduce()
644 out[6] += (((limb) (in[5] >> 64)) & bottom52bits) << 6; in felem_reduce()
645 out[7] += ((limb) (in[5] >> 64)) >> 52; in felem_reduce()
647 out[7] += ((limb) in[6]) >> 58; in felem_reduce()
648 out[7] += (((limb) (in[6] >> 64)) & bottom52bits) << 6; in felem_reduce()
649 out[8] += ((limb) (in[6] >> 64)) >> 52; in felem_reduce()
651 out[8] += ((limb) in[7]) >> 58; in felem_reduce()
652 out[8] += (((limb) (in[7] >> 64)) & bottom52bits) << 6; in felem_reduce()
657 overflow1 = ((limb) (in[7] >> 64)) >> 52; in felem_reduce()
659 overflow1 += ((limb) in[8]) >> 58; in felem_reduce()
660 overflow1 += (((limb) (in[8] >> 64)) & bottom52bits) << 6; in felem_reduce()
661 overflow2 = ((limb) (in[8] >> 64)) >> 52; in felem_reduce()
863 static limb felem_is_zero(const felem in) in felem_is_zero()
866 limb is_zero, is_p; in felem_is_zero()
933 return (int)(felem_is_zero(in) & ((limb) 1)); in felem_is_zero_int()
943 limb is_p, is_greater, sign; in felem_contract()
944 static const limb two58 = ((limb) 1) << 58; in felem_contract()
1185 static void copy_conditional(felem out, const felem in, limb mask) in copy_conditional()
1189 const limb tmp = mask & (in[i] ^ out[i]); in copy_conditional()
1212 limb x_equal, y_equal, z1_is_zero, z2_is_zero; in point_add()
1213 limb points_equal; in point_add()
1545 static void select_point(const limb idx, unsigned int size, in select_point()
1549 limb *outlimbs = &out[0][0]; in select_point()
1554 const limb *inlimbs = &pre_comp[i][0][0]; in select_point()
1555 limb mask = i ^ idx; in select_point()
1590 limb bits; in batch_mul()
1646 copy_conditional(tmp[1], tmp[3], (-(limb) sign)); in batch_mul()