nix: add support to build with GCC

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-09-23 15:50:29 +05:30
parent 6c33c77ef3
commit c3bf8b0ae8
14 changed files with 211 additions and 83 deletions

View File

@@ -13,6 +13,7 @@ class CpuFixture {
std::vector<uint8_t>(Header::HEADER_SIZE)))) {}
protected:
// TODO: test with other conditions
void exec(arm::InstructionData data, Condition condition = Condition::AL) {
arm::Instruction instruction(condition, data);
cpu.exec_arm(instruction);
@@ -82,7 +83,7 @@ TEST_CASE_METHOD(CpuFixture, "Multiply", TAG) {
// with accumulate
{
uint32_t result = 234912349ull * 124897ull + 99999ull & 0xFFFFFFFF;
uint32_t result = (234912349ull * 124897ull + 99999ull) & 0xFFFFFFFF;
multiply->acc = true;
exec(data);
@@ -91,7 +92,7 @@ TEST_CASE_METHOD(CpuFixture, "Multiply", TAG) {
// with set
{
uint32_t result = 234912349ull * 124897ull + 99999ull & 0xFFFFFFFF;
uint32_t result = (234912349ull * 124897ull + 99999ull) & 0xFFFFFFFF;
multiply->set = true;
exec(data);