bltu

Branch if less than unsigned

Branch to PC + imm if the unsigned value in register xs1 is less than the unsigned value in register xs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

Assembly format

bltu xs1, xs2, imm

Decode Variables

signed Bits<13> imm = sext({$encoding[31], $encoding[7], $encoding[30:25], $encoding[11:8], 1'd0}, 13);
Bits<5> xs2 = $encoding[24:20];
Bits<5> xs1 = $encoding[19:15];

Execution

XReg lhs = X[xs1];
XReg rhs = X[xs2];
if (lhs < rhs) {
  jump_halfword($pc + $signed(imm));
}

Exceptions

This instruction may result in the following synchronous exceptions:

  • InstructionAddressMisaligned

Encoding

svg

Defining extension

I

Access

M

Always

Containing profiles

  • Mandatory: RVA20S64, RVA20U64, RVA22S64, RVA22U64, RVA23S64, RVA23U64, RVB23S64, RVB23U64, RVI20U32, RVI20U64

  • Optional: None