bgeu

Branch if greater than or equal unsigned

This instruction is defined by:

Encoding

svg

Synopsis

Branch to PC + imm if the unsigned value in register rs1 is greater than or equal to the unsigned value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

Access

M

HS

U

VS

VU

Always

Always

Always

Always

Always

Decode Variables

Bits<13> imm = {$encoding[31], $encoding[7], $encoding[30:25], $encoding[11:8], 1'd0};
Bits<5> rs2 = $encoding[24:20];
Bits<5> rs1 = $encoding[19:15];

Execution

  • Pruned, XLEN == 64

  • Original

XReg lhs = X[rs1];
XReg rhs = X[rs2];
if (lhs >= rhs) {
  jump_halfword($pc + imm);
}
XReg lhs = X[rs1];
XReg rhs = X[rs2];
if (lhs >= rhs) {
  jump_halfword($pc + imm);
}