diff --git a/riscemu/priv/CSR.py b/riscemu/priv/CSR.py index d9a7d00..1327315 100644 --- a/riscemu/priv/CSR.py +++ b/riscemu/priv/CSR.py @@ -84,7 +84,7 @@ class CSR: return inner def assert_can_read(self, mode: PrivModes, addr: int): - if (addr >> 8) & 3 > mode.value(): + if (addr >> 8) & 3 > mode.value: raise InstructionAccessFault(addr) def assert_can_write(self, mode: PrivModes, addr: int):