Home
last modified time | relevance | path

Searched refs:divisor (Results 1 – 25 of 100) sorted by relevance

1234

/openbsd/src/gnu/gcc/gcc/config/arm/
Dlib1funcs.asm327 divisor .req r1 label
342 .macro ARM_DIV_BODY dividend, divisor, result, curbit
347 clz \result, \divisor
357 cmp \dividend, \divisor, lsl #shift
359 subcs \dividend, \dividend, \divisor, lsl #shift
365 clz \curbit, \divisor
369 mov \divisor, \divisor, lsl \result
375 @ Initially shift the divisor left 3 bits if possible,
379 tst \divisor, #0xe0000000
380 moveq \divisor, \divisor, lsl #3
[all …]
/openbsd/src/gnu/usr.bin/gcc/gcc/config/arm/
Dlib1funcs.asm155 divisor .req r1 label
169 @ Unless the divisor is very big, shift it up in multiples of
171 @ division loop. Continue shifting until the divisor is
173 cmp divisor, #0x10000000
174 cmplo divisor, dividend
175 movlo divisor, divisor, lsl #4
182 cmp divisor, #0x80000000
183 cmplo divisor, dividend
184 movlo divisor, divisor, lsl #1
196 cmp dividend, divisor
[all …]
/openbsd/src/gnu/llvm/compiler-rt/lib/builtins/
Dudivmodti4.c104 utwords divisor; in __udivmodti4() local
105 divisor.all = b; in __udivmodti4()
108 if (divisor.all > dividend.all) { in __udivmodti4()
114 if (divisor.s.high == 0) { in __udivmodti4()
116 if (dividend.s.high < divisor.s.low) { in __udivmodti4()
119 divisor.s.low, &remainder.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()
127 divisor.s.low, &remainder.s.low); in __udivmodti4()
135 __builtin_clzll(divisor.s.high) - __builtin_clzll(dividend.s.high); in __udivmodti4()
[all …]
/openbsd/src/gnu/usr.bin/gcc/gcc/config/xtensa/
Dlib1funcs.asm205 bltui a3, 2, .Lle_one # check if the divisor <= 1
210 nsau a4, a3 # divisor_shift = nsau(divisor)
213 nsau a4, a3, a2, a7 # divisor_shift = nsau(divisor)
219 sll a3, a3 # divisor <<= count
240 addi a2, a2, 1 # increment quotient if dividend >= divisor
245 # return dividend >= divisor
253 beqz a3, .Lerror # if divisor == 1, return the dividend
270 xor a7, a2, a3 # sign = dividend ^ divisor
272 abs a3, a3 # udivisor = abs(divisor)
314 bltu a6, a3, .Lreturn2 # if dividend < divisor, return 0
[all …]
/openbsd/src/lib/libcrypto/bn/
Dbn_div.c238 const BIGNUM *divisor, BN_CTX *ctx, int ct) in BN_div_internal() argument
259 if (BN_is_zero(divisor)) { in BN_div_internal()
265 if (BN_ucmp(numerator, divisor) < 0) { in BN_div_internal()
289 norm_shift = BN_BITS2 - BN_num_bits(divisor) % BN_BITS2; in BN_div_internal()
290 if (!BN_lshift(sdiv, divisor, norm_shift)) in BN_div_internal()
344 r_neg = numerator->neg ^ divisor->neg; in BN_div_internal()
435 const BIGNUM *divisor, BN_CTX *ctx) in BN_div() argument
440 BN_get_flags(divisor, BN_FLG_CONSTTIME) != 0; in BN_div()
442 return BN_div_internal(quotient, remainder, numerator, divisor, ctx, ct); in BN_div()
448 const BIGNUM *divisor, BN_CTX *ctx) in BN_div_nonct() argument
[all …]
/openbsd/src/gnu/gcc/gcc/config/xtensa/
Dlib1funcs.asm263 bltui a3, 2, .Lle_one # check if the divisor <= 1
267 do_nsau a4, a3, a2, a7 # divisor_shift = nsau(divisor)
272 sll a3, a3 # divisor <<= count
293 addi a2, a2, 1 # increment quotient if dividend >= divisor
298 beqz a3, .Lerror # if divisor == 1, return the dividend
302 # return dividend >= divisor
324 xor a7, a2, a3 # sign = dividend ^ divisor
326 do_abs a3, a3, a4 # udivisor = abs(divisor)
368 bltu a6, a3, .Lreturn0 # if dividend < divisor, return 0
391 bltui a3, 2, .Lle_one # check if the divisor is <= 1
[all …]
/openbsd/src/lib/libc/arch/sparc64/gen/
Ddivrem.m441 * Input: dividend and divisor in %o0 and %o1 respectively.
62 * V the current comparand, initially divisor*2^(ITER*N-1)
78 define(divisor, `%o1') macro
127 orcc divisor, dividend, %g0 ! either negative?
130 `xor divisor, dividend, SIGN',
132 tst divisor
135 ! divisor is definitely negative; dividend might also be negative
137 neg divisor ! in any case, make divisor nonneg
138 1: ! dividend is negative, divisor is nonnegative
143 orcc divisor, %g0, V
[all …]
/openbsd/src/sbin/pdisk/
Dio.c260 get_multiplier(long divisor) in get_multiplier() argument
268 if (c <= 0 || divisor <= 0) { in get_multiplier()
285 result /= divisor; in get_multiplier()
290 } else if (result >= divisor) { in get_multiplier()
291 result /= divisor; in get_multiplier()
/openbsd/src/lib/libc/gmon/
Dgmon.c177 long divisor; in _mcleanup() local
201 divisor=10000; in _mcleanup()
202 while (divisor > pid) divisor /= 10; /* skip leading zeros */ in _mcleanup()
204 *t++ = (pid/divisor) + '0'; in _mcleanup()
205 pid %= divisor; in _mcleanup()
206 } while (divisor /= 10); in _mcleanup()
/openbsd/src/sys/dev/pci/drm/amd/display/dc/basics/
Dconversion.c41 int32_t divisor = 1 << fractional_bits; in fixed_point_to_int_frac() local
49 if (d <= (uint16_t)(1 << integer_bits) - (1 / (uint16_t)divisor)) in fixed_point_to_int_frac()
53 divisor)); in fixed_point_to_int_frac()
61 divisor)))); in fixed_point_to_int_frac()
Dfixpt31_32.c49 unsigned long long divisor, in complete_integer_division_u64() argument
54 ASSERT(divisor); in complete_integer_division_u64()
56 result = div64_u64_rem(dividend, divisor, remainder); in complete_integer_division_u64()
/openbsd/src/sys/dev/i2c/
Dw83l784r.c322 int data, divisor; in w83l784r_refresh_fanrpm() local
326 divisor = data & 0x07; in w83l784r_refresh_fanrpm()
328 divisor = (data >> 4) & 0x07; in w83l784r_refresh_fanrpm()
336 sensor->value = 1350000 / (data << divisor); in w83l784r_refresh_fanrpm()
344 int data, divisor; in w83l785r_refresh_fanrpm() local
348 divisor = data & 0x07; in w83l785r_refresh_fanrpm()
350 divisor = (data >> 4) & 0x07; in w83l785r_refresh_fanrpm()
358 sensor->value = 1350000 / (data << divisor); in w83l785r_refresh_fanrpm()
/openbsd/src/sys/dev/ic/
Dlm78.c736 int data, divisor = 1; in lm_refresh_fanrpm() local
749 divisor = (data >> 4) & 0x03; in lm_refresh_fanrpm()
751 divisor = (data >> 6) & 0x03; in lm_refresh_fanrpm()
760 sensor->value = 1350000 / (data << divisor); in lm_refresh_fanrpm()
860 int fan, data, divisor = 0; in wb_refresh_fanrpm() local
873 divisor |= 0x04; in wb_refresh_fanrpm()
880 divisor |= (data >> 4) & 0x03; in wb_refresh_fanrpm()
882 divisor |= (data >> 6) & 0x03; in wb_refresh_fanrpm()
885 divisor |= (data >> 6) & 0x03; in wb_refresh_fanrpm()
890 divisor |= (data >> 0) & 0x07; in wb_refresh_fanrpm()
[all …]
/openbsd/src/sys/arch/amd64/amd64/
Dtsc.c105 uint64_t base, def, divisor, multiplier; in tsc_freq_msr() local
147 divisor = (def >> 8) & 0x3f; in tsc_freq_msr()
148 if (divisor <= 0x07 || divisor >= 0x2d) in tsc_freq_msr()
150 if (divisor >= 0x1b && divisor % 2 == 1) in tsc_freq_msr()
160 return base * multiplier / divisor; in tsc_freq_msr()
/openbsd/src/gnu/usr.bin/perl/Porting/
Dacknowledgements.pl152 my $divisor = 10**( $length - 2 );
153 return ceil( $int / $divisor ) * $divisor;
/openbsd/src/gnu/gcc/gcc/config/c4x/
Dlibgcc.S41 ; This routine performs a reciprocal of the divisor using the method
45 ; Let r be the reciprocal of the divisor v and let the ith estimate
60 ; r2 dividend, r3 divisor, r0 quotient
75 ; r0 = estimate of r, r1 = tmp, r2 = dividend, r3 = divisor
107 ; r0 = estimate of r, r1 = tmp, r2 = dividend, r3 = divisor
/openbsd/src/gnu/usr.bin/gcc/gcc/config/c4x/
Dlibgcc.S41 ; This routine performs a reciprocal of the divisor using the method
45 ; Let r be the reciprocal of the divisor v and let the ith estimate
60 ; r2 dividend, r3 divisor, r0 quotient
75 ; r0 = estimate of r, r1 = tmp, r2 = dividend, r3 = divisor
107 ; r0 = estimate of r, r1 = tmp, r2 = dividend, r3 = divisor
/openbsd/src/gnu/usr.bin/gcc/gcc/config/avr/
Dlibgcc.S321 cp r_rem,r_arg2 ; compare remainder & divisor
322 brcs __udivmodqi4_ep ; remainder <= divisor
344 neg r_arg2 ; divisor negative : negate
389 cp r_remL,r_arg2L ; compare remainder & divisor
391 brcs __udivmodhi4_ep ; remainder < divisor
421 rcall __divmodhi4_neg2 ; divisor negative : negate
428 neg r_arg2L ; correct divisor/result sign
490 cp r_remL,r_arg2L ; compare remainder & divisor
494 brcs __udivmodsi4_ep ; remainder <= divisor
533 rcall __divmodsi4_neg2 ; divisor negative : negate
[all …]
/openbsd/src/gnu/gcc/gcc/config/avr/
Dlibgcc.S321 cp r_rem,r_arg2 ; compare remainder & divisor
322 brcs __udivmodqi4_ep ; remainder <= divisor
344 neg r_arg2 ; divisor negative : negate
389 cp r_remL,r_arg2L ; compare remainder & divisor
391 brcs __udivmodhi4_ep ; remainder < divisor
421 rcall __divmodhi4_neg2 ; divisor negative : negate
428 neg r_arg2L ; correct divisor/result sign
490 cp r_remL,r_arg2L ; compare remainder & divisor
494 brcs __udivmodsi4_ep ; remainder <= divisor
533 rcall __divmodsi4_neg2 ; divisor negative : negate
[all …]
/openbsd/src/gnu/gcc/gcc/config/h8300/
Dlib1funcs.asm176 ; divisor in A0
185 or A0H,A0H ; is divisor > 0
198 ;; Basically the same, except that the sign of the divisor determines
201 or A0H,A0H ; is divisor > 0
355 ;; Basically the same, except that the sign of the divisor determines
405 ;; Basically the same, except that the sign of the divisor determines
626 shlr.l er2 ; make divisor < 2^16
630 shlr.l #2,er2 ; make divisor < 2^16
636 shlr.l #2,er2 ; make divisor < 2^16
651 ;; er1 contains divisor
[all …]
/openbsd/src/sys/dev/
Dspdmem.c620 uint8_t rows, cols, dividend, divisor; in spdmem_fbdimm_decode() local
637 divisor = s->sm_data[SPDMEM_FBDIMM_MTB_DIVISOR]; in spdmem_fbdimm_decode()
639 cycle_time = (1000 * dividend + (divisor / 2)) / divisor; in spdmem_fbdimm_decode()
665 uint8_t mtype, chipsize, dividend, divisor; in spdmem_ddr3_decode() local
698 divisor = s->sm_data[SPDMEM_DDR3_MTB_DIVISOR]; in spdmem_ddr3_decode()
699 cycle_time = (1000 * dividend + (divisor / 2)) / divisor; in spdmem_ddr3_decode()
/openbsd/src/sys/dev/isa/
Dit.c355 int i, sdata, divisor, odivisor, ndivisor; in it_ec_refresh() local
437 odivisor = ndivisor = divisor = in it_ec_refresh()
459 ndivisor |= ((divisor + 1) & 7) << in it_ec_refresh()
464 divisor = divisor & 1 ? 3 : 1; in it_ec_refresh()
466 1350000 / (sdata << (divisor & 7)); in it_ec_refresh()
/openbsd/src/sys/lib/libkern/arch/hppa/
Dmilli.S478 sub r0,arg1,temp ; clear carry, negate the divisor
548 ; handle the cases where divisor is a small constant or has high bit on
556 bv 0(r31) ; divisor == 1
558 bv 0(r31) ; divisor == 2
560 b,n $$divU_3 ; divisor == 3
562 bv 0(r31) ; divisor == 4
564 b,n $$divU_5 ; divisor == 5
566 b,n $$divU_6 ; divisor == 6
568 b,n $$divU_7 ; divisor == 7
570 bv 0(r31) ; divisor == 8
[all …]
/openbsd/src/sys/arch/octeon/dev/
Dcn30xxuart.c167 int divisor; in cn30xxuart_delay() local
176 divisor = octeon_xkphys_read_8(MIO_UART0_DLL) | in cn30xxuart_delay()
/openbsd/src/sys/kern/
Dkern_intrmap.c260 unsigned int subset_grid, cnt, divisor, mod, offset, i; in intrmap_match() local
307 divisor = ic->ic_count / im->im_grid; in intrmap_match()
308 offset = ((unit / divisor) % mod) * subset_grid; in intrmap_match()

1234