extadd_pairwise_i16x8_s: Wasm SIMD arithmetic instruction
The extaddpairwisei16x8s SIMD arithmetic instruction adds each adjacent pair of lanes of a signed v128 i16x8 value interpretation, outputting the results into an i32x4 value interpretation.
The extadd_pairwise_i16x8_s SIMD arithmetic instruction adds each adjacent pair of lanes of a signed v128 i16x8 value interpretation, outputting the results into an i32x4 value interpretation.
tabbed-taller
```wat interactive-example (module (import "console" "log" (func $log (param i32))) (func $main v128.const i16x8 20 40 20 40 20 40 20 40
i32x4.extadd_pairwise_i16x8_s
i32x4.extract_lane 3
call $log ;; log the result
) (start $main) )
```js interactive-example
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
In the above example, each adjacent pair of lanes contains the values 20 and 40. The extadd_pairwise_i16x8_s instruction adds each pair together, resulting in the 4 lanes of the output i32x4 value all containing the value 60.
Syntax
i32x4.extadd_pairwise_i16x8_s
i32x4.extadd_pairwise_i16x8_s- : The
i32x4.extadd_pairwise_i16x8_sinstruction.
Type
[input] -> [output]
input- : The input
v128i16x8value interpretation. output- : The output
v128i32x4value interpretation.
Binary encoding
| Instruction | Binary format | Example text => binary |
|---|---|---|
i32x4.extadd_pairwise_i16x8_s |
0xfd 126:u32 |
i32x4.extadd_pairwise_i16x8_s => 0xfd 0x7e |