Webcentive RISC-V Reference

c.jr

Jump Register

Extension
C
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
c.jr xs1
Length
16-bit (compressed)

Encoding

1513121176210
1000rs1≠00000010

Match 0x8002, mask 0xf07f. Source: c.jr rs1_n0 1..0=2 15..13=4 12=0 6..2=0 in riscv-opcodes/extensions/rv_c.

FieldBitsriscv-opcodes name
rs1≠011:7rs1_n0

Description

C.JR (jump register) performs an unconditional control transfer to the address in register xs1. C.JR expands to jalr x0, 0(xs1).

Description from riscv-unified-db, reformatted.

Operation

if (implemented?(ExtensionName::C) && MISA_CSR_IMPLEMENTED && (CSR[misa].C == 1'b0)) {
  reserved_instruction($encoding);
}

jump(X[xs1]);

Pseudocode in riscv-unified-db’s IDL, quoted unchanged.

Specification and related pages