Skip to content

Commit 7a534f7

Browse files
authored
Merge pull request #5 from rswarbrick/jal
Fix encoding for J-type instructions
2 parents b475bb6 + 314e3e0 commit 7a534f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

riscvmodel/isa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ class InstructionJType(Instruction, metaclass=ABCMeta):
533533
"""
534534

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

538538
def __init__(self, rd: int = None, imm: int = None):
539539
super(InstructionJType, self).__init__()

0 commit comments

Comments
 (0)