i32.shl
Pops two i32 values off the stack, shift the first value to the left by the second number of bits, and then pushes the result back on to the stack.
$result = $first << $second

Syntax

i32.shl

Stack In

i32 The first value to be shifted left.
i32 The second value to shift the bits by.

Stack Out

i32 The result of shifting the first value left by the second value's number of bits.

Example

;; Push the i32 value 0b00101011 (43) onto the stack
i32.const 43

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

;; Pop the two i32 values off the stack, shift the first value left
;; by the second value's number of bits and push the result
;; back onto the stack
i32.shl

;; The stack contains an i32 value of 0b10101100 (172)