Lines Matching +full:16 +full:v
11 #define CHECK_ENC_GET_U(tp, v, field, res) do { \ argument
15 _res = u##tp##_encode_bits(v, field); \
17 "u" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != " #res "\n", \
20 u##tp##_get_bits(_res, field) != v); \
24 #define CHECK_ENC_GET_LE(tp, v, field, res) do { \ argument
28 _res = le##tp##_encode_bits(v, field); \
31 "le" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != 0x%llx",\
35 le##tp##_get_bits(_res, field) != v);\
39 #define CHECK_ENC_GET_BE(tp, v, field, res) do { \ argument
43 _res = be##tp##_encode_bits(v, field); \
46 "be" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != 0x%llx", \
50 be##tp##_get_bits(_res, field) != v);\
54 #define CHECK_ENC_GET(tp, v, field, res) do { \ argument
55 CHECK_ENC_GET_U(tp, v, field, res); \
56 CHECK_ENC_GET_LE(tp, v, field, res); \
57 CHECK_ENC_GET_BE(tp, v, field, res); \
68 CHECK_ENC_GET(16, 1, 0x000f, 0x0001); in test_bitfields_constants()
69 CHECK_ENC_GET(16, 3, 0x00f0, 0x0030); in test_bitfields_constants()
70 CHECK_ENC_GET(16, 5, 0x0f00, 0x0500); in test_bitfields_constants()
71 CHECK_ENC_GET(16, 7, 0xf000, 0x7000); in test_bitfields_constants()
72 CHECK_ENC_GET(16, 14, 0x000f, 0x000e); in test_bitfields_constants()
73 CHECK_ENC_GET(16, 15, 0x00f0, 0x00f0); in test_bitfields_constants()
96 u64 v; \
98 for (v = 0; v < 1 << hweight32(mask); v++) \
100 tp##_encode_bits(v, mask) != v << __ffs64(mask));\
132 CHECK_ENC_GET(16, 16, 0x0f00, 0x1000); in test_bitfields_compile()