From 37910018b9b724c7f0e9006cf059bade86599360 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sat, 5 Jun 2021 15:29:06 +0200 Subject: [PATCH] [PrivRV32I] finally correct parsing of load/store instruction args --- riscemu/priv/PrivRV32I.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/riscemu/priv/PrivRV32I.py b/riscemu/priv/PrivRV32I.py index 201807e..2be49cb 100644 --- a/riscemu/priv/PrivRV32I.py +++ b/riscemu/priv/PrivRV32I.py @@ -138,4 +138,6 @@ class PrivRV32I(RV32I): def parse_mem_ins(self, ins: 'LoadedInstruction') -> Tuple[str, int]: ASSERT_LEN(ins.args, 3) - return ins.get_reg(1), self.get_reg_content(ins, 0) + ins.get_imm(2) + addr = self.get_reg_content(ins, 1) + ins.get_imm(2) + reg = ins.get_reg(0) + return reg, addr