c.j
Jump
C.J performs an unconditional control transfer. The offset is sign-extended and added to the pc to form the jump target address. C.J can therefore target a ±2 KiB range.
It expands to jal x0, offset.
Decode Variables
signed Bits<12> imm = sext({$encoding[12], $encoding[8], $encoding[10:9], $encoding[6], $encoding[7], $encoding[2], $encoding[11], $encoding[5:3], 1'd0}, 12);
Execution
if (implemented?(ExtensionName::C) && MISA_CSR_IMPLEMENTED && (CSR[misa].C == 1'b0)) {
reserved_instruction($encoding);
}
jump($pc + $signed(imm));
Exceptions
This instruction may result in the following synchronous exceptions:
-
IllegalInstruction
-
InstructionAddressMisaligned