diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-05 10:16:37 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-05 10:16:37 +0100 |
commit | fc343acc4d81d06e5cba92b74de3565b6d12dfcf (patch) | |
tree | e5ed151f568d687eab36245e408b705eab5c0690 /qtmips_machine/tests | |
parent | b4118e4b758bd82010a9004167f75f176aba8397 (diff) | |
download | qtmips-fc343acc4d81d06e5cba92b74de3565b6d12dfcf.tar.gz qtmips-fc343acc4d81d06e5cba92b74de3565b6d12dfcf.tar.bz2 qtmips-fc343acc4d81d06e5cba92b74de3565b6d12dfcf.zip |
Correct shift operation and make ALU_OP_MOVZ and ALU_OP_MOVN encoding independent.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/tests')
-rw-r--r-- | qtmips_machine/tests/testalu.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qtmips_machine/tests/testalu.cpp b/qtmips_machine/tests/testalu.cpp index 304c001..d3d27ec 100644 --- a/qtmips_machine/tests/testalu.cpp +++ b/qtmips_machine/tests/testalu.cpp @@ -215,6 +215,7 @@ void MachineTests::alu_data() { } void MachineTests::alu() { + bool discard; QFETCH(AluOp, op); QFETCH(std::uint32_t, s); QFETCH(std::uint32_t, t); @@ -223,7 +224,7 @@ void MachineTests::alu() { QFETCH(Registers, regs_res); QFETCH(std::uint32_t, res); - QCOMPARE(alu_operate(op, s , t, sa, ®s_init), res); + QCOMPARE(alu_operate(op, s , t, sa, ®s_init, discard), res); QCOMPARE(regs_res, regs_init); } @@ -246,11 +247,12 @@ void MachineTests::alu_except_data() { } void MachineTests::alu_except() { + bool discard; QFETCH(std::uint8_t, op); QFETCH(std::uint32_t, s); QFETCH(std::uint32_t, t); Registers regs; // Only runtime exception is expected as any other exception is a bug - QVERIFY_EXCEPTION_THROWN(alu_operate((enum AluOp)op, s , t, 0, ®s), QtMipsExceptionRuntime); + QVERIFY_EXCEPTION_THROWN(alu_operate((enum AluOp)op, s , t, 0, ®s, discard), QtMipsExceptionRuntime); } |