From fc343acc4d81d06e5cba92b74de3565b6d12dfcf Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 5 Feb 2019 10:16:37 +0100 Subject: Correct shift operation and make ALU_OP_MOVZ and ALU_OP_MOVN encoding independent. Signed-off-by: Pavel Pisa --- qtmips_machine/tests/testalu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qtmips_machine/tests') 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); } -- cgit v1.2.3