32 #include <gtest/gtest.h> 40 TEST(CondCodes, FindCarryWithNoCarryIn8Bit)
49 TEST(CondCodes, FindNoCarryWithNoCarryIn8Bit)
58 TEST(CondCodes, FindCarryWithCarryIn8Bit)
67 TEST(CondCodes, FindNoCarryWithCarryIn8Bit)
76 TEST(CondCodes, FindCarryWithNoCarryIn32Bit)
85 TEST(CondCodes, FindNoCarryWithNoCarryIn32Bit)
90 TEST(CondCodes, FindCarryWithCarryIn32Bit)
105 TEST(CondCodes, FindCarryWithNoCarryIn64Bit)
111 0x8000000000000000));
120 0x0000000000000000));
127 0x7fffffffffffffff));
134 0x00000000ffffffff));
137 TEST(CondCodes, FindCarryWithCarryIn64Bit)
145 0x7fffffffffffffff));
154 0x0000000000000000));
162 0x7fffffffffffffff));
170 0x0000000000000001));
173 TEST(CondCodes, FindOverflow8Bit)
187 TEST(CondCodes, FindOverflow32Bit)
201 TEST(CondCodes, FindOverflow64Bit)
210 0x0000000000000001));
217 0x3fffffffffffffff));
230 TEST(CondCodes, OddParityOverflow)
235 TEST(CondCodes, EvenParityOverflow)
260 TEST(CondCodes, IsZeroOverflow)
TEST(CondCodes, FindCarryWithNoCarryIn8Bit)
#define EXPECT_TRUE(expr)
A macro which verifies that expr evaluates to true.
bool findNegative(int width, uint64_t dest)
Calculate the negative flag.
bool findZero(int width, uint64_t dest)
Calculate the zero flag.
#define EXPECT_FALSE(expr)
A macro which verifies that expr evaluates to false.
bool findParity(int width, uint64_t dest)
Calculate the parity of a value.
bool findCarry(int width, uint64_t dest, uint64_t src1, uint64_t src2)
Calculate the carry flag from an addition.
#define EXPECT_EQ(lhs, rhs)
A macro which verifies that lhs and rhs are equal to each other.
bool findOverflow(int width, uint64_t dest, uint64_t src1, uint64_t src2)
Calculate the overflow flag from an addition.