# wasm: implement the 'splat' instruction part 1 · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c6d654f73bbe80ed3653be6a31ddcaa4772a4fe2)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c6d654f73bbe80ed3653be6a31ddcaa4772a4fe2

Requested commit: c6d654f73bbe80ed3653be6a31ddcaa4772a4fe2

Commit: c6d654f73bbe80ed3653be6a31ddcaa4772a4fe2

Tree: 04c166bceaea1df0044582297f0332291e23119e

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: implement the 'splat' instruction part 1

This implements `airSplat` for the native WebAssembly backend when
the features 'simd128' or 'relaxed-simd' are enabled. The commit
supports splat where the value lives in the linear memory segment,
as well as on the stack. This saves a lot of instruction cost.
When it detects the element type is not 8, 16, 32 or 64 bits,
the backend will instead use the same strategy as if the features
where disabled.

```

## Parents

- [db06eed7a3e741a319182b2e4edc889b83787962](https://git.cafe/gitcafe/zig/commit/db06eed7a3e741a319182b2e4edc889b83787962?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c6d654f73bbe80ed3653be6a31ddcaa4772a4fe2?format=markdown)
