mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Make the constants fit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9dfa1671fc
commit
dcafd04163
@ -25,7 +25,7 @@ TEST(MathExtras, isPowerOf2_64) {
|
||||
EXPECT_TRUE(isPowerOf2_64(1LL << 46));
|
||||
EXPECT_TRUE(isPowerOf2_64(1LL << 12));
|
||||
EXPECT_FALSE(isPowerOf2_64((1LL << 53) + 3));
|
||||
EXPECT_FALSE(isPowerOf2_64(0xABCDEF0ABCDEF0));
|
||||
EXPECT_FALSE(isPowerOf2_64(0xABCDEF0ABCDEF0LL));
|
||||
}
|
||||
|
||||
TEST(MathExtras, ByteSwap_32) {
|
||||
@ -34,8 +34,8 @@ TEST(MathExtras, ByteSwap_32) {
|
||||
}
|
||||
|
||||
TEST(MathExtras, ByteSwap_64) {
|
||||
EXPECT_EQ(0x8877665544332211ULL, ByteSwap_64(0x1122334455667788));
|
||||
EXPECT_EQ(0x1100FFEEDDCCBBAAULL, ByteSwap_64(0xAABBCCDDEEFF0011));
|
||||
EXPECT_EQ(0x8877665544332211ULL, ByteSwap_64(0x1122334455667788LL));
|
||||
EXPECT_EQ(0x1100FFEEDDCCBBAAULL, ByteSwap_64(0xAABBCCDDEEFF0011LL));
|
||||
}
|
||||
|
||||
TEST(MathExtras, CountLeadingZeros_32) {
|
||||
@ -47,7 +47,7 @@ TEST(MathExtras, CountLeadingZeros_32) {
|
||||
}
|
||||
|
||||
TEST(MathExtras, CountLeadingZeros_64) {
|
||||
EXPECT_EQ(8u, CountLeadingZeros_64(0x00F1234500F12345));
|
||||
EXPECT_EQ(8u, CountLeadingZeros_64(0x00F1234500F12345LL));
|
||||
EXPECT_EQ(1u, CountLeadingZeros_64(1LL << 62));
|
||||
for (unsigned i = 0; i <= 62; ++i) {
|
||||
EXPECT_EQ(63 - i, CountLeadingZeros_64(1LL << i));
|
||||
@ -64,7 +64,7 @@ TEST(MathExtras, CountLeadingOnes_32) {
|
||||
TEST(MathExtras, CountLeadingOnes_64) {
|
||||
for (int i = 62; i >= 0; --i) {
|
||||
// Start with all ones and unset some bit.
|
||||
EXPECT_EQ(63u - i, CountLeadingOnes_64(0xFFFFFFFFFFFFFFFF ^ (1LL << i)));
|
||||
EXPECT_EQ(63u - i, CountLeadingOnes_64(0xFFFFFFFFFFFFFFFFLL ^ (1LL << i)));
|
||||
}
|
||||
for (int i = 30; i >= 0; --i) {
|
||||
// Start with all ones and unset some bit.
|
||||
|
Loading…
Reference in New Issue
Block a user