GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

extmul_low_i16x8_u: Wasm SIMD arithmetic instruction

The extmullowi16x8u SIMD arithmetic instruction takes lanes 0–3 of two unsigned v128 i16x8 value interpretations, multiplies the values in the corresponding lanes, and outputs the result of those operations into an i32x4 value interpretation.

The **`extmul_low_i16x8_u`** [SIMD arithmetic instruction](/docs/WebAssembly/Reference/SIMD/arithmetic) takes lanes 0–3 of two unsigned [`v128`](/docs/WebAssembly/Reference/Value_types/v128) `i16x8` value interpretations, multiplies the values in the corresponding lanes, and outputs the result of those operations into an `i32x4` value interpretation.

tabbed-taller

```wat interactive-example
(module
(import "console" "log" (func $log (param i32)))
(func $main
v128.const i16x8 3 3 3 3 6 6 6 6
v128.const i16x8 2 2 2 2 4 4 4 4

i32x4.extmul_low_i16x8_u
i32x4.extract_lane 3
call $log ;; log the result
)
(start $main)
)
```

```js interactive-example
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });
```

In the above example, lanes 0–3 of the two `i16x8` input values are multiplied together and the products output as an `i32x4`. Lane `0` of the first input is multiplied by lane `0` of the second input, and the product becomes lane `0` of the output, and so on. As a result, each lane of the output contains the value `6` (`3 * 2`).

The `extmul_low_i16x8_u` instruction is a more performant equivalent to passing the results of two [`extend_low_i16x8_u`](/docs/WebAssembly/Reference/SIMD/conversion/extend_low_i16x8_u) instructions into a [`mul`](/docs/WebAssembly/Reference/Numeric/mul) instruction.

In other words:

```wat
(i32x4.extmul_low_i16x8_u
(input1)
(input2)
)
```

is equivalent to

```wat
(i32x4.mul
(i32x4.extend_low_i16x8_u
(input1)
)
(i32x4.extend_low_i16x8_u
(input2)
)
)
```

## Syntax

```plain
i32x4.extmul_low_i16x8_u
```

- `i32x4.extmul_low_i16x8_u`
- : The `i32x4.extmul_low_i16x8_u` instruction.

### Type

```plain
[input1, input2] -> [output]
```

- `input1`
- : The first input `v128` `i16x8` value interpretation.
- `input2`
- : The second input `v128` `i16x8` value interpretation.
- `output`
- : The output `v128` `i32x4` value interpretation.

### Binary encoding

| Instruction | Binary format | Example text => binary |
| -------------------------- | -------------- | ---------------------------------------------- |
| `i32x4.extmul_low_i16x8_u` | `0xfd 190:u32` | `i32x4.extmul_low_i16x8_u` => `0xfd 0xbe 0x01` |

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"extmul_low_i16x8_u: Wasm SIMD arithmetic instruction". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/SIMD/arithmetic/extmul_low_i16x8_u

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·