C.JALR

Compressed Jump and Link Register

C.JALR rs1

Jumps to register address and links (saves PC+2 to ra).

Details

Jumps to address in rs1 and saves PC+2 in x1.

Pseudocode Operation

t = PC + 2; PC = R[rs1]; R[1] = t;

Example

C.JALR x10

Encoding

Binary Layout
?
31:16
1001
15:12
c_rs1_n0
11:7
0000010
6:0
 
Format CR
Opcode 0x00009002
Extension C

Operands

  • rs1
    Address