BGEU
Branch if Greater or Equal Unsigned
BGEU rs1, rs2, offset
Take the branch if rs1 is greater than or equal to rs2 (unsigned comparison).
Encoding
Binary Layout
bimm12hi
31:25
rs2
24:20
rs1
19:15
111
14:12
bimm12lo
11:7
1100011
6:0
Operands
-
rs1
Source register 1 (integer) -
rs2
Source register 2 (integer) -
offset
Offset
Example
BGEU a0, a1, 0
Related
More in RV32I
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
BGEU takes the branch if rs1 is greater than or equal to rs2, treating both as unsigned integers. The branch target is the PC plus the sign-extended B-immediate.
Operation
if (R[rs1] >=u R[rs2]) PC += sext(offset);