# wasm: refactor extended instructions · gitcafe/zig

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

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

Visibility: public

Requested revision: 0d66112643286a754101eb71382f860ae1874012

Requested commit: 0d66112643286a754101eb71382f860ae1874012

Commit: 0d66112643286a754101eb71382f860ae1874012

Tree: 80fd56e6adff4e99cbc3638fc8f03a967b0be61e

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: refactor extended instructions

The extended instructions starting with opcode `0xFC` are refactored
to make the work the same as the SIMD instructions. This means a
`Mir` instruction no longer contains a field 'secondary'. Instead,
we use the `payload` field to store the index into the extra list
which contains the extended opcode value. In case of instructions
such as 'memory.fill' which also have an immediate value, such
values will also be stored in the extra list right after the
instruction itself. This makes each `Mir` instruction smaller.

```

## Parents

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

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