Lines Matching defs:value
93 inline bool IsPowerOf2(V value) {
94 return (value != 0) && ((value & (value - 1)) == 0);
99 int CountLeadingSignBitsFallBack(int64_t value, int width);
100 int CountLeadingZerosFallBack(uint64_t value, int width);
101 int CountSetBitsFallBack(uint64_t value, int width);
102 int CountTrailingZerosFallBack(uint64_t value, int width);
112 inline int CountLeadingSignBits(V value, int width = (sizeof(V) * 8)) {
115 VIXL_ASSERT((LLONG_MIN <= value) && (value <= LLONG_MAX));
118 int result = __builtin_clrsbll(value) - (ll_width - width);
119 // Check that the value fits in the specified width.
123 VIXL_ASSERT((INT64_MIN <= value) && (value <= INT64_MAX));
124 return CountLeadingSignBitsFallBack(value, width);
130 inline int CountLeadingZeros(V value, int width = (sizeof(V) * 8)) {
133 return (value == 0) ? 32 : __builtin_clz(static_cast<unsigned>(value));
135 return (value == 0) ? 64 : __builtin_clzll(value);
138 return CountLeadingZerosFallBack(value, width);
143 inline int CountSetBits(V value, int width = (sizeof(V) * 8)) {
146 return __builtin_popcount(static_cast<unsigned>(value));
148 return __builtin_popcountll(value);
151 return CountSetBitsFallBack(value, width);
156 inline int CountTrailingZeros(V value, int width = (sizeof(V) * 8)) {
159 return (value == 0) ? 32 : __builtin_ctz(static_cast<unsigned>(value));
161 return (value == 0) ? 64 : __builtin_ctzll(value);
164 return CountTrailingZerosFallBack(value, width);