From 78545556cbca11b0898a1f419ed018eb58d28ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 12 Dec 2017 21:25:03 +0100 Subject: Fix test for JR --- qtmips_machine/tests/testcore.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'qtmips_machine') diff --git a/qtmips_machine/tests/testcore.cpp b/qtmips_machine/tests/testcore.cpp index c8f1a17..efc06da 100644 --- a/qtmips_machine/tests/testcore.cpp +++ b/qtmips_machine/tests/testcore.cpp @@ -222,6 +222,7 @@ static void core_jmp_data() { regs.write_gp(14, -22); regs.write_gp(15, 22); regs.write_gp(16, -22); + regs.write_gp(12, 0x80040000); QTest::newRow("B") << Instruction(4, 0, 0, 61) \ << regs \ << regs.read_pc() + 4 + (61 << 2); @@ -246,12 +247,9 @@ static void core_jmp_data() { QTest::newRow("J") << Instruction(2, 24) \ << regs \ << 0x80000000 + (24 << 2); - /* - * TODO - QTest::newRow("JR") << Instruction(1, 15, 0, 61) \ + QTest::newRow("JR") << Instruction(0, 12, 0, 0, 0, 8) \ << regs \ - << regs.read_pc() + (24 << 2); - */ + << 0x80040000; } void MachineTests::singlecore_jmp_data() { -- cgit v1.2.3