不等于
ne
指令(缩写为 not equal)用于检查两个数字是否不相等。如果两个数字不相等,则会将 1
推入堆栈,否则会将 0
推入堆栈。
试一试
语法
wasm
;; load 2 numbers on to the stack
local.get $num
i32.const 2
;; check if $num is not equal to '2'
i32.ne
;; if $num is not equal to `2`, `1` will be pushed on to the stack,
;; otherwise `0` will be pushed on to the stack.
指令 | 二进制操作码 |
---|---|
i32.ne |
0x47 |
i64.ne |
0x52 |
f32.ne |
0x5c |
f64.ne |
0x62 |