mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Cleanup r211507
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -242,6 +242,8 @@ int compareImpl(uint64_t L, uint64_t R, int ScaleDiff);
|
|||||||
/// for greater than.
|
/// for greater than.
|
||||||
template <class DigitsT>
|
template <class DigitsT>
|
||||||
int compare(DigitsT LDigits, int16_t LScale, DigitsT RDigits, int16_t RScale) {
|
int compare(DigitsT LDigits, int16_t LScale, DigitsT RDigits, int16_t RScale) {
|
||||||
|
static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned");
|
||||||
|
|
||||||
// Check for zero.
|
// Check for zero.
|
||||||
if (!LDigits)
|
if (!LDigits)
|
||||||
return RDigits ? -1 : 0;
|
return RDigits ? -1 : 0;
|
||||||
|
@ -285,7 +285,7 @@ TEST(ScaledNumberHelpersTest, getLgCeiling) {
|
|||||||
EXPECT_EQ(INT32_MIN, getLgCeiling(UINT64_C(0), 1));
|
EXPECT_EQ(INT32_MIN, getLgCeiling(UINT64_C(0), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ScaledNumberHelpersTest, Compare) {
|
TEST(ScaledNumberHelpersTest, compare) {
|
||||||
EXPECT_EQ(0, compare(UINT32_C(0), 0, UINT32_C(0), 1));
|
EXPECT_EQ(0, compare(UINT32_C(0), 0, UINT32_C(0), 1));
|
||||||
EXPECT_EQ(0, compare(UINT32_C(0), 0, UINT32_C(0), -10));
|
EXPECT_EQ(0, compare(UINT32_C(0), 0, UINT32_C(0), -10));
|
||||||
EXPECT_EQ(0, compare(UINT32_C(0), 0, UINT32_C(0), 20));
|
EXPECT_EQ(0, compare(UINT32_C(0), 0, UINT32_C(0), 20));
|
||||||
|
Reference in New Issue
Block a user