Skip to content

Commit 0bf0a0e

Browse files
committed
Fix imm coding in B type
1 parent 7a534f7 commit 0bf0a0e

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
@@ -457,7 +457,7 @@ class InstructionBType(InstructionFunct3Type, metaclass=ABCMeta):
457457

458458
field_rs1 = Field(name="rs1", base=15, size=5, description="")
459459
field_rs2 = Field(name="rs2", base=20, size=5, description="")
460-
field_imm = Field(name="imm", base=[7, 25], size=[5, 7], offset=1, description="")
460+
field_imm = Field(name="imm", base=[8, 25, 7, 31], size=[4, 6, 1, 1], offset=1, description="")
461461

462462
asm_arg_signature = "<rs1>, <rs2>, <imm>"
463463

0 commit comments

Comments
 (0)