Format | Assembly Format | Description |
---|---|---|
3C <int32> | bge target |
Branch to target if greater than or equal to. |
2F _<int8_> | bge.s target |
Branch to target if greater than or equal to, short form. |
…, value1, value2 → …
The bge
instruction transfers control to target if value1 is greater than or equal to value2. The effect is identical to performing a clt.un
instruction followed by a brfalse
target. target is represented as a signed offset (4 bytes for bge
, 1 byte for bge.s
) from the beginning of the instruction following the current instruction.
The effect of a "bge
target" instruction is identical to:
-
If stack operands are integers, then
clt
followed by abrfalse
target -
If stack operands are floating-point, then
clt.un
followed by abrfalse
target
The acceptable operand types are encapsulated in Table 4: Binary Comparison or Branch Operations.
If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes.
Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction. (Such transfers are severely restricted and shall use the leave
instruction instead; see Partition I for details).
None.
Correct CIL shall observe all of the control transfer rules specified above and shall guarantee that the top two items on the stack correspond to the types shown in Table 4: Binary Comparison or Branch Operations.
Verifiable code requires the type-consistency of the stack, locals and arguments for every possible path to the destination instruction. See §III.1.8 for more details.