aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-12-12 21:25:03 +0100
committerKarel Kočí <cynerd@email.cz>2017-12-12 21:25:23 +0100
commit78545556cbca11b0898a1f419ed018eb58d28ba8 (patch)
tree82825a282c118bfd103cfc8f97c5d13fa9178cd0 /qtmips_machine
parent010194187d86041697f1e0e03edfc914940bd2ba (diff)
downloadqtmips-78545556cbca11b0898a1f419ed018eb58d28ba8.tar.gz
qtmips-78545556cbca11b0898a1f419ed018eb58d28ba8.tar.bz2
qtmips-78545556cbca11b0898a1f419ed018eb58d28ba8.zip
Fix test for JR
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/tests/testcore.cpp8
1 files changed, 3 insertions, 5 deletions
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() {