From 35c0987473a495d9cd5010f0068c287d5cf91e49 Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Thu, 19 Sep 2024 00:00:23 +0200 Subject: [PATCH] Fix VM bug in Bgeu --- common/src/vm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/vm.rs b/common/src/vm.rs index 3d9cee3..0bd2417 100644 --- a/common/src/vm.rs +++ b/common/src/vm.rs @@ -497,7 +497,7 @@ impl Cpu { }, Op::Bgeu { rs1, rs2, imm } => { if self.regs[rs1 as usize] >= self.regs[rs2 as usize] { - self.pc = self.pc.wrapping_add(imm as u32); + pc_inc = imm as u32; } }, Op::Jal { rd, imm } => {