BGE
Branch if Greater or Equal
BGE rs1, rs2, offset
Take the branch if rs1 is greater than or equal to rs2 (signed).
Details
BGE takes the branch if rs1 is greater than or equal to rs2, using a signed comparison. The branch target is the PC plus the sign-extended B-immediate.
Pseudocode Operation
if (R[rs1] >=s R[rs2]) PC += sext(offset);
Example
BGE x10, x0, positive
Encoding
Binary Layout
imm[12
10:5]
rs2
31:27
rs1
26:22
101
21:19
imm[4:1
11]
1100011
18:12
Operands
-
rs1
Source register 1 (integer) -
rs2
Source register 2 (integer) -
offset
Offset