The store64_lane SIMD load/store instruction stores a specified lane of a v128 i64x2 value interpretation at a given memory address.
(module
(import "console" "log" (func $log (param i64)))
(memory $memory 1)
(func $main
i32.const 0
v128.const i64x2 8000001 16000001
v128.store64_lane 1
i32.const 0
v128.load
i64x2.extract_lane 0
call $log
)
(start $main)
)WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });;; Common usage v128.store64_lane lane_idx ;; With optional immediate operands v128.store64_lane mem_idx offset=int align=int lane_idx
v128.store64_laneThe v128.store64_lane instruction.
mem_idx OptionalAn integer representing the memory index, in cases where the module uses multiple memories. The default is 0.
offset=int OptionalAn integer representing a constant number of bytes to add to the address before storing. The default is 0.
align=int OptionalAn integer representing a hint to the Wasm engine about what alignment to expect for the final address. The minimum value is 1 and the default and maximum value is 8. An align value has to be a power of 2.
lane_idxThe index of the lane whose value you want to store.
[memory_address, input] -> []
memory_addressAn integer representing the memory address to store the input at.
inputThe v128 type from which to extract a lane value to store.
| Instruction | Binary format | Example text => binary |
|---|---|---|
v128.store64_lane | 0xfd 91:u32 mem_idx:u8 offset:u32 align:u32 l:laneidx | v128.store64_lane 0 offset=0 align=8 1 => 0xfd 0x5b 0x03 0x00 0x01 |
Note: While Wasm text format specifies the literal align value, the binary equivalent represents the exponent of the formula 2^x used to calculate the alignment. So for example, align=1 is equivalent to 0x00 (2^0), while align=8 is equivalent to 0x03 (2^3).