Lines Matching +full:low +full:- +full:to +full:- +full:high

1 //===-- udivmodti4.c - Implement __udivmodti4 -----------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
38 un64 = (u1 << s) | (u0 >> (n_udword_bits - s)); in udiv128by64to64default()
46 // Break divisor up into two 32-bit digits. in udiv128by64to64default()
56 rhat = un64 - q1 * vn1; in udiv128by64to64default()
60 q1 = q1 - 1; in udiv128by64to64default()
66 un21 = un64 * b + un1 - q1 * v; in udiv128by64to64default()
70 rhat = un21 - q0 * vn1; in udiv128by64to64default()
74 q0 = q0 - 1; in udiv128by64to64default()
80 *r = (un21 * b + un0 - q0 * v) >> s; in udiv128by64to64default()
114 if (divisor.s.high == 0) { in __udivmodti4()
115 remainder.s.high = 0; in __udivmodti4()
116 if (dividend.s.high < divisor.s.low) { in __udivmodti4()
118 quotient.s.low = udiv128by64to64(dividend.s.high, dividend.s.low, in __udivmodti4()
119 divisor.s.low, &remainder.s.low); in __udivmodti4()
120 quotient.s.high = 0; in __udivmodti4()
122 // First, divide with the high part to get the remainder in dividend.s.high. in __udivmodti4()
123 // After that dividend.s.high < divisor.s.low. in __udivmodti4()
124 quotient.s.high = dividend.s.high / divisor.s.low; in __udivmodti4()
125 dividend.s.high = dividend.s.high % divisor.s.low; in __udivmodti4()
126 quotient.s.low = udiv128by64to64(dividend.s.high, dividend.s.low, in __udivmodti4()
127 divisor.s.low, &remainder.s.low); in __udivmodti4()
135 __builtin_clzll(divisor.s.high) - __builtin_clzll(dividend.s.high); in __udivmodti4()
137 quotient.s.high = 0; in __udivmodti4()
138 quotient.s.low = 0; in __udivmodti4()
139 for (; shift >= 0; --shift) { in __udivmodti4()
140 quotient.s.low <<= 1; in __udivmodti4()
144 // dividend.all -= divisor.all; in __udivmodti4()
148 (ti_int)(divisor.all - dividend.all - 1) >> (n_utword_bits - 1); in __udivmodti4()
149 quotient.s.low |= s & 1; in __udivmodti4()
150 dividend.all -= divisor.all & s; in __udivmodti4()