c.jr

Jump Register

This instruction is defined by:

  • anyOf:

    • C, version >= 0

    • Zca, version >= 0

This instruction is included in the following profiles:

Encoding

svg

Assembly format

c.jr rs1

Synopsis

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

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

Bits<5> rs1 = $encoding[11:7];

Execution

  • IDL

if (implemented?(ExtensionName::C) && (CSR[misa].C == 1'b0)) {
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
jump(X[rs1]);

Exceptions

This instruction may result in the following synchronous exceptions:

  • IllegalInstruction

  • InstructionAddressMisaligned