Lines Matching +full:32 +full:m
30 const uint32_t *m, uint32_t m0i) in br_i31_montymul() argument
34 * d <- (d + xu*y + f*m) / 2^31 in br_i31_montymul()
36 * Thus, if d <= 2*m-1 on input, then: in br_i31_montymul()
37 * 2*m-1 + 2*(2^31-1)*m <= (2^32)*m-1 in br_i31_montymul()
38 * and the new d value is less than 2*m. in br_i31_montymul()
46 len = (m[0] + 31) >> 5; in br_i31_montymul()
48 br_i31_zero(d, m[0]); in br_i31_montymul()
52 * The carry for each operation fits on 32 bits: in br_i31_montymul()
55 * f*m[v+1] <= (2^31-1)*(2^31-1) in br_i31_montymul()
56 * r <= 2^32-1 in br_i31_montymul()
57 * (2^31-1) + 2*(2^31-1)*(2^31-1) + (2^32-1) = 2^63 - 2^31 in br_i31_montymul()
58 * After division by 2^31, the new r is then at most 2^32-1 in br_i31_montymul()
60 * Using a 32-bit carry has performance benefits on 32-bit in br_i31_montymul()
80 + MUL31(f, m[v + 1]) + r; in br_i31_montymul()
84 + MUL31(f, m[v + 2]) + r; in br_i31_montymul()
88 + MUL31(f, m[v + 3]) + r; in br_i31_montymul()
92 + MUL31(f, m[v + 4]) + r; in br_i31_montymul()
100 + MUL31(f, m[v + 1]) + r; in br_i31_montymul()
107 * the old dh with the carry MUST fit on 32 bits, and in br_i31_montymul()
120 d[0] = m[0]; in br_i31_montymul()
123 * d[] may still be greater than m[] at that point; notably, the in br_i31_montymul()
126 br_i31_sub(d, m, NEQ(dh, 0) | NOT(br_i31_sub(d, m, 0))); in br_i31_montymul()