Lines Matching refs:shift
49 TRACED_FORRANGE(uint32_t, shift, 0, 31) { in TEST()
50 EXPECT_EQ(31u - shift, CountLeadingZeros32(1u << shift)); in TEST()
59 TRACED_FORRANGE(uint32_t, shift, 0, 63) { in TEST()
60 EXPECT_EQ(63u - shift, CountLeadingZeros64(V8_UINT64_C(1) << shift)); in TEST()
70 TRACED_FORRANGE(uint32_t, shift, 0, 31) { in TEST()
71 EXPECT_EQ(shift, CountTrailingZeros32(1u << shift)); in TEST()
80 TRACED_FORRANGE(uint32_t, shift, 0, 63) { in TEST()
81 EXPECT_EQ(shift, CountTrailingZeros64(V8_UINT64_C(1) << shift)); in TEST()
90 TRACED_FORRANGE(uint32_t, shift, 0, 31) { in TEST()
91 EXPECT_TRUE(IsPowerOfTwo32(1U << shift)); in TEST()
92 EXPECT_FALSE(IsPowerOfTwo32((1U << shift) + 5U)); in TEST()
93 EXPECT_FALSE(IsPowerOfTwo32(~(1U << shift))); in TEST()
95 TRACED_FORRANGE(uint32_t, shift, 2, 31) { in TEST()
96 EXPECT_FALSE(IsPowerOfTwo32((1U << shift) - 1U)); in TEST()
104 TRACED_FORRANGE(uint32_t, shift, 0, 63) { in TEST()
105 EXPECT_TRUE(IsPowerOfTwo64(V8_UINT64_C(1) << shift)); in TEST()
106 EXPECT_FALSE(IsPowerOfTwo64((V8_UINT64_C(1) << shift) + 5U)); in TEST()
107 EXPECT_FALSE(IsPowerOfTwo64(~(V8_UINT64_C(1) << shift))); in TEST()
109 TRACED_FORRANGE(uint32_t, shift, 2, 63) { in TEST()
110 EXPECT_FALSE(IsPowerOfTwo64((V8_UINT64_C(1) << shift) - 1U)); in TEST()
117 TRACED_FORRANGE(uint32_t, shift, 0, 31) { in TEST()
118 EXPECT_EQ(1u << shift, RoundUpToPowerOfTwo32(1u << shift)); in TEST()
133 TRACED_FORRANGE(uint32_t, shift, 0, 31) { in TEST()
134 EXPECT_EQ(1u << shift, RoundDownToPowerOfTwo32(1u << shift)); in TEST()
143 TRACED_FORRANGE(uint32_t, shift, 0, 31) { in TEST()
144 EXPECT_EQ(0u, RotateRight32(0u, shift)); in TEST()
153 TRACED_FORRANGE(uint64_t, shift, 0, 63) { in TEST()
154 EXPECT_EQ(0u, RotateRight64(0u, shift)); in TEST()