Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 446b9c2

Browse files
authored
Reverse order of {table,memory}.init immediates (#45)
The order of the `table.init` and `memory.init` immediates should be the index followed by the reserved byte (which is a placeholder for the table or memory index). This matches ordering of immediates in `call_indirect` (type index, followed by table index reserved byte).
1 parent 178a7f6 commit 446b9c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proposals/bulk-memory-operations/Overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,11 @@ instr ::= ...
353353

354354
| Name | Opcode | Immediate | Description |
355355
| ---- | ---- | ---- | ---- |
356-
| `memory.init` | `0xfc 0x08` | `memory:0x00`, `segment:varuint32` | :thinking: copy from a passive data segment to linear memory |
356+
| `memory.init` | `0xfc 0x08` | `segment:varuint32`, `memory:0x00` | :thinking: copy from a passive data segment to linear memory |
357357
| `memory.drop` | `0xfc 0x09` | `segment:varuint32` | :thinking: prevent further use of passive data segment |
358358
| `memory.copy` | `0xfc 0x0a` | `memory_src:0x00` `memory_dst:0x00` | :thinking: copy from one region of linear memory to another region |
359359
| `memory.fill` | `0xfc 0x0b` | `memory:0x00` | :thinking: fill a region of linear memory with a given byte value |
360-
| `table.init` | `0xfc 0x0c` | `table:0x00`, `segment:varuint32` | :thinking: copy from a passive element segment to a table |
360+
| `table.init` | `0xfc 0x0c` | `segment:varuint32`, `table:0x00` | :thinking: copy from a passive element segment to a table |
361361
| `table.drop` | `0xfc 0x0d` | `segment:varuint32` | :thinking: prevent further use of a passive element segment |
362362
| `table.copy` | `0xfc 0x0e` | `table_src:0x00` `table_dst:0x00` | :thinking: copy from one region of a table to another region |
363363

0 commit comments

Comments
 (0)