From 6351f1e84db2ad297c9ab5ada201d6189d75409c Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 6 Jun 2021 09:55:15 +0200 Subject: [PATCH] [PrivRV32I] fixed bug with blt backwards jumps missing by one --- riscemu/priv/PrivRV32I.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscemu/priv/PrivRV32I.py b/riscemu/priv/PrivRV32I.py index 685edf1..c30cb30 100644 --- a/riscemu/priv/PrivRV32I.py +++ b/riscemu/priv/PrivRV32I.py @@ -98,7 +98,7 @@ class PrivRV32I(RV32I): def instruction_blt(self, ins: 'LoadedInstruction'): rs1, rs2, dst = self.parse_rs_rs_imm(ins) if rs1 < rs2: - self.pc += dst + self.pc += dst - 4 def instruction_bge(self, ins: 'LoadedInstruction'): rs1, rs2, dst = self.parse_rs_rs_imm(ins)