/lib/ |
D | chacha.c | 15 static void chacha_permute(u32 *x, int nrounds) in chacha_permute() argument 23 x[0] += x[4]; x[12] = rol32(x[12] ^ x[0], 16); in chacha_permute() 24 x[1] += x[5]; x[13] = rol32(x[13] ^ x[1], 16); in chacha_permute() 25 x[2] += x[6]; x[14] = rol32(x[14] ^ x[2], 16); in chacha_permute() 26 x[3] += x[7]; x[15] = rol32(x[15] ^ x[3], 16); in chacha_permute() 28 x[8] += x[12]; x[4] = rol32(x[4] ^ x[8], 12); in chacha_permute() 29 x[9] += x[13]; x[5] = rol32(x[5] ^ x[9], 12); in chacha_permute() 30 x[10] += x[14]; x[6] = rol32(x[6] ^ x[10], 12); in chacha_permute() 31 x[11] += x[15]; x[7] = rol32(x[7] ^ x[11], 12); in chacha_permute() 33 x[0] += x[4]; x[12] = rol32(x[12] ^ x[0], 8); in chacha_permute() [all …]
|
D | extable.c | 16 #define ex_to_insn(x) ((x)->insn) argument 18 static inline unsigned long ex_to_insn(const struct exception_table_entry *x) in ex_to_insn() argument 20 return (unsigned long)&x->insn + x->insn; in ex_to_insn() 30 struct exception_table_entry *x = a, *y = b, tmp; in swap_ex() local 33 tmp = *x; in swap_ex() 34 x->insn = y->insn + delta; in swap_ex() 38 swap_ex_entry_fixup(x, y, tmp, delta); in swap_ex() 40 x->fixup = y->fixup + delta; in swap_ex() 54 const struct exception_table_entry *x = a, *y = b; in cmp_ex_sort() local 57 if (ex_to_insn(x) > ex_to_insn(y)) in cmp_ex_sort() [all …]
|
D | checksum.c | 37 static inline unsigned short from32to16(unsigned int x) in from32to16() argument 40 x = (x & 0xffff) + (x >> 16); in from32to16() 42 x = (x & 0xffff) + (x >> 16); in from32to16() 43 return x; in from32to16() 180 static inline u32 from64to32(u64 x) in from64to32() argument 183 x = (x & 0xffffffff) + (x >> 32); in from64to32() 185 x = (x & 0xffffffff) + (x >> 32); in from64to32() 186 return (u32)x; in from64to32()
|
D | locking-selftest.c | 212 #define L(x) raw_spin_lock(&lock_##x) argument 213 #define U(x) raw_spin_unlock(&lock_##x) argument 214 #define LU(x) L(x); U(x) argument 215 #define SI(x) raw_spin_lock_init(&lock_##x) argument 217 #define WL(x) write_lock(&rwlock_##x) argument 218 #define WU(x) write_unlock(&rwlock_##x) argument 219 #define WLU(x) WL(x); WU(x) argument 221 #define RL(x) read_lock(&rwlock_##x) argument 222 #define RU(x) read_unlock(&rwlock_##x) argument 223 #define RLU(x) RL(x); RU(x) argument [all …]
|
D | test_hash.c | 38 mod255(u32 x) in mod255() argument 40 x = (x & 0xffff) + (x >> 16); /* 1 <= x <= 0x1fffe */ in mod255() 41 x = (x & 0xff) + (x >> 8); /* 1 <= x <= 0x2fd */ in mod255() 42 x = (x & 0xff) + (x >> 8); /* 1 <= x <= 0x100 */ in mod255() 43 x = (x & 0xff) + (x >> 8); /* 1 <= x <= 0xff */ in mod255() 44 return x; in mod255()
|
D | earlycpio.c | 66 unsigned char c, x; in find_cpio_data() local 88 x = c - '0'; in find_cpio_data() 89 if (x < 10) { in find_cpio_data() 90 v += x; in find_cpio_data() 94 x = (c | 0x20) - 'a'; in find_cpio_data() 95 if (x < 6) { in find_cpio_data() 96 v += x + 10; in find_cpio_data()
|
D | crc32.c | 37 # define tole(x) ((__force u32) cpu_to_le32(x)) argument 39 # define tole(x) (x) argument 43 # define tobe(x) ((__force u32) cpu_to_be32(x)) argument 45 # define tobe(x) (x) argument 61 # define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8) argument 67 # define DO_CRC(x) crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8) 217 static u32 __attribute_const__ gf2_multiply(u32 x, u32 y, u32 modulus) argument 219 u32 product = x & 1 ? y : 0; 224 x >>= 1; 225 product ^= x & 1 ? y : 0;
|
D | crc4.c | 25 uint8_t crc4(uint8_t c, uint64_t x, int bits) in crc4() argument 30 x &= (1ull << bits) - 1; in crc4() 37 c = crc4_tab[c ^ ((x >> i) & 0xf)]; in crc4()
|
D | cmdline.c | 25 int x, inc_counter, upper_range; in get_range() local 30 for (x = *pint; n && x < upper_range; x++, n--) in get_range() 31 *pint++ = x; in get_range()
|
D | bch.c | 291 static inline int parity(unsigned int x) in parity() argument 297 x ^= x >> 1; in parity() 298 x ^= x >> 2; in parity() 299 x = (x & 0x11111111U) * 0x11111111U; in parity() 300 return (x >> 28) & 1; in parity() 334 static inline int a_log(struct bch_control *bch, unsigned int x) in a_log() argument 336 return bch->a_log_tab[x]; in a_log() 339 static inline int a_ilog(struct bch_control *bch, unsigned int x) in a_ilog() argument 341 return mod_s(bch, GF_N(bch)-bch->a_log_tab[x]); in a_ilog() 1063 unsigned int i, x = 1; in build_gf_tables() local [all …]
|
D | inflate.c | 2 #define DEBG(x) argument 3 #define DEBG1(x) argument 356 unsigned x[BMAX+1]; /* bit offsets, then code stack */ in huft_build() member 358 unsigned *c, *v, *x; in huft_build() local 370 x = stk->x; in huft_build() 425 x[1] = j = 0; in huft_build() 426 p = c + 1; xp = x + 2; in huft_build() 437 v[x[j]++] = i; in huft_build() 439 n = x[g]; /* set n to length of v */ in huft_build() 444 x[0] = i = 0; /* first Huffman code is zero */ in huft_build() [all …]
|
/lib/math/ |
D | prime_numbers.c | 69 static bool slow_is_prime_number(unsigned long x) in slow_is_prime_number() argument 71 unsigned long y = int_sqrt(x); in slow_is_prime_number() 74 if ((x % y) == 0) in slow_is_prime_number() 82 static unsigned long slow_next_prime_number(unsigned long x) in slow_next_prime_number() argument 84 while (x < ULONG_MAX && !slow_is_prime_number(++x)) in slow_next_prime_number() 87 return x; in slow_next_prime_number() 90 static unsigned long clear_multiples(unsigned long x, in clear_multiples() argument 97 m = 2 * x; in clear_multiples() 99 m = roundup(start, x); in clear_multiples() 103 m += x; in clear_multiples() [all …]
|
D | int_sqrt.c | 19 unsigned long int_sqrt(unsigned long x) in int_sqrt() argument 23 if (x <= 1) in int_sqrt() 24 return x; in int_sqrt() 26 m = 1UL << (__fls(x) & ~1UL); in int_sqrt() 31 if (x >= b) { in int_sqrt() 32 x -= b; in int_sqrt() 48 u32 int_sqrt64(u64 x) in int_sqrt64() argument 52 if (x <= ULONG_MAX) in int_sqrt64() 53 return int_sqrt((unsigned long) x); in int_sqrt64() 55 m = 1ULL << ((fls64(x) - 1) & ~1ULL); in int_sqrt64() [all …]
|
/lib/mpi/ |
D | mpi-inline.h | 27 mpi_limb_t x; in mpihelp_add_1() local 29 x = *s1_ptr++; in mpihelp_add_1() 30 s2_limb += x; in mpihelp_add_1() 32 if (s2_limb < x) { /* sum is less than the left operand: handle carry */ in mpihelp_add_1() 34 x = *s1_ptr++ + 1; /* add carry */ in mpihelp_add_1() 35 *res_ptr++ = x; /* and store */ in mpihelp_add_1() 36 if (x) /* not 0 (no overflow): we can stop */ in mpihelp_add_1() 70 mpi_limb_t x; in mpihelp_sub_1() local 72 x = *s1_ptr++; in mpihelp_sub_1() 73 s2_limb = x - s2_limb; in mpihelp_sub_1() [all …]
|
D | generic_mpih-sub1.c | 23 mpi_limb_t x, y, cy; in mpihelp_sub_n() local 38 x = s1_ptr[j]; in mpihelp_sub_n() 41 y = x - y; /* main subtract */ in mpihelp_sub_n() 42 cy += y > x; /* get out carry from the subtract, combine */ in mpihelp_sub_n()
|
D | generic_mpih-add1.c | 24 mpi_limb_t x, y, cy; in mpihelp_add_n() local 39 x = s1_ptr[j]; in mpihelp_add_n() 42 y += x; /* add other addend */ in mpihelp_add_n() 43 cy += y < x; /* get out carry from that add, combine */ in mpihelp_add_n()
|
D | generic_mpih-mul2.c | 26 mpi_limb_t x; in mpihelp_addmul_1() local 41 x = res_ptr[j]; in mpihelp_addmul_1() 42 prod_low = x + prod_low; in mpihelp_addmul_1() 43 cy_limb += prod_low < x ? 1 : 0; in mpihelp_addmul_1()
|
D | generic_mpih-mul3.c | 26 mpi_limb_t x; in mpihelp_submul_1() local 41 x = res_ptr[j]; in mpihelp_submul_1() 42 prod_low = x - prod_low; in mpihelp_submul_1() 43 cy_limb += prod_low > x ? 1 : 0; in mpihelp_submul_1()
|
D | mpicoder.c | 260 int i, x, buf_len; in mpi_write_to_sgl() local 302 for (x = 0; x < sizeof(alimb); x++) { in mpi_write_to_sgl() 334 int x, j, z, lzeros, ents; in mpi_read_raw_from_sgl() local 402 for (x = 0; x < len; x++) { in mpi_read_raw_from_sgl() 405 if (((z + x + 1) % BYTES_PER_MPI_LIMB) == 0) { in mpi_read_raw_from_sgl() 410 z += x; in mpi_read_raw_from_sgl()
|
/lib/crypto/ |
D | arc4.c | 17 ctx->x = 1; in arc4_setkey() 40 u32 x, y, a, b; in arc4_crypt() local 46 x = ctx->x; in arc4_crypt() 49 a = S[x]; in arc4_crypt() 56 S[x] = b; in arc4_crypt() 57 x = (x + 1) & 0xff; in arc4_crypt() 58 ta = S[x]; in arc4_crypt() 69 ctx->x = x; in arc4_crypt()
|
D | aes.c | 93 u32 x = w & 0x7f7f7f7f; in mul_by_x() local 97 return (x << 1) ^ (y >> 7) * 0x1b; in mul_by_x() 102 u32 x = w & 0x3f3f3f3f; in mul_by_x2() local 107 return (x << 2) ^ (y >> 7) * 0x36 ^ (z >> 6) * 0x1b; in mul_by_x2() 110 static u32 mix_columns(u32 x) in mix_columns() argument 120 u32 y = mul_by_x(x) ^ ror32(x, 16); in mix_columns() 122 return y ^ ror32(x ^ y, 8); in mix_columns() 125 static u32 inv_mix_columns(u32 x) in inv_mix_columns() argument 142 u32 y = mul_by_x2(x); in inv_mix_columns() 144 return mix_columns(x ^ y ^ ror32(y, 16)); in inv_mix_columns()
|
D | sha256.c | 21 static inline u32 Ch(u32 x, u32 y, u32 z) in Ch() argument 23 return z ^ (x & (y ^ z)); in Ch() 26 static inline u32 Maj(u32 x, u32 y, u32 z) in Maj() argument 28 return (x & y) | (z & (x | y)); in Maj() 31 #define e0(x) (ror32(x, 2) ^ ror32(x, 13) ^ ror32(x, 22)) argument 32 #define e1(x) (ror32(x, 6) ^ ror32(x, 11) ^ ror32(x, 25)) argument 33 #define s0(x) (ror32(x, 7) ^ ror32(x, 18) ^ (x >> 3)) argument 34 #define s1(x) (ror32(x, 17) ^ ror32(x, 19) ^ (x >> 10)) argument
|
/lib/raid6/ |
D | altivec.uc | 43 #define NBYTES(x) ((vector signed char) {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x})
|
D | s390vx.uc | 30 * vector register x. 32 static inline void SHLBYTE(int x, int y) 34 asm volatile ("VAB %0,%1,%1" : : "i" (x), "i" (y)); 41 * register x. 43 static inline void MASK(int x, int y) 45 asm volatile ("VESRAVB %0,%1,24" : : "i" (x), "i" (y)); 48 static inline void AND(int x, int y, int z) 50 asm volatile ("VN %0,%1,%2" : : "i" (x), "i" (y), "i" (z)); 53 static inline void XOR(int x, int y, int z) 55 asm volatile ("VX %0,%1,%2" : : "i" (x), "i" (y), "i" (z)); [all …]
|
/lib/lzo/ |
D | lzo1x_decompress_safe.c | 23 #define HAVE_IP(x) ((size_t)(ip_end - ip) >= (size_t)(x)) argument 24 #define HAVE_OP(x) ((size_t)(op_end - op) >= (size_t)(x)) argument 25 #define NEED_IP(x) if (!HAVE_IP(x)) goto input_overrun argument 26 #define NEED_OP(x) if (!HAVE_OP(x)) goto output_overrun argument
|