summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pysc-v/registers/RV32I.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pysc-v/registers/RV32I.py b/pysc-v/registers/RV32I.py
index 4652bca..a723064 100644
--- a/pysc-v/registers/RV32I.py
+++ b/pysc-v/registers/RV32I.py
@@ -27,8 +27,8 @@ class RegistersRV32I:
self.addRegister(("x0","zero"), setter = zeroSetter)
self.addRegister(("x1","ra"))
- self.addRegister(("x2","sp"))
- self.addRegister(("x3","gp"))
+ self.addRegister(("x2","sp", "v0"))
+ self.addRegister(("x3","gp", "v1"))
self.addRegister(("x4","tp"))
self.addRegister(("x5","t0"))
self.addRegister(("x6","t1"))
@@ -82,7 +82,8 @@ class RegistersRV32I:
return pos
def __getitem__(self, el):
- return self.getter[self.getPos(el)](self, pos)
+ pos = self.getPos(el)
+ return self.getter[pos](self, pos)
def __setitem__(self, el, val):
pos = self.getPos(el)