Lines Matching refs:low
126 #define EFX_EXTRACT_NATIVE(native_element, min, max, low, high) \ argument
127 ((low) > (max) || (high) < (min) ? 0 : \
128 (low) > (min) ? \
129 (native_element) >> ((low) - (min)) : \
130 (native_element) << ((min) - (low)))
136 #define EFX_EXTRACT64(element, min, max, low, high) \ argument
137 EFX_EXTRACT_NATIVE(le64_to_cpu(element), min, max, low, high)
143 #define EFX_EXTRACT32(element, min, max, low, high) \ argument
144 EFX_EXTRACT_NATIVE(le32_to_cpu(element), min, max, low, high)
146 #define EFX_EXTRACT_OWORD64(oword, low, high) \ argument
147 ((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \
148 EFX_EXTRACT64((oword).u64[1], 64, 127, low, high)) & \
149 EFX_MASK64((high) + 1 - (low)))
151 #define EFX_EXTRACT_QWORD64(qword, low, high) \ argument
152 (EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \
153 EFX_MASK64((high) + 1 - (low)))
155 #define EFX_EXTRACT_OWORD32(oword, low, high) \ argument
156 ((EFX_EXTRACT32((oword).u32[0], 0, 31, low, high) | \
157 EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \
158 EFX_EXTRACT32((oword).u32[2], 64, 95, low, high) | \
159 EFX_EXTRACT32((oword).u32[3], 96, 127, low, high)) & \
160 EFX_MASK32((high) + 1 - (low)))
162 #define EFX_EXTRACT_QWORD32(qword, low, high) \ argument
163 ((EFX_EXTRACT32((qword).u32[0], 0, 31, low, high) | \
164 EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \
165 EFX_MASK32((high) + 1 - (low)))
167 #define EFX_EXTRACT_DWORD(dword, low, high) \ argument
168 (EFX_EXTRACT32((dword).u32[0], 0, 31, low, high) & \
169 EFX_MASK32((high) + 1 - (low)))
245 #define EFX_INSERT_NATIVE64(min, max, low, high, value) \ argument
246 (((low > max) || (high < min)) ? 0 : \
247 ((low > min) ? \
248 (((u64) (value)) << (low - min)) : \
249 (((u64) (value)) >> (min - low))))
251 #define EFX_INSERT_NATIVE32(min, max, low, high, value) \ argument
252 (((low > max) || (high < min)) ? 0 : \
253 ((low > min) ? \
254 (((u32) (value)) << (low - min)) : \
255 (((u32) (value)) >> (min - low))))
257 #define EFX_INSERT_NATIVE(min, max, low, high, value) \ argument
258 ((((max - min) >= 32) || ((high - low) >= 32)) ? \
259 EFX_INSERT_NATIVE64(min, max, low, high, value) : \
260 EFX_INSERT_NATIVE32(min, max, low, high, value))
442 #define EFX_INSERT64(min, max, low, high, value) \ argument
443 cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value))
445 #define EFX_INSERT32(min, max, low, high, value) \ argument
446 cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))
448 #define EFX_INPLACE_MASK64(min, max, low, high) \ argument
449 EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))
451 #define EFX_INPLACE_MASK32(min, max, low, high) \ argument
452 EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))
454 #define EFX_SET_OWORD64(oword, low, high, value) do { \ argument
456 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
457 | EFX_INSERT64(0, 63, low, high, value)); \
459 & ~EFX_INPLACE_MASK64(64, 127, low, high)) \
460 | EFX_INSERT64(64, 127, low, high, value)); \
463 #define EFX_SET_QWORD64(qword, low, high, value) do { \ argument
465 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
466 | EFX_INSERT64(0, 63, low, high, value)); \
469 #define EFX_SET_OWORD32(oword, low, high, value) do { \ argument
471 & ~EFX_INPLACE_MASK32(0, 31, low, high)) \
472 | EFX_INSERT32(0, 31, low, high, value)); \
474 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
475 | EFX_INSERT32(32, 63, low, high, value)); \
477 & ~EFX_INPLACE_MASK32(64, 95, low, high)) \
478 | EFX_INSERT32(64, 95, low, high, value)); \
480 & ~EFX_INPLACE_MASK32(96, 127, low, high)) \
481 | EFX_INSERT32(96, 127, low, high, value)); \
484 #define EFX_SET_QWORD32(qword, low, high, value) do { \ argument
486 & ~EFX_INPLACE_MASK32(0, 31, low, high)) \
487 | EFX_INSERT32(0, 31, low, high, value)); \
489 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
490 | EFX_INSERT32(32, 63, low, high, value)); \
493 #define EFX_SET_DWORD32(dword, low, high, value) do { \ argument
495 & ~EFX_INPLACE_MASK32(0, 31, low, high)) \
496 | EFX_INSERT32(0, 31, low, high, value)); \