• Home
  • Raw
  • Download

Lines Matching +full:64 +full:bit

24 #define TEST(bit, op, c_op, val)				\  argument
26 atomic##bit##_set(&v, v0); \
28 atomic##bit##_##op(val, &v); \
30 WARN(atomic##bit##_read(&v) != r, "%Lx != %Lx\n", \
31 (unsigned long long)atomic##bit##_read(&v), \
37 * @test should be a macro accepting parameters (bit, op, ...)
40 #define FAMILY_TEST(test, bit, op, args...) \ argument
42 test(bit, op, ##args); \
43 test(bit, op##_acquire, ##args); \
44 test(bit, op##_release, ##args); \
45 test(bit, op##_relaxed, ##args); \
48 #define TEST_RETURN(bit, op, c_op, val) \ argument
50 atomic##bit##_set(&v, v0); \
53 BUG_ON(atomic##bit##_##op(val, &v) != r); \
54 BUG_ON(atomic##bit##_read(&v) != r); \
57 #define TEST_FETCH(bit, op, c_op, val) \ argument
59 atomic##bit##_set(&v, v0); \
62 BUG_ON(atomic##bit##_##op(val, &v) != v0); \
63 BUG_ON(atomic##bit##_read(&v) != r); \
66 #define RETURN_FAMILY_TEST(bit, op, c_op, val) \ argument
68 FAMILY_TEST(TEST_RETURN, bit, op, c_op, val); \
71 #define FETCH_FAMILY_TEST(bit, op, c_op, val) \ argument
73 FAMILY_TEST(TEST_FETCH, bit, op, c_op, val); \
76 #define TEST_ARGS(bit, op, init, ret, expect, args...) \ argument
78 atomic##bit##_set(&v, init); \
79 BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \
80 BUG_ON(atomic##bit##_read(&v) != expect); \
83 #define XCHG_FAMILY_TEST(bit, init, new) \ argument
85 FAMILY_TEST(TEST_ARGS, bit, xchg, init, init, new, new); \
88 #define CMPXCHG_FAMILY_TEST(bit, init, new, wrong) \ argument
90 FAMILY_TEST(TEST_ARGS, bit, cmpxchg, \
92 FAMILY_TEST(TEST_ARGS, bit, cmpxchg, \
96 #define INC_RETURN_FAMILY_TEST(bit, i) \ argument
98 FAMILY_TEST(TEST_ARGS, bit, inc_return, \
102 #define DEC_RETURN_FAMILY_TEST(bit, i) \ argument
104 FAMILY_TEST(TEST_ARGS, bit, dec_return, \
170 TEST(64, add, +=, onestwos); in test_atomic64()
171 TEST(64, add, +=, -one); in test_atomic64()
172 TEST(64, sub, -=, onestwos); in test_atomic64()
173 TEST(64, sub, -=, -one); in test_atomic64()
174 TEST(64, or, |=, v1); in test_atomic64()
175 TEST(64, and, &=, v1); in test_atomic64()
176 TEST(64, xor, ^=, v1); in test_atomic64()
177 TEST(64, andnot, &= ~, v1); in test_atomic64()
179 RETURN_FAMILY_TEST(64, add_return, +=, onestwos); in test_atomic64()
180 RETURN_FAMILY_TEST(64, add_return, +=, -one); in test_atomic64()
181 RETURN_FAMILY_TEST(64, sub_return, -=, onestwos); in test_atomic64()
182 RETURN_FAMILY_TEST(64, sub_return, -=, -one); in test_atomic64()
184 FETCH_FAMILY_TEST(64, fetch_add, +=, onestwos); in test_atomic64()
185 FETCH_FAMILY_TEST(64, fetch_add, +=, -one); in test_atomic64()
186 FETCH_FAMILY_TEST(64, fetch_sub, -=, onestwos); in test_atomic64()
187 FETCH_FAMILY_TEST(64, fetch_sub, -=, -one); in test_atomic64()
189 FETCH_FAMILY_TEST(64, fetch_or, |=, v1); in test_atomic64()
190 FETCH_FAMILY_TEST(64, fetch_and, &=, v1); in test_atomic64()
191 FETCH_FAMILY_TEST(64, fetch_andnot, &= ~, v1); in test_atomic64()
192 FETCH_FAMILY_TEST(64, fetch_xor, ^=, v1); in test_atomic64()
204 INC_RETURN_FAMILY_TEST(64, v0); in test_atomic64()
205 DEC_RETURN_FAMILY_TEST(64, v0); in test_atomic64()
207 XCHG_FAMILY_TEST(64, v0, v1); in test_atomic64()
208 CMPXCHG_FAMILY_TEST(64, v0, v1, v2); in test_atomic64()
260 "x86-64", in test_atomics_init()