C.JALR
Compressed Jump and Link Register
C.JALR rs1
Jumps to register address and links (saves PC+2 to ra).
Encoding
Binary Layout
?
31:16
1001
15:12
c_rs1_n0
11:7
0000010
6:0
Operands
-
rs1
Address
Example
C.JALR x10
// Call function pointer in x10.
Related
More in C
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Jumps to address in rs1 and saves PC+2 in x1.
Operation
t = PC + 2; PC = R[rs1]; R[1] = t;