Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 178a7f6

Browse files
authored
Two zero immediates for memory.copy and table.copy (#43)
See WebAssembly/reference-types#18, #29, and #36
1 parent aa7efea commit 178a7f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

proposals/bulk-memory-operations/Overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ that were dropped after being copied into memory during module instantiation.
287287
Copy data from a source memory region to destination region; these regions may
288288
overlap: the copy is performed as if the source region was first copied to a
289289
temporary buffer, then the temporary buffer is copied to the destination
290-
region. This instruction has an immediate argument of which memory to operate
291-
on, and it must be zero for now.
290+
region. This instruction has two immediate arguments: the source and
291+
destination memory indices. They currently both must be zero.
292292

293293
The instruction has the signature `[i32 i32 i32] -> []`. The parameters are, in order:
294294

@@ -355,11 +355,11 @@ instr ::= ...
355355
| ---- | ---- | ---- | ---- |
356356
| `memory.init` | `0xfc 0x08` | `memory:0x00`, `segment:varuint32` | :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 |
358-
| `memory.copy` | `0xfc 0x0a` | `memory:0x00` | :thinking: copy from one region of linear memory to another region |
358+
| `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 |
360360
| `table.init` | `0xfc 0x0c` | `table:0x00`, `segment:varuint32` | :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 |
362-
| `table.copy` | `0xfc 0x0e` | `table:0x00` | :thinking: copy from one region of a table to another region |
362+
| `table.copy` | `0xfc 0x0e` | `table_src:0x00` `table_dst:0x00` | :thinking: copy from one region of a table to another region |
363363

364364
### `DataCount` section
365365

0 commit comments

Comments
 (0)