/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/ |
H A D | udivmodti4.c | 27 du_int un1, un0; // Norm. dividend LSD's in udiv128by64to64default() 30 du_int un64, un21, un10; // Dividend digit pairs in udiv128by64to64default() 39 un10 = u0 << s; // Shift dividend left in udiv128by64to64default() 50 // Break right half of dividend into two digits. in udiv128by64to64default() 102 utwords dividend; in __udivmodti4() local 103 dividend.all = a; in __udivmodti4() 108 if (divisor.all > dividend.all) { in __udivmodti4() 110 *rem = dividend.all; 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() [all …]
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | math64.h | 43 div64_u64_rem(uint64_t dividend, uint64_t divisor, uint64_t *remainder) in div64_u64_rem() argument 46 *remainder = dividend % divisor; in div64_u64_rem() 47 return (dividend / divisor); in div64_u64_rem() 51 div64_s64(int64_t dividend, int64_t divisor) in div64_s64() argument 54 return (dividend / divisor); in div64_s64() 58 div64_u64(uint64_t dividend, uint64_t divisor) in div64_u64() argument 61 return (dividend / divisor); in div64_u64() 65 div_u64_rem(uint64_t dividend, uint32_t divisor, uint32_t *remainder) in div_u64_rem() argument 68 *remainder = dividend % divisor; in div_u64_rem() 69 return (dividend / divisor); in div_u64_rem() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/sparc64/ |
H A D | divmod.m4 | 9 * dividend -- the thing being divided 21 * R -- the remainder so far -- initially == the dividend 27 * current estimate for non-large dividend is 29 * a large dividend is one greater than 2ˆ(31-TOPBITS) and takes a 35 define(dividend, `%o0') macro 92 orcc divisor,dividend,%g0 ! are either dividend or divisor negative 94 xor divisor,dividend,SIGN ! record sign of result in sign of SIGN 97 tst dividend 102 ! dividend < 0 103 neg dividend [all …]
|
H A D | modsi3.S | 8 * dividend -- the thing being divided 20 * R -- the remainder so far -- initially == the dividend 26 * current estimate for non-large dividend is 28 * a large dividend is one greater than 2ˆ(31-4 ) and takes a
|
H A D | divsi3.S | 8 * dividend -- the thing being divided 20 * R -- the remainder so far -- initially == the dividend 26 * current estimate for non-large dividend is 28 * a large dividend is one greater than 2ˆ(31-4 ) and takes a
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | ScaledNumber.cpp | 57 std::pair<uint32_t, int16_t> ScaledNumbers::divide32(uint32_t Dividend, in divide32() argument 59 assert(Dividend && "expected non-zero dividend"); in divide32() 62 // Use 64-bit math and canonicalize the dividend to gain precision. in divide32() 63 uint64_t Dividend64 = Dividend; in divide32() 80 std::pair<uint64_t, int16_t> ScaledNumbers::divide64(uint64_t Dividend, in divide64() argument 82 assert(Dividend && "expected non-zero dividend"); in divide64() 94 return std::make_pair(Dividend, Shift); in divide64() 96 // Maximize size of dividend. in divide64() 97 if (int Zeros = llvm::countl_zero(Dividend)) { in divide64() 99 Dividend <<= Zeros; in divide64() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | IntegerDivision.cpp | 27 /// remainder, which will have the sign of the dividend. Builder's insert point 32 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument 34 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedRemainderCode() 40 // ; %dividend_sgn = ashr i32 %dividend, 31 in generateSignedRemainderCode() 42 // ; %dvd_xor = xor i32 %dividend, %dividend_sgn in generateSignedRemainderCode() 46 // ; %urem = urem i32 %dividend, %divisor in generateSignedRemainderCode() 49 Dividend = Builder.CreateFreeze(Dividend); in generateSignedRemainderCode() 51 Value *DividendSign = Builder.CreateAShr(Dividend, Shift); in generateSignedRemainderCode() 53 Value *DvdXor = Builder.CreateXor(Dividend, DividendSign); in generateSignedRemainderCode() 73 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument [all …]
|
H A D | BypassSlowDivision.cpp | 145 /// Reuses previously-computed dividend or remainder from the current BB if 147 /// perform the optimization and caches the resulting dividend and remainder. 155 Value *Dividend = SlowDivOrRem->getOperand(0); in getReplacement() local 157 DivRemMapKey Key(isSignedOp(), Dividend, Divisor); in getReplacement() 266 Value *Dividend = SlowDivOrRem->getOperand(0); in createSlowBB() local 270 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB() 271 DivRemPair.Remainder = Builder.CreateSRem(Dividend, Divisor); in createSlowBB() 273 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB() 274 DivRemPair.Remainder = Builder.CreateURem(Dividend, Divisor); in createSlowBB() 290 Value *Dividend = SlowDivOrRem->getOperand(0); in createFastBB() local [all …]
|
/freebsd/sys/contrib/dev/rtw89/ |
H A D | util.h | 19 /* The result of negative dividend and positive divisor is undefined, but it 25 static inline s32 s32_div_u32_round_down(s32 dividend, u32 divisor, s32 *remainder) in s32_div_u32_round_down() 31 quotient = dividend / i_divisor; in s32_div_u32_round_down() 32 i_remainder = dividend % i_divisor; in s32_div_u32_round_down() 44 static inline s32 s32_div_u32_round_closest(s32 dividend, u32 divisor) in s32_div_u32_round_closest() 46 return s32_div_u32_round_down(dividend + divisor / 2, divisor, NULL); 23 s32_div_u32_round_down(s32 dividend,u32 divisor,s32 * remainder) s32_div_u32_round_down() argument 42 s32_div_u32_round_closest(s32 dividend,u32 divisor) s32_div_u32_round_closest() argument
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | BypassSlowDivision.h | 32 AssertingVH<Value> Dividend; member 38 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivRemMapKey() 43 return Val1.SignedOp == Val2.SignedOp && Val1.Dividend == Val2.Dividend && 57 static_cast<Value *>(Val.Dividend)) ^
|
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/hexagon/ |
H A D | udivdi3.S | 25 r6 = cl0(r1:0) // count leading 0's of dividend (numerator) 28 r3:2 = r1:0 // dividend is the initial remainder, r3:2 contains remainder 37 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb 41 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend 45 if (p0) jumpr r31 // if divisor > dividend, we're done, so return
|
H A D | udivmoddi4.S | 25 r6 = cl0(r1:0) // count leading 0's of dividend (numerator) 28 r3:2 = r1:0 // dividend is the initial remainder, r3:2 contains remainder 37 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb 41 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend 45 if (p0) jumpr r31 // if divisor > dividend, we're done, so return
|
H A D | umoddi3.S | 25 r6 = cl0(r1:0) // count leading 0's of dividend (numerator) 28 r3:2 = r1:0 // dividend is the initial remainder, r3:2 contains remainder 37 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb 41 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend 45 if (p0) jump .hexagon_umoddi3_return // if divisor > dividend, we're done, so return
|
H A D | divdi3.S | 32 r6 = cl0(r1:0) // count leading 0's of dividend (numerator) 35 r3:2 = r1:0 // dividend is the initial remainder, r3:2 contains remainder 45 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb 49 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend 53 if (p0) jump .hexagon_divdi3_return // if divisor > dividend, we're done, so return
|
H A D | moddi3.S | 31 r6 = cl0(r1:0) // count leading 0's of dividend (numerator) 34 r3:2 = r1:0 // dividend is the initial remainder, r3:2 contains remainder 43 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb 47 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend 51 if (p0) jump .hexagon_moddi3_return // if divisor > dividend, we're done, so return
|
/freebsd/sys/contrib/dev/acpica/components/utilities/ |
H A D | utmath.c | 431 * PARAMETERS: Dividend - 64-bit dividend 446 UINT64 Dividend, in AcpiUtShortDivide() argument 467 DividendOvl.Full = Dividend; in AcpiUtShortDivide() 498 * PARAMETERS: InDividend - Dividend 516 UINT64_OVERLAY Dividend; in AcpiUtDivide() local 539 Dividend.Full = InDividend; in AcpiUtDivide() 552 ACPI_DIV_64_BY_32 (0, Dividend.Part.Hi, Divisor.Part.Lo, in AcpiUtDivide() 555 ACPI_DIV_64_BY_32 (Partial1, Dividend.Part.Lo, Divisor.Part.Lo, in AcpiUtDivide() 566 NormalizedDividend = Dividend; in AcpiUtDivide() 599 if (Partial3.Part.Lo >= Dividend.Part.Hi) in AcpiUtDivide() [all …]
|
/freebsd/sys/contrib/zstd/lib/common/ |
H A D | zstd_deps.h | 64 * U64 ZSTD_div64(U64 dividend, U32 divisor) 70 #define ZSTD_div64(dividend, divisor) ((dividend) / (divisor)) argument
|
/freebsd/share/doc/usd/05.dc/ |
H A D | dc | 470 Zeros are appended or digits removed from the dividend to make 479 If the divisor is longer than the dividend, 482 two digits of the dividend. 489 from the dividend and the process is repeated to get 491 dividend is smaller than the divisor. 500 dividend at the end of the divide process. 502 sign as the dividend. 504 the maximum of the scale of the dividend and 736 to recreate the dividend from the quotient and remainder.
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | ScaledNumber.h | 137 /// \pre \c Dividend and \c Divisor are non-zero. 138 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor); 144 /// \pre \c Dividend and \c Divisor are non-zero. 145 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor); 153 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument 159 if (!Dividend) in getQuotient() 165 return divide64(Dividend, Divisor); in getQuotient() 166 return divide32(Dividend, Divisor); in getQuotient() 170 inline std::pair<uint32_t, int16_t> getQuotient32(uint32_t Dividend, in getQuotient32() argument 172 return getQuotient(Dividend, Divisor); in getQuotient32() [all …]
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/Instruction/RISCV/ |
H A D | EmulateInstructionRISCV.cpp | 1025 auto [dividend, divisor] = tup; in operator ()() 1030 if (dividend == INT64_MIN && divisor == -1) in operator ()() 1031 return inst.rd.Write(m_emu, dividend); in operator ()() 1033 return inst.rd.Write(m_emu, dividend / divisor); in operator ()() 1040 auto [dividend, divisor] = tup; in operator ()() 1045 return inst.rd.Write(m_emu, dividend / divisor); in operator ()() 1053 auto [dividend, divisor] = tup; in operator ()() 1056 return inst.rd.Write(m_emu, dividend); in operator ()() 1058 if (dividend == INT64_MIN && divisor == -1) in operator ()() 1061 return inst.rd.Write(m_emu, dividend % divisor); in operator ()() [all …]
|
/freebsd/crypto/openssl/crypto/bn/ |
H A D | bn_div.c | 248 * This is because zero-padded dividend, |num|, is tolerated, so that 249 * caller can pass dividend of public length(*), but with smaller amount 260 * - dividend is at least as "wide" as divisor, limb-wise, zero-padded 296 * inner loop iterations is invariant of dividend value, and that one in bn_div_fixed_top() 297 * doesn't need to compare dividend and divisor if they were originally in bn_div_fixed_top() 307 /* caller didn't pad dividend -> no constant-time guarantee... */ in bn_div_fixed_top()
|
/freebsd/sys/dev/axgbe/ |
H A D | xgbe-ptp.c | 226 u64 dividend; in xgbe_ptp_register() local 249 dividend = 50000000; in xgbe_ptp_register() 250 dividend <<= 32; in xgbe_ptp_register() 251 pdata->tstamp_addend = div_u64(dividend, pdata->ptpclk_rate); in xgbe_ptp_register()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/arm/ |
H A D | modsi3.S | 42 // Set aside the sign of the dividend. 51 // Apply sign of dividend to result and return.
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | DivRemPairs.cpp | 51 Value *Dividend, *XroundedDownToMultipleOfY; in matchExpandedRem() local 52 if (!match(&I, m_Sub(m_Value(Dividend), m_Value(XroundedDownToMultipleOfY)))) in matchExpandedRem() 60 m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)), in matchExpandedRem() 67 M.Key.Dividend = Dividend; in matchExpandedRem()
|
/freebsd/sys/dev/sound/pci/ |
H A D | csapcm.c | 195 * ulPhiIncr:ulOther = dividend:remainder((Fs,in * 2^26) / Fs,out) in csa_setplaysamplerate() 197 * dividend:remainder(ulOther / GOF_PER_SEC) in csa_setplaysamplerate() 257 * ulCoeffIncr = neg(dividend((Fs,out * 2^23) / Fs,in)) in csa_setcapturesamplerate() 258 * ulPhiIncr:ulOther = dividend:remainder((Fs,in * 2^26) / Fs,out) in csa_setcapturesamplerate() 260 * dividend:remainder(ulOther / GOF_PER_SEC) in csa_setcapturesamplerate() 261 * ulInitialDelay = dividend(((24 * Fs,in) + Fs,out - 1) / Fs,out) in csa_setcapturesamplerate()
|