i32.ge_u
Pops two i32 values off the stack, checks if the first value is greater than or equal to the second, and then pushes the result back on to the stack. This looks at the values as unsigned integers (positive values only).
if ($first >= $second) {...}

Syntax

i32.ge_u

Stack In

i32 The first value to check with.
i32 The second value to check against.

Stack Out

i32 The result of the comparsion. If the first value is greater than or equal to the second value then the result will be 1. Otherwise the result will be 0.

Examples

;; Push the i32 value 101 onto the stack
i32.const 101

;; Push the i32 value 42 onto the stack
i32.const 42

;; Pop the two i32 values off the stack, check if the first is greater
;; than or equal to the second and push the result back onto the stack
i32.ge_u

;; The stack contains an i32 value of 1 (101 >= 42 = is greater or equal)
;; Push the i32 value 101 onto the stack
i32.const 101

;; Push the i32 value 101 onto the stack
i32.const 101

;; Pop the two i32 values off the stack, check if the first is greater
;; than or equal to the second and push the result back onto the stack
i32.ge_u

;; The stack contains an i32 value of 1 (101 >= 101 = is greater or equal)
;; Push the i32 value 42 onto the stack
i32.const 42

;; Push the i32 value 101 onto the stack
i32.const 101

;; Pop the two i32 values off the stack, check if the first is greater
;; than or equal to the second and push the result back onto the stack
i32.ge_u

;; The stack contains an i32 value of 0 (42 >= 101 = is not greater or equal)
;; Push the i32 value 0xF178CD56 (4051225942) onto the stack
i32.const 0xF178CD56

;; Push the i32 value 101 onto the stack
i32.const 101

;; Pop the two i32 values off the stack, check if the first is greater
;; than or equal to the second and push the result back onto the stack
i32.ge_u

;; The stack contains an i32 value of 1 (4051225942 >= 101 = is greater or equal)