Lines Matching refs:value
34 int CountLeadingSignBitsFallBack(int64_t value, int width) {
36 if (width < 64) VIXL_ASSERT(IsIntN(width, value));
37 if (value >= 0) {
38 return CountLeadingZeros(value, width) - 1;
40 return CountLeadingZeros(~value, width) - 1;
45 int CountLeadingZerosFallBack(uint64_t value, int width) {
47 if (value == 0) {
51 value = value << (64 - width);
52 if ((value & UINT64_C(0xffffffff00000000)) == 0) {
54 value = value << 32;
56 if ((value & UINT64_C(0xffff000000000000)) == 0) {
58 value = value << 16;
60 if ((value & UINT64_C(0xff00000000000000)) == 0) {
62 value = value << 8;
64 if ((value & UINT64_C(0xf000000000000000)) == 0) {
66 value = value << 4;
68 if ((value & UINT64_C(0xc000000000000000)) == 0) {
70 value = value << 2;
72 if ((value & UINT64_C(0x8000000000000000)) == 0) {
75 count += (value == 0);
80 int CountSetBitsFallBack(uint64_t value, int width) {
84 value &= (UINT64_C(0xffffffffffffffff) >> (64 - width));
89 // An example for an 8-bit value:
92 // value = h+g f+e d+c b+a
94 // value = h+g+f+e d+c+b+a
96 // value = h+g+f+e+d+c+b+a
108 value = ((value >> shift) & kMasks[i]) + (value & kMasks[i]);
111 return static_cast<int>(value);
115 int CountTrailingZerosFallBack(uint64_t value, int width) {
118 value = value << (64 - width);
119 if ((value & UINT64_C(0xffffffff)) == 0) {
121 value = value >> 32;
123 if ((value & 0xffff) == 0) {
125 value = value >> 16;
127 if ((value & 0xff) == 0) {
129 value = value >> 8;
131 if ((value & 0xf) == 0) {
133 value = value >> 4;
135 if ((value & 0x3) == 0) {
137 value = value >> 2;
139 if ((value & 0x1) == 0) {
142 count += (value == 0);