i64.eq
Pops two i64 values off the stack, checks to see if they are the same, and then pushes the result back on to the stack.
if ($first === $second) {...}

Syntax

i64.eq

Stack In

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

Stack Out

i32 The result of the comparsion. If the first and second values match then the result will be 1. If the values are different then the result will be 0.

Examples

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

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

;; Pop the two i64 values off the stack, check if they are the same and
;; push the result back onto the stack
i64.eq

;; The stack contains an i32 value of 0 (not the same)
;; Push the i64 value 101 onto the stack
i64.const 101

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

;; Pop the two i64 values off the stack, check if they are the same and
;; push the result back onto the stack
i64.eq

;; The stack contains an i32 value of 1 (values are the same)