Skip to content

Commit b81d108

Browse files
authored
Merge pull request #402 from ThePuzzlemaker/patch-1
Clarify jalr description and IDL
2 parents fdcc31e + 5cd4d1d commit b81d108

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/inst/I/jalr.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ name: jalr
66
long_name: Jump and link register
77
description: |
88
Jump to an address formed by adding rs1
9-
to a signed offset, and store the return address in rd.
9+
to a signed offset then clearing the least
10+
significant bit, and store the return address
11+
in rd.
1012
definedBy: I
1113
assembly: xd, imm(rs1)
1214
encoding:
@@ -27,7 +29,7 @@ operation(): |
2729
XReg returnaddr;
2830
returnaddr = $pc + 4;
2931
30-
jump(X[rs1] + imm);
32+
jump((X[rs1] + imm) & ~XLEN'1);
3133
X[rd] = returnaddr;
3234
3335
sail(): |

0 commit comments

Comments
 (0)