| /netbsd-src/sys/external/bsd/drm2/include/linux/ |
| H A D | bitmap.h | 48 bitmap_zero(unsigned long *bitmap, size_t nbits) in bitmap_zero() argument 51 size_t n = howmany(nbits, bpl); in bitmap_zero() 63 bitmap_empty(const unsigned long *bitmap, size_t nbits) in bitmap_empty() argument 67 for (; nbits >= bpl; nbits -= bpl) { in bitmap_empty() 72 if (nbits) { in bitmap_empty() 73 if (*bitmap & ~(~0UL << nbits)) in bitmap_empty() 86 bitmap_weight(const unsigned long *bitmap, size_t nbits) in bitmap_weight() argument 91 for (; nbits >= bpl; nbits -= bpl) in bitmap_weight() 93 if (nbits) in bitmap_weight() 94 weight += popcountl(*bitmap & ~(~0UL << nbits)); in bitmap_weight() [all …]
|
| /netbsd-src/external/lgpl3/gmp/dist/tests/rand/ |
| H A D | t-rand.c | 83 int nbits; member 143 int nbits = 1; in main() local 161 nbits = atoi (argv[2]); in main() 176 gmp_randinit (rstate, GMP_RAND_ALG_LC, a->nbits); in main() 183 mpz_urandomb (rz, rstate, a->nbits); in main() 187 printf ("z%d: ", a->nbits); in main() 196 printf ("z%d ", a->nbits); in main() 206 gmp_randinit (rstate, GMP_RAND_ALG_LC, a->nbits); in main() 211 mpf_init2 (f, a->nbits); in main() 212 mpf_init2 (rf, a->nbits); in main() [all …]
|
| /netbsd-src/external/lgpl3/gmp/dist/mpn/generic/ |
| H A D | get_d.c | 141 int lshift, nbits; in mpn_get_d() local 182 nbits = GMP_LIMB_BITS - lshift; in mpn_get_d() 184 if (nbits < 53 && size > 1) in mpn_get_d() 188 x >>= nbits; in mpn_get_d() 190 nbits += GMP_NUMB_BITS; in mpn_get_d() 192 if (LIMBS_PER_DOUBLE >= 3 && nbits < 53 && size > 2) in mpn_get_d() 196 x >>= nbits; in mpn_get_d() 198 nbits += GMP_NUMB_BITS; in mpn_get_d() 217 nbits = GMP_LIMB_BITS - lshift - 21; in mpn_get_d() 223 nbits = GMP_LIMB_BITS - lshift; in mpn_get_d() [all …]
|
| /netbsd-src/lib/libc/gdtoa/ |
| H A D | gethex.c | 45 int big, esign, havedig, irv, j, k, n, n0, nbits, up, zret; local 171 nbits = fpi->nbits; 172 n0 = n = (unsigned int)nbits >> kshift; 173 if (nbits & kmask) 181 b->x[j] = ULbits >> (ULbits - (nbits & kmask)); 218 nbits = fpi->nbits; 221 if (n > nbits) { 222 n -= nbits; 235 else if (n < nbits) { 236 n = nbits - n; [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/ |
| H A D | data-streamer.h | 104 bp_pack_value (struct bitpack_d *bp, bitpack_word_t val, unsigned nbits) in bp_pack_value() argument 110 gcc_checking_assert (nbits == BITS_PER_BITPACK_WORD in bp_pack_value() 111 || !(val & ~(((bitpack_word_t)1<<nbits)-1))); in bp_pack_value() 115 if (pos + nbits > BITS_PER_BITPACK_WORD) in bp_pack_value() 120 pos = nbits; in bp_pack_value() 125 pos += nbits; in bp_pack_value() 136 unsigned nbits) in bp_pack_poly_value() argument 139 bp_pack_value (bp, val.coeffs[i], nbits); in bp_pack_poly_value() 165 bp_unpack_value (struct bitpack_d *bp, unsigned nbits) in bp_unpack_value() argument 170 mask = (nbits == BITS_PER_BITPACK_WORD in bp_unpack_value() [all …]
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/ |
| H A D | data-streamer.h | 106 bp_pack_value (struct bitpack_d *bp, bitpack_word_t val, unsigned nbits) in bp_pack_value() argument 112 gcc_checking_assert (nbits == BITS_PER_BITPACK_WORD in bp_pack_value() 113 || !(val & ~(((bitpack_word_t)1<<nbits)-1))); in bp_pack_value() 117 if (pos + nbits > BITS_PER_BITPACK_WORD) in bp_pack_value() 122 pos = nbits; in bp_pack_value() 127 pos += nbits; in bp_pack_value() 138 unsigned nbits) in bp_pack_poly_value() argument 141 bp_pack_value (bp, val.coeffs[i], nbits); in bp_pack_poly_value() 167 bp_unpack_value (struct bitpack_d *bp, unsigned nbits) in bp_unpack_value() argument 172 mask = (nbits == BITS_PER_BITPACK_WORD in bp_unpack_value() [all …]
|
| /netbsd-src/sys/arch/ia64/stand/common/ |
| H A D | bitstring.h | 51 #define bitstr_size(nbits) \ argument 52 (((nbits) + 7) >> 3) 55 #define bit_alloc(nbits) \ argument 56 (bitstr_t *)calloc((size_t)bitstr_size(nbits), sizeof(bitstr_t)) 59 #define bit_decl(name, nbits) \ argument 60 ((name)[bitstr_size(nbits)]) 109 #define bit_ffc(name, nbits, value) do { \ argument 111 register int _byte, _nbits = (nbits); \ 122 if (_value >= nbits) \ 128 #define bit_ffs(name, nbits, value) do { \ argument [all …]
|
| /netbsd-src/external/bsd/ipf/dist/lib/ |
| H A D | ntomask.c | 13 int ntomask(family, nbits, ap) in ntomask() argument 14 int family, nbits; in ntomask() 19 if (nbits < 0) 25 if (nbits > 32 || use_inet6 == 1) 27 if (nbits == 0) { 31 mask <<= (32 - nbits); 38 if ((nbits > 128) || (use_inet6 == -1)) 40 fill6bits(nbits, ap);
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/rsa/ |
| H A D | rsa_sp800_56b_check.c | 88 int ossl_rsa_check_prime_factor_range(const BIGNUM *p, int nbits, BN_CTX *ctx) in ossl_rsa_check_prime_factor_range() argument 94 nbits >>= 1; in ossl_rsa_check_prime_factor_range() 95 shift = nbits - BN_num_bits(&ossl_bn_inv_sqrt_2); in ossl_rsa_check_prime_factor_range() 98 if (BN_num_bits(p) != nbits) in ossl_rsa_check_prime_factor_range() 136 int ossl_rsa_check_prime_factor(BIGNUM *p, BIGNUM *e, int nbits, BN_CTX *ctx) in ossl_rsa_check_prime_factor() argument 144 || ossl_rsa_check_prime_factor_range(p, nbits, ctx) != 1) in ossl_rsa_check_prime_factor() 175 int ossl_rsa_check_private_exponent(const RSA *rsa, int nbits, BN_CTX *ctx) in ossl_rsa_check_private_exponent() argument 181 if (BN_num_bits(rsa->d) <= (nbits >> 1)) in ossl_rsa_check_private_exponent() 243 int nbits) in ossl_rsa_check_pminusq_diff() argument 245 int bitlen = (nbits >> 1) - 100; in ossl_rsa_check_pminusq_diff() [all …]
|
| H A D | rsa_sp800_56b_gen.c | 58 int nbits, const BIGNUM *e, BN_CTX *ctx, in ossl_rsa_fips186_4_gen_prob_primes() argument 91 if (nbits < RSA_FIPS1864_MIN_KEYGEN_KEYSIZE) { in ossl_rsa_fips186_4_gen_prob_primes() 126 nbits, e, ctx, cb)) in ossl_rsa_fips186_4_gen_prob_primes() 131 Xq2, nbits, e, ctx, cb)) in ossl_rsa_fips186_4_gen_prob_primes() 135 ok = ossl_rsa_check_pminusq_diff(tmp, Xpo, Xqo, nbits); in ossl_rsa_fips186_4_gen_prob_primes() 142 ok = ossl_rsa_check_pminusq_diff(tmp, rsa->p, rsa->q, nbits); in ossl_rsa_fips186_4_gen_prob_primes() 173 int ossl_rsa_sp800_56b_validate_strength(int nbits, int strength) in ossl_rsa_sp800_56b_validate_strength() argument 175 int s = (int)ossl_ifc_ffc_compute_security_bits(nbits); in ossl_rsa_sp800_56b_validate_strength() 194 static int rsa_validate_rng_strength(EVP_RAND_CTX *rng, int nbits) in rsa_validate_rng_strength() argument 203 if (EVP_RAND_get_strength(rng) < ossl_ifc_ffc_compute_security_bits(nbits)) { in rsa_validate_rng_strength() [all …]
|
| H A D | rsa_local.h | 165 int ossl_rsa_sp800_56b_validate_strength(int nbits, int strength); 167 int nbits); 173 int ossl_rsa_check_private_exponent(const RSA *rsa, int nbits, BN_CTX *ctx); 174 int ossl_rsa_check_prime_factor(BIGNUM *p, BIGNUM *e, int nbits, BN_CTX *ctx); 175 int ossl_rsa_check_prime_factor_range(const BIGNUM *p, int nbits, BN_CTX *ctx); 182 int strength, int nbits); 183 int ossl_rsa_sp800_56b_generate_key(RSA *rsa, int nbits, const BIGNUM *efixed, 186 int ossl_rsa_sp800_56b_derive_params_from_pq(RSA *rsa, int nbits, 189 int nbits, const BIGNUM *e, BN_CTX *ctx,
|
| /netbsd-src/include/ |
| H A D | bitstring.h | 67 #define bitstr_size(nbits) \ argument 68 (size_t)((uint32_t)((nbits) + 7) >> 3) 71 #define bit_alloc(nbits) \ argument 72 calloc(bitstr_size(nbits), sizeof(bitstr_t)) 75 #define bit_decl(name, nbits) \ argument 76 ((name)[bitstr_size(nbits)]) 114 #define bit_ffc(name, nbits, value) do { \ argument 116 size_t _bit, _nbits = nbits; \ 127 #define bit_ffs(name, nbits, value) do { \ argument 129 size_t _bit, _nbits = nbits; \
|
| /netbsd-src/external/lgpl3/gmp/dist/mpz/ |
| H A D | rrandomb.c | 38 mpz_rrandomb (mpz_ptr x, gmp_randstate_t rstate, mp_bitcnt_t nbits) in mpz_rrandomb() argument 43 nl = BITS_TO_LIMBS (nbits); in mpz_rrandomb() 44 if (nbits != 0) in mpz_rrandomb() 47 gmp_rrandomb (xp, rstate, nbits); in mpz_rrandomb() 63 gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, mp_bitcnt_t nbits) in gmp_rrandomb() argument 71 i = BITS_TO_LIMBS (nbits) - 1; in gmp_rrandomb() 72 rp[i] = GMP_NUMB_MAX >> (GMP_NUMB_BITS - (nbits % GMP_NUMB_BITS)) % GMP_NUMB_BITS; in gmp_rrandomb() 77 cap_chunksize = nbits / (ranm % 4 + 1); in gmp_rrandomb() 80 bi = nbits; in gmp_rrandomb()
|
| /netbsd-src/external/lgpl3/mpfr/dist/src/ |
| H A D | urandomb.c | 34 mpfr_prec_t nbits) in mpfr_rand_raw() argument 38 MPFR_ASSERTN (nbits >= 1); in mpfr_rand_raw() 42 MPFR_ASSERTN ((mp_bitcnt_t) -1 < 0 || nbits <= (mp_bitcnt_t) -1); in mpfr_rand_raw() 44 mpz_urandomb (z, rstate, nbits); in mpfr_rand_raw() 45 MPN_COPY(mp, PTR(z), MPFR_PREC2LIMBS (nbits)); in mpfr_rand_raw() 53 mpfr_prec_t nbits; in mpfr_urandomb() local 60 nbits = MPFR_PREC (rop); in mpfr_urandomb() 63 cnt = nlimbs * GMP_NUMB_BITS - nbits; in mpfr_urandomb() 68 mpfr_rand_raw (rp, rstate, nbits); in mpfr_urandomb()
|
| H A D | get_d.c | 94 int nbits; in mpfr_get_d() local 98 nbits = IEEE_DBL_MANT_DIG; /* 53 */ in mpfr_get_d() 102 nbits += 1021 + e; in mpfr_get_d() 103 MPFR_ASSERTD (1 <= nbits && nbits < IEEE_DBL_MANT_DIG); in mpfr_get_d() 106 nbits, rnd_mode); in mpfr_get_d() 115 MPFR_ASSERTD (nbits <= IEEE_DBL_MANT_DIG); in mpfr_get_d() 116 np = MPFR_PREC2LIMBS (nbits); in mpfr_get_d()
|
| H A D | get_flt.c | 91 int nbits; in mpfr_get_flt() local 96 nbits = IEEE_FLT_MANT_DIG; /* 24 */ in mpfr_get_flt() 100 nbits += 125 + e; in mpfr_get_flt() 101 MPFR_ASSERTD (1 <= nbits && nbits < 24); in mpfr_get_flt() 104 nbits, rnd_mode); in mpfr_get_flt() 115 np = MPFR_PREC2LIMBS (nbits); in mpfr_get_flt()
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | kexgexs.c | 73 u_int min = 0, max = 0, nbits = 0; in input_kex_dh_gex_request() local 80 (r = sshpkt_get_u32(ssh, &nbits)) != 0 || in input_kex_dh_gex_request() 84 kex->nbits = nbits; in input_kex_dh_gex_request() 89 nbits = MAXIMUM(DH_GRP_MIN, nbits); in input_kex_dh_gex_request() 90 nbits = MINIMUM(DH_GRP_MAX, nbits); in input_kex_dh_gex_request() 92 if (kex->max < kex->min || kex->nbits < kex->min || in input_kex_dh_gex_request() 93 kex->max < kex->nbits || kex->max < DH_GRP_MIN) { in input_kex_dh_gex_request() 99 kex->dh = mm_choose_dh(min, nbits, max); in input_kex_dh_gex_request() 173 kex->min, kex->nbits, kex->max, in input_kex_dh_gex_init()
|
| /netbsd-src/external/cddl/osnet/dist/uts/common/sys/ |
| H A D | bitmap.h | 104 #define BT_BITOUL(nbits) \ argument 105 (((nbits) + BT_NBIPUL - 1l) / BT_NBIPUL) 106 #define BT_SIZEOFMAP(nbits) \ argument 107 (BT_BITOUL(nbits) * sizeof (ulong_t)) 116 #define BT_BITOUL32(nbits) \ argument 117 (((nbits) + BT_NBIPUL32 - 1l) / BT_NBIPUL32) 118 #define BT_SIZEOFMAP32(nbits) \ argument 119 (BT_BITOUL32(nbits) * sizeof (uint_t)) 149 extern index_t bt_availbit(ulong_t *bitmap, size_t nbits);
|
| /netbsd-src/external/bsd/openldap/dist/libraries/liblutil/ |
| H A D | detach.c | 60 int i, sd, nbits, pid; in lutil_detach() local 63 nbits = sysconf( _SC_OPEN_MAX ); in lutil_detach() 65 nbits = getdtablesize(); in lutil_detach() 67 nbits = FD_SETSIZE; in lutil_detach() 71 if ( nbits > FD_SETSIZE ) { in lutil_detach() 72 nbits = FD_SETSIZE; in lutil_detach() 121 for ( i = 0; i < nbits; i++ ) { in lutil_detach()
|
| /netbsd-src/sys/external/bsd/common/include/linux/ |
| H A D | bitops.h | 196 __find_next_bit(const unsigned long *ptr, unsigned long nbits, in __find_next_bit() argument 201 size_t n = howmany(nbits, bpl); in __find_next_bit() 240 return nbits; in __find_next_bit() 249 /* We may have overshot, so clamp down to at most nbits. */ in __find_next_bit() 250 return MIN(result, nbits); in __find_next_bit() 254 find_next_bit(const unsigned long *ptr, unsigned long nbits, in find_next_bit() argument 257 return __find_next_bit(ptr, nbits, startbit, 0); in find_next_bit() 261 find_first_bit(const unsigned long *ptr, unsigned long nbits) in find_first_bit() argument 263 return find_next_bit(ptr, nbits, 0); in find_first_bit() 267 find_next_zero_bit(const unsigned long *ptr, unsigned long nbits, in find_next_zero_bit() argument 274 find_first_zero_bit(const unsigned long * ptr,unsigned long nbits) find_first_zero_bit() argument [all...] |
| /netbsd-src/external/lgpl3/gmp/dist/mpf/ |
| H A D | urandomb.c | 37 mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, mp_bitcnt_t nbits) in mpf_urandomb() argument 45 nlimbs = BITS_TO_LIMBS (nbits); in mpf_urandomb() 51 nbits = nlimbs * GMP_NUMB_BITS; in mpf_urandomb() 54 _gmp_rand (rp, rstate, nbits); in mpf_urandomb() 57 if (nbits % GMP_NUMB_BITS != 0) in mpf_urandomb() 58 mpn_lshift (rp, rp, nlimbs, GMP_NUMB_BITS - nbits % GMP_NUMB_BITS); in mpf_urandomb()
|
| /netbsd-src/external/gpl3/gcc.old/dist/libphobos/libdruntime/gc/ |
| H A D | bits.d | 32 size_t nbits; member 43 void alloc(size_t nbits) nothrow in alloc() 45 this.nbits = nbits; in alloc() 54 assert(i < nbits); in test() 64 assert(i < nbits); in set() 74 assert(i <= nbits); in clear() 98 return (nbits + (BITS_PER_WORD - 1)) >> BITS_SHIFT; in nwords()
|
| /netbsd-src/external/mpl/bind/dist/lib/isc/ |
| H A D | netaddr.c | 67 unsigned int nbits; /* Number of significant leftover bits */ 102 nbits = prefixlen % 8; in isc_netaddr_eqprefix() 109 if (nbits > 0) { in isc_netaddr_eqprefix() 112 INSIST(nbits < 8); in isc_netaddr_eqprefix() 115 mask = (0xFF << (8 - nbits)) & 0xFF; in isc_netaddr_eqprefix() 204 unsigned int nbits, nbytes, ipbytes = 0; in isc_netaddr_format() 226 nbits = prefixlen % 8; in isc_netaddr_prefixok() 227 if (nbits != 0) { in isc_netaddr_prefixok() 229 if ((p[nbytes] & (0xff >> nbits)) != 0U) { in isc_netaddr_prefixok() 244 unsigned int nbits in isc_netaddr_prefixok() 73 unsigned int nbits; /* Number of significant leftover bits */ isc_netaddr_eqprefix() local 219 unsigned int nbits, nbytes, ipbytes = 0; isc_netaddr_prefixok() local 259 unsigned int nbits = 0, nbytes = 0, ipbytes = 0, i; isc_netaddr_masktoprefixlen() local [all...] |
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/ |
| H A D | netaddr.c | 75 unsigned int nbits; /* Number of significant leftover bits */ in isc_netaddr_eqprefix() local 110 nbits = prefixlen % 8; in isc_netaddr_eqprefix() 117 if (nbits > 0) { in isc_netaddr_eqprefix() 120 INSIST(nbits < 8); in isc_netaddr_eqprefix() 123 mask = (0xFF << (8 - nbits)) & 0xFF; in isc_netaddr_eqprefix() 223 unsigned int nbits, nbytes, ipbytes = 0; in isc_netaddr_prefixok() local 245 nbits = prefixlen % 8; in isc_netaddr_prefixok() 246 if (nbits != 0) { in isc_netaddr_prefixok() 248 if ((p[nbytes] & (0xff >> nbits)) != 0U) { in isc_netaddr_prefixok() 263 unsigned int nbits = 0, nbytes = 0, ipbytes = 0, i; in isc_netaddr_masktoprefixlen() local [all …]
|
| /netbsd-src/sys/dev/ic/ |
| H A D | rtwphyio.c | 119 u_int nbits) in rtw_rf_hostbangbits() argument 124 KASSERT(nbits <= 32); in rtw_rf_hostbangbits() 127 ("%s: %u bits, %#08x, %s\n", __func__, nbits, bits, in rtw_rf_hostbangbits() 137 mask = 1 << (nbits - 1); in rtw_rf_hostbangbits() 139 for (i = 0; i < nbits; i++) { in rtw_rf_hostbangbits() 253 u_int nbits; in rtw_rf_hostwrite() local 262 nbits = 16; in rtw_rf_hostwrite() 272 nbits = 32; in rtw_rf_hostwrite() 279 nbits = 21; in rtw_rf_hostwrite() 287 nbits = 22; in rtw_rf_hostwrite() [all …]
|