Skip to content

Commit

Permalink
Merge pull request #5 from rswarbrick/jal
Browse files Browse the repository at this point in the history
Fix encoding for J-type instructions
  • Loading branch information
wallento authored Aug 27, 2020
2 parents b475bb6 + 314e3e0 commit 7a534f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscvmodel/isa.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ class InstructionJType(Instruction, metaclass=ABCMeta):
"""

field_rd = Field(name="rd", base=7, size=5, description="")
field_imm = Field(name="imm", base=[21,20,12,31], size=[10,1,8,1], description="")
field_imm = Field(name="imm", base=[21,20,12,31], size=[10,1,8,1], description="", offset=1)

def __init__(self, rd: int = None, imm: int = None):
super(InstructionJType, self).__init__()
Expand Down

0 comments on commit 7a534f7

Please sign in to comment.