c.jr
Jump Register
- Extension
- C
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
c.jr xs1- Length
- 16-bit (compressed)
Encoding
| 1513 | 12 | 117 | 62 | 10 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 100 | 0 | rs1≠0 | 00000 | 10 | |||||||||||
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.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs1≠0 | 11:7 | rs1_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.