diff --git a/riscemu/Registers.py b/riscemu/Registers.py index d3dfe47..ab74821 100644 --- a/riscemu/Registers.py +++ b/riscemu/Registers.py @@ -103,7 +103,7 @@ class Registers: reg = 's1' if mark_set: self.last_set = reg - self.vals[reg] = val + self.vals[reg] = val & (2**32 - 1) return True def get(self, reg, mark_read=True):