Lines Matching +full:- +full:15 +full:v
1 // SPDX-License-Identifier: GPL-2.0+
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); \
73 CHECK_ENC_GET(16, 15, 0x00f0, 0x00f0); in test_bitfields_constants()
78 CHECK_ENC_GET_U(8, 15, 0xf0, 0xf0); in test_bitfields_constants()
85 CHECK_ENC_GET(32, 15, 0xf0000000, 0xf0000000); in test_bitfields_constants()
92 CHECK_ENC_GET(64, 15, 0xf000000000000000ull, 0xf000000000000000ull); 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));\