Skip to content

Commit 9d8398a

Browse files
committed
Fix JALR not clearing LSB of jump target
1 parent 0a07b0d commit 9d8398a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main.mlog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ unconditional_jump:
976976
JALR:
977977
# I-type: arg1=rs1, arg2=imm, arg3=rd
978978
op add target rs1 arg2
979+
op and target target 0xfffffffe # clear LSB
979980
jump unconditional_jump always
980981

981982
BEQ:

0 commit comments

Comments
 (0)