Instruction Predecode

class ember.predecode.Rv32Predecoder(*args, src_loc_at=0, **kwargs)

Predecoder for a single RV32 instruction.

The RISC-V ISA defines x1 and x5 as link registers. Call and return instructions are qualified by the following conditions:

  • Call instructions are cases of JAL/JALR where rd == lr

  • Return instructions are cases of JALR where (rd == 0) && (rs1 == lr)