Skip to content

Commit b8a9f4a

Browse files
committed
Revert most changes, only specify that the first index is the destination
1 parent fbc99ef commit b8a9f4a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

document/core/binary/instructions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@ Each variant of :ref:`memory instruction <syntax-instr-memory>` is encoded with
226226
\hex{3E}~~m{:}\Bmemarg &\Rightarrow& \I64.\STORE\K{32}~m \\ &&|&
227227
\hex{3F}~~x{:}\Bmemidx &\Rightarrow& \MEMORYSIZE~x \\ &&|&
228228
\hex{40}~~x{:}\Bmemidx &\Rightarrow& \MEMORYGROW~x \\ &&|&
229-
\hex{FC}~~8{:}\Bu32~~src{:}\Bdataidx~dst{:}\Bmemidx &\Rightarrow& \MEMORYINIT~dst~src \\ &&|&
230-
\hex{FC}~~9{:}\Bu32~~dst{:}\Bdataidx &\Rightarrow& \DATADROP~dst \\ &&|&
231-
\hex{FC}~~10{:}\Bu32~~dst{:}\Bmemidx~~src{:}\Bmemidx &\Rightarrow& \MEMORYCOPY~dst~src \\ &&|&
232-
\hex{FC}~~11{:}\Bu32~~dst{:}\Bmemidx &\Rightarrow& \MEMORYFILL~dst \\
229+
\hex{FC}~~8{:}\Bu32~~y{:}\Bdataidx~x{:}\Bmemidx &\Rightarrow& \MEMORYINIT~x~y \\ &&|&
230+
\hex{FC}~~9{:}\Bu32~~x{:}\Bdataidx &\Rightarrow& \DATADROP~x \\ &&|&
231+
\hex{FC}~~10{:}\Bu32~~x{:}\Bmemidx~~y{:}\Bmemidx &\Rightarrow& \MEMORYCOPY~x~y \\ &&|&
232+
\hex{FC}~~11{:}\Bu32~~x{:}\Bmemidx &\Rightarrow& \MEMORYFILL~x \\
233233
\end{array}
234234
235235
.. index:: numeric instruction

document/core/syntax/instructions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ The |MEMORYSIZE| instruction returns the current size of a memory.
601601
The |MEMORYGROW| instruction grows a memory by a given delta and returns the previous size, or :math:`-1` if enough memory cannot be allocated.
602602
Both instructions operate in units of :ref:`page size <page-size>`.
603603
The |MEMORYFILL| instruction sets all values in a region of a memory to a given byte.
604-
The |MEMORYCOPY| instruction copies data from a source memory region (second *immediate* |memarg|) to a possibly overlapping destination region in another or the same memory (first *immediate* |memarg|).
604+
The |MEMORYCOPY| instruction copies data from a source memory region to a possibly overlapping destination region in another or the same memory; the first index denotes the destination.
605605
The |MEMORYINIT| instruction copies data from a :ref:`passive data segment <syntax-data>` into a memory.
606606
The |DATADROP| instruction prevents further use of a passive data segment. This instruction is intended to be used as an optimization hint. After a data segment is dropped its data can no longer be retrieved, so the memory used by this segment may be freed.
607607

0 commit comments

Comments
 (0)