| /lib/crypto/ |
| A D | chacha.c | 25 x[0] += x[4]; x[12] = rol32(x[12] ^ x[0], 16); in chacha_permute() 26 x[1] += x[5]; x[13] = rol32(x[13] ^ x[1], 16); in chacha_permute() 27 x[2] += x[6]; x[14] = rol32(x[14] ^ x[2], 16); in chacha_permute() 28 x[3] += x[7]; x[15] = rol32(x[15] ^ x[3], 16); in chacha_permute() 30 x[8] += x[12]; x[4] = rol32(x[4] ^ x[8], 12); in chacha_permute() 31 x[9] += x[13]; x[5] = rol32(x[5] ^ x[9], 12); in chacha_permute() 32 x[10] += x[14]; x[6] = rol32(x[6] ^ x[10], 12); in chacha_permute() 33 x[11] += x[15]; x[7] = rol32(x[7] ^ x[11], 12); in chacha_permute() 35 x[0] += x[4]; x[12] = rol32(x[12] ^ x[0], 8); in chacha_permute() 36 x[1] += x[5]; x[13] = rol32(x[13] ^ x[1], 8); in chacha_permute() [all …]
|
| A D | arc4.c | 18 ctx->x = 1; in arc4_setkey() 41 u32 x, y, a, b; in arc4_crypt() local 47 x = ctx->x; in arc4_crypt() 50 a = S[x]; in arc4_crypt() 57 S[x] = b; in arc4_crypt() 58 x = (x + 1) & 0xff; in arc4_crypt() 59 ta = S[x]; in arc4_crypt() 70 ctx->x = x; in arc4_crypt()
|
| A D | gf128mul.c | 140 static void gf128mul_x8_lle(be128 *x) in gf128mul_x8_lle() argument 142 u64 a = be64_to_cpu(x->a); in gf128mul_x8_lle() 143 u64 b = be64_to_cpu(x->b); in gf128mul_x8_lle() 153 u64 a = be64_to_cpu(x->a); in gf128mul_x8_lle_ti() 154 u64 b = be64_to_cpu(x->b); in gf128mul_x8_lle_ti() 161 static void gf128mul_x8_bbe(be128 *x) in gf128mul_x8_bbe() argument 163 u64 a = be64_to_cpu(x->a); in gf128mul_x8_bbe() 164 u64 b = be64_to_cpu(x->b); in gf128mul_x8_bbe() 168 x->b = cpu_to_be64((b << 8) ^ _tt); in gf128mul_x8_bbe() 173 u64 a = le64_to_cpu(x->a); in gf128mul_x8_ble() [all …]
|
| A D | sha256.c | 49 #define Ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) argument 50 #define Maj(x, y, z) (((x) & (y)) | ((z) & ((x) | (y)))) argument 51 #define e0(x) (ror32((x), 2) ^ ror32((x), 13) ^ ror32((x), 22)) argument 52 #define e1(x) (ror32((x), 6) ^ ror32((x), 11) ^ ror32((x), 25)) argument 53 #define s0(x) (ror32((x), 7) ^ ror32((x), 18) ^ ((x) >> 3)) argument 54 #define s1(x) (ror32((x), 17) ^ ror32((x), 19) ^ ((x) >> 10)) argument
|
| A D | sha512.c | 65 #define Ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) argument 66 #define Maj(x, y, z) (((x) & (y)) | ((z) & ((x) | (y)))) argument 67 #define e0(x) (ror64((x), 28) ^ ror64((x), 34) ^ ror64((x), 39)) argument 68 #define e1(x) (ror64((x), 14) ^ ror64((x), 18) ^ ror64((x), 41)) argument 69 #define s0(x) (ror64((x), 1) ^ ror64((x), 8) ^ ((x) >> 7)) argument 70 #define s1(x) (ror64((x), 19) ^ ror64((x), 61) ^ ((x) >> 6)) argument
|
| /lib/crypto/mpi/ |
| A D | mpi-bit.c | 113 if (x == a) { in mpi_rshift() 116 x->nlimbs = 0; in mpi_rshift() 122 x->d[i] = x->d[i+nlimbs]; in mpi_rshift() 123 x->d[i] = 0; in mpi_rshift() 127 mpihelp_rshift(x->d, x->d, x->nlimbs, nbits); in mpi_rshift() 138 x->nlimbs = i; in mpi_rshift() 146 x->d[i] = x->d[i+nlimbs]; in mpi_rshift() 147 x->d[i] = 0; in mpi_rshift() 151 mpihelp_rshift(x->d, x->d, x->nlimbs, nbits); in mpi_rshift() 163 mpihelp_rshift(x->d, a->d, x->nlimbs, nbits); in mpi_rshift() [all …]
|
| A 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() 35 *res_ptr++ = x; /* and store */ 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() 75 if (s2_limb > x) { in mpihelp_sub_1() 77 x = *s1_ptr++; in mpihelp_sub_1() 78 *res_ptr++ = x - 1; in mpihelp_sub_1() [all …]
|
| A 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()
|
| /lib/crypto/mips/ |
| A D | chacha-core.S | 68 x( 0); \ 69 x( 1); \ 70 x( 2); \ 71 x( 3); \ 72 x( 4); \ 83 x(15); 101 x( 0); 119 #define PLUS_ONE(x) PLUS_ONE_ ## x argument 137 swl X ## x, (x*4)+MSB ## (OUT); \ 138 swr X ## x, (x*4)+LSB ## (OUT); [all …]
|
| /lib/math/ |
| A D | prime_numbers.c | 83 if ((x % y) == 0) in slow_is_prime_number() 93 while (x < ULONG_MAX && !slow_is_prime_number(++x)) in slow_next_prime_number() 96 return x; in slow_next_prime_number() 106 m = 2 * x; in clear_multiples() 112 m += x; in clear_multiples() 115 return x; in clear_multiples() 132 sz = 2 * x; in expand_to_next_prime() 133 if (sz < x) in expand_to_next_prime() 144 if (x < p->last) { in expand_to_next_prime() 212 x = find_next_bit(p->primes, p->last, x + 1); in next_prime_number() [all …]
|
| A D | int_sqrt.c | 20 unsigned long int_sqrt(unsigned long x) in int_sqrt() argument 24 if (x <= 1) in int_sqrt() 25 return x; in int_sqrt() 27 m = 1UL << (__fls(x) & ~1UL); in int_sqrt() 32 if (x >= b) { in int_sqrt() 33 x -= b; in int_sqrt() 49 u32 int_sqrt64(u64 x) in int_sqrt64() argument 53 if (x <= ULONG_MAX) in int_sqrt64() 54 return int_sqrt((unsigned long) x); in int_sqrt64() 61 if (x >= b) { in int_sqrt64() [all …]
|
| /lib/tests/ |
| A D | randstruct_kunit.c | 30 #define do_enum(x, ignored) MEMBER_NAME_ ## x, argument 39 #define unsigned_long_member(x, ignored) unsigned long x; argument 51 #define func_member(x, ignored) size_t (*x)(int); argument 60 #define func_body(x, ignored) \ argument 117 if (offsetof(untouched, x) != offsetof(shuffled, x)) \ 120 offsetof(shuffled, x), \ 121 offsetof(untouched, x)); \ 184 KUNIT_EXPECT_EQ_MSG(test, untouched->x, shuffled->x, \ 205 shuffled->shuffled.x, \ 217 KUNIT_EXPECT_PTR_EQ_MSG(test, untouched->x, shuffled->x, \ [all …]
|
| A D | hashtable_test.c | 81 x->visited++; in hashtable_test_hash_add() 82 if (x->key == a.key) in hashtable_test_hash_add() 84 else if (x->key == b.key) in hashtable_test_hash_add() 110 x->visited++; in hashtable_test_hash_del() 126 struct hashtable_test_entry *x; in hashtable_test_hash_for_each() local 140 x->visited += 1; in hashtable_test_hash_for_each() 170 x->visited += 1; in hashtable_test_hash_for_each_safe() 176 hash_del(&x->node); in hashtable_test_hash_for_each_safe() 209 x->visited += 1; in hashtable_test_hash_for_each_possible() 264 x->visited += 1; in hashtable_test_hash_for_each_possible_safe() [all …]
|
| A D | test_hash.c | 36 mod255(u32 x) in mod255() argument 38 x = (x & 0xffff) + (x >> 16); /* 1 <= x <= 0x1fffe */ in mod255() 39 x = (x & 0xff) + (x >> 8); /* 1 <= x <= 0x2fd */ in mod255() 40 x = (x & 0xff) + (x >> 8); /* 1 <= x <= 0x100 */ in mod255() 41 x = (x & 0xff) + (x >> 8); /* 1 <= x <= 0xff */ in mod255() 42 return x; in mod255()
|
| /lib/ |
| A 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() 29 struct exception_table_entry *x = a, *y = b, tmp; in swap_ex() local 32 tmp = *x; in swap_ex() 33 x->insn = y->insn + delta; in swap_ex() 37 swap_ex_entry_fixup(x, y, tmp, delta); in swap_ex() 39 x->fixup = y->fixup + delta; in swap_ex() 53 const struct exception_table_entry *x = a, *y = b; in cmp_ex_sort() local 56 if (ex_to_insn(x) > ex_to_insn(y)) in cmp_ex_sort() [all …]
|
| A D | locking-selftest.c | 229 #define L(x) spin_lock(&lock_##x) argument 230 #define U(x) spin_unlock(&lock_##x) argument 231 #define LU(x) L(x); U(x) argument 236 #define WLU(x) WL(x); WU(x) argument 240 #define RLU(x) RL(x); RU(x) argument 252 #define WSU(x) up_write(&rwsem_##x) argument 255 #define RSU(x) up_read(&rwsem_##x) argument 263 #define WWAD(x) ww_acquire_done(x) argument 264 #define WWAF(x) ww_acquire_fini(x) argument 269 #define WWU(x) ww_mutex_unlock(x) argument [all …]
|
| A D | checksum.c | 140 static inline u32 from64to32(u64 x) in from64to32() argument 143 x = (x & 0xffffffff) + (x >> 32); in from64to32() 145 x = (x & 0xffffffff) + (x >> 32); in from64to32() 146 return (u32)x; in from64to32()
|
| A 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()
|
| /lib/raid6/ |
| A D | s390vx.uc | 29 * vector register x. 31 #define SHLBYTE(x, y) fpu_vab(x, y, y) 37 * register x. 39 #define MASK(x, y) fpu_vesravb(x, y, 24) 41 #define AND(x, y, z) fpu_vn(x, y, z) 42 #define XOR(x, y, z) fpu_vx(x, y, z) 43 #define LOAD_DATA(x, ptr) fpu_vlm(x, x + $# - 1, ptr) 44 #define STORE_DATA(x, ptr) fpu_vstm(x, x + $# - 1, ptr) 45 #define COPY_VEC(x, y) fpu_vlr(x, y)
|
| A 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})
|
| /lib/math/tests/ |
| A D | prime_numbers_kunit.c | 22 unsigned long x, last, next; in prime_numbers_test() local 24 for (last = 0, x = 2; x < max; x++) { in prime_numbers_test() 25 const bool slow = slow_is_prime_number(x); in prime_numbers_test() 26 const bool fast = is_prime_number(x); in prime_numbers_test() 28 KUNIT_ASSERT_EQ_MSG(test, slow, fast, "is-prime(%lu)", x); in prime_numbers_test() 34 KUNIT_ASSERT_EQ_MSG(test, next, x, "next-prime(%lu)", last); in prime_numbers_test()
|
| /lib/zstd/common/ |
| A D | compiler.h | 142 #define LIKELY(x) (__builtin_expect((x), 1)) argument 143 #define UNLIKELY(x) (__builtin_expect((x), 0)) argument 157 # define ZSTD_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) argument 159 # define ZSTD_HAS_C_ATTRIBUTE(x) 0 argument 165 #define ZSTD_HAS_CPP_ATTRIBUTE(x) 0 argument
|
| A D | debug.h | 92 #define STRINGIFY(x) #x argument 93 #define TOSTRING(x) STRINGIFY(x) argument
|
| /lib/crypto/x86/ |
| A D | chacha_glue.c | 64 state->x[12] += 8; in chacha_dosimd() 69 state->x[12] += chacha_advance(bytes, 8); in chacha_dosimd() 75 state->x[12] += chacha_advance(bytes, 4); in chacha_dosimd() 81 state->x[12] += chacha_advance(bytes, 2); in chacha_dosimd() 92 state->x[12] += 8; in chacha_dosimd() 96 state->x[12] += chacha_advance(bytes, 8); in chacha_dosimd() 101 state->x[12] += chacha_advance(bytes, 4); in chacha_dosimd() 106 state->x[12] += chacha_advance(bytes, 2); in chacha_dosimd() 116 state->x[12] += 4; in chacha_dosimd() 120 state->x[12] += chacha_advance(bytes, 4); in chacha_dosimd() [all …]
|
| /lib/crc/riscv/ |
| A D | crc-clmul-template.h | 63 # define crc_load_long(x) le64_to_cpup(x) argument 65 # define crc_load_long(x) be64_to_cpup(x) argument 69 # define crc_load_long(x) le32_to_cpup(x) argument 71 # define crc_load_long(x) be32_to_cpup(x) argument
|