load8x8_s: Wasm SIMD load instruction

The load8x8_s SIMD load instruction loads eight 8-bit integers from a given heap address and sign extends each one to a 16-bit lane, outputting a v128 i16x8 value interpretation.

Try it

(module
  (import "console" "log" (func $log (param i32)))
  (memory $memory 1)
  (data (i32.const 0) "\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\00\01\02\03")
  (func $main
    i32.const 0
    v128.load8x8_s
    i16x8.extract_lane_s 7
    call $log
  )
  (start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });

Syntax

v128.load8x8_s
load8x8_s

The load8x8_s instruction. Must always be included after v128..

Type

[memory_address] -> [output]
memory_address

An integer representing the memory address to load from.

output

The output v128 i16x8 value interpretation.

Binary encoding

Instruction Binary equivalent Example text => binary
v128.load8x8_s 0xFD 1:u32 align:u32 offset:u32 v128.load8x8_s 0 => 0xfd 0x01 0x00 0x00

Specifications

This feature does not appear to be defined in any specification.

Browser compatibility

See also