Lines Matching +full:hi +full:- +full:z

9 #define SHRT_MIN	((s16)(-SHRT_MAX - 1))
11 #define INT_MIN (-INT_MAX - 1)
14 #define LONG_MIN (-LONG_MAX - 1)
17 #define LLONG_MIN (-LLONG_MAX - 1)
25 #define S8_MIN ((s8)(-S8_MAX - 1))
28 #define S16_MIN ((s16)(-S16_MAX - 1))
31 #define S32_MIN ((s32)(-S32_MAX - 1))
34 #define S64_MIN ((s64)(-S64_MAX - 1))
44 #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
45 #define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a))
48 #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
58 #define __round_mask(x, y) ((__typeof__(x))((y)-1))
59 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
62 #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
63 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
68 #define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d))
76 /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */
80 (((x) + (__y - 1)) / __y) * __y; \
86 __x - (__x % (y)); \
99 (((typeof(x))-1) > 0 || \
100 ((typeof(divisor))-1) > 0 || (__x) > 0) ? \
102 (((__x) - ((__d) / 2)) / (__d)); \
106 * Same as above but for u64 dividends. divisor must be a 32-bit
131 * upper_32_bits - return bits 32-63 of a number
134 * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
136 * 32-bits.
141 * lower_32_bits - return bits 0-31 of a number
149 * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
156 ret = (__x < 0) ? -__x : __x; \
159 ret = (__x < 0) ? -__x : __x; \
166 (__x < 0) ? -__x : __x; \
171 * strict type-checking.. See the
186 #define min3(x, y, z) min((typeof(x))min(x, y), z) argument
187 #define max3(x, y, z) max((typeof(x))max(x, y), z) argument
190 * min_not_zero - return the minimum that is _not_ zero, unless both are zero
200 * clamp - return a value clamped to a given range with strict typechecking
203 * @hi: highest allowable value
205 * This macro does strict typechecking of lo/hi to make sure they are of the
208 #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) argument
227 * clamp_t - return a value clamped to a given range using a given type
231 * @hi: maximum allowable value
236 #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) argument
239 * clamp_val - return a value clamped to a given range using val's type
242 * @hi: maximum allowable value
249 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) argument
253 * swap - swap value of @a and @b
259 * container_of - cast a member of a structure out to the containing structure
266 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
267 (type *)( (char *)__mptr - offsetof(type,member) );})