Takes 2 operands from the stack of the same numeric type and compares them.
Places an i32
on the stack representing the result of the comparison: either 1 if the first operand is less than the second, or 0 otherwise 1 2 3.
For integer types, there are two opcodes per type, to indicate whether to treat the operands as signed or unsigned for the comparison 4.
Opcode | Instruction | Stack Arity |
---|---|---|
0x48 |
i32.lt_s |
|
0x49 |
i32.lt_u |
|
0x56 |
i64.lt_s |
|
0x57 |
i64.lt_u |
|
0x5D |
f32.lt |
|
0x63 |
f64.lt |
todo
Footnotes
-
Execution, Numerics, Integer Operations, ilt_u - https://www.w3.org/TR/wasm-core-2/exec/numerics.html#op-ilt-u ↩
-
Execution, Numerics, Integer Operations, ilt_s - https://www.w3.org/TR/wasm-core-2/exec/numerics.html#op-ilt-s ↩
-
Execution, Numerics, Floating-Point Operations, flt - https://www.w3.org/TR/wasm-core-2/exec/numerics.html#op-flt ↩
-
Structure, Numeric Instructions - https://www.w3.org/TR/wasm-core-2/syntax/instructions.html#numeric-instructions ↩