summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2021-05-25 16:56:58 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2021-05-25 16:56:58 +0200
commit423bee4496736d47d939b361fcd2035b7a66feac (patch)
tree1c5f3d52bd39d26167d02b4b0e1576ae2e1b4f83
parent309492a16167fc1cad65050ec5080c3a943bc629 (diff)
Fix typos in instructionset
-rw-r--r--pysc-v/InstructionSets/RV32I.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pysc-v/InstructionSets/RV32I.py b/pysc-v/InstructionSets/RV32I.py
index bbe88c3..8e1c1b8 100644
--- a/pysc-v/InstructionSets/RV32I.py
+++ b/pysc-v/InstructionSets/RV32I.py
@@ -100,7 +100,7 @@ class U(Instruction):
def compile(self):
# NOTE: U Type is for AUIPC and LUI that only use the high part of the
# immediate
- imm_12_32 = (imm & 0xFFFFF000)>>12
+ imm_12_32 = (self.imm & 0xFFFFF000)>>12
return c_uint32(
(imm_12_32 << 12) +\
(self.rd << 7) +\
@@ -221,11 +221,12 @@ class lbu(I):
funct3 = 0b100
@RV32I.instruction
-class lb(I):
+class lhu(I):
name = "lhu"
opcode = 0b0000011
funct3 = 0b101
+
@RV32I.instruction
class sb(S):
name = "sb"