Instructions
Instructions are syntactically distinguished into plain and structured instructions.
\[\begin{split}\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{instruction} & \href{../text/instructions.html#text-instr}{\mathtt{instr}}_I &::=&
\mathit{in}{:}\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I
&\Rightarrow& \mathit{in} \\ &&|&
\mathit{in}{:}\href{../text/instructions.html#text-blockinstr}{\mathtt{blockinstr}}_I
&\Rightarrow& \mathit{in} \\
\end{array}\end{split}\]
In addition, as a syntactic abbreviation, instructions can be written as S-expressions in folded form, to group them visually.
Labels
Structured control instructions can be annotated with a symbolic label identifier.
They are the only symbolic identifiers that can be bound locally in an instruction sequence.
The following grammar handles the corresponding update to the identifier context by composing the context with an additional label entry.
\[\begin{split}\begin{array}{llcllll}
\def\mathdef1755#1{{}}\mathdef1755{label} & \href{../text/instructions.html#text-label}{\mathtt{label}}_I &::=&
v{:}\href{../text/values.html#text-id}{\mathtt{id}} &\Rightarrow& \{\href{../text/conventions.html#text-context}{\mathsf{labels}}~v\} \href{../syntax/conventions.html#notation-compose}{\oplus} I
& (\mathrel{\mbox{if}} v \notin I.\href{../text/conventions.html#text-context}{\mathsf{labels}}) \\ &&|&
\epsilon &\Rightarrow& \{\href{../text/conventions.html#text-context}{\mathsf{labels}}~(\epsilon)\} \href{../syntax/conventions.html#notation-compose}{\oplus} I \\
\end{array}\end{split}\]
Note
The new label entry is inserted at the beginning of the label list in the identifier context.
This effectively shifts all existing labels up by one,
mirroring the fact that control instructions are indexed relatively not absolutely.
Control Instructions
Structured control instructions can bind an optional symbolic label identifier.
The same label identifier may optionally be repeated after the corresponding \(\mathtt{end}\) and \(\mathtt{else}\) pseudo instructions, to indicate the matching delimiters.
Their block type is given as a type use, analogous to the type of functions.
However, the special case of a type use that is syntactically empty or consists of only a single result is not regarded as an abbreviation for an inline function type, but is parsed directly into an optional value type.
\[\begin{split}\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{block type} & \href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}_I &
\begin{array}[t]{@{}c@{}} ::= \\ | \\ \end{array}
&
\begin{array}[t]{@{}lcll@{}}
(t{:}\href{../text/types.html#text-functype}{\mathtt{result}})^? &\Rightarrow& t^? \\
x,I'{:}\href{../text/modules.html#text-typeuse}{\mathtt{typeuse}}_I &\Rightarrow& x & (\mathrel{\mbox{if}} I' = \{\}) \\
\end{array} \\
\def\mathdef1755#1{{}}\mathdef1755{block instruction} & \href{../text/instructions.html#text-blockinstr}{\mathtt{blockinstr}}_I &::=&
\def\mathdef1792#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1792{block}~~I'{:}\href{../text/instructions.html#text-label}{\mathtt{label}}_I~~\mathit{bt}{:}\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~(\mathit{in}{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef1793#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1793{end}~~\href{../text/values.html#text-id}{\mathtt{id}}^?
\\ &&&\qquad \Rightarrow\quad \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{block}}~\mathit{bt}~\mathit{in}^\ast~\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{end}}
\qquad\quad~~ (\mathrel{\mbox{if}} \href{../text/values.html#text-id}{\mathtt{id}}^? = \epsilon \vee \href{../text/values.html#text-id}{\mathtt{id}}^? = \href{../text/instructions.html#text-label}{\mathtt{label}}) \\ &&|&
\def\mathdef1794#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1794{loop}~~I'{:}\href{../text/instructions.html#text-label}{\mathtt{label}}_I~~\mathit{bt}{:}\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~(\mathit{in}{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef1795#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1795{end}~~\href{../text/values.html#text-id}{\mathtt{id}}^?
\\ &&&\qquad \Rightarrow\quad \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{loop}}~\mathit{bt}~\mathit{in}^\ast~\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{end}}
\qquad\qquad (\mathrel{\mbox{if}} \href{../text/values.html#text-id}{\mathtt{id}}^? = \epsilon \vee \href{../text/values.html#text-id}{\mathtt{id}}^? = \href{../text/instructions.html#text-label}{\mathtt{label}}) \\ &&|&
\def\mathdef1796#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1796{if}~~I'{:}\href{../text/instructions.html#text-label}{\mathtt{label}}_I~~\mathit{bt}{:}\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~(\mathit{in}_1{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~
\def\mathdef1797#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1797{else}~~\href{../text/values.html#text-id}{\mathtt{id}}_1^?~~(\mathit{in}_2{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef1798#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1798{end}~~\href{../text/values.html#text-id}{\mathtt{id}}_2^?
\\ &&&\qquad \Rightarrow\quad \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{if}}~\mathit{bt}~\mathit{in}_1^\ast~\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{else}}~\mathit{in}_2^\ast~\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{end}}
\qquad (\mathrel{\mbox{if}} \href{../text/values.html#text-id}{\mathtt{id}}_1^? = \epsilon \vee \href{../text/values.html#text-id}{\mathtt{id}}_1^? = \href{../text/instructions.html#text-label}{\mathtt{label}}, \href{../text/values.html#text-id}{\mathtt{id}}_2^? = \epsilon \vee \href{../text/values.html#text-id}{\mathtt{id}}_2^? = \href{../text/instructions.html#text-label}{\mathtt{label}}) \\
\end{array}\end{split}\]
Note
The side condition stating that the identifier context \(I'\) must be empty in the rule for \(\href{../text/modules.html#text-typeuse}{\mathtt{typeuse}}\) block types enforces that no identifier can be bound in any \(\href{../text/types.html#text-functype}{\mathtt{param}}\) declaration for a block type.
All other control instruction are represented verbatim.
\[\begin{split}\begin{array}{llcllll}
\def\mathdef1755#1{{}}\mathdef1755{plain instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=&
\def\mathdef1799#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1799{unreachable} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{unreachable}} \\ &&|&
\def\mathdef1800#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1800{nop} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{nop}} \\ &&|&
\def\mathdef1801#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1801{br}~~l{:}\href{../text/modules.html#text-labelidx}{\mathtt{labelidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{br}}~l \\ &&|&
\def\mathdef1802#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1802{br\_if}~~l{:}\href{../text/modules.html#text-labelidx}{\mathtt{labelidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{br\_if}}~l \\ &&|&
\def\mathdef1803#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1803{br\_table}~~l^\ast{:}\href{../text/conventions.html#text-vec}{\mathtt{vec}}(\href{../text/modules.html#text-labelidx}{\mathtt{labelidx}}_I)~~l_N{:}\href{../text/modules.html#text-labelidx}{\mathtt{labelidx}}_I
&\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{br\_table}}~l^\ast~l_N \\ &&|&
\def\mathdef1804#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1804{return} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{return}} \\ &&|&
\def\mathdef1805#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1805{call}~~x{:}\href{../text/modules.html#text-funcidx}{\mathtt{funcidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call}}~x \\ &&|&
\def\mathdef1806#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1806{call\_indirect}~~x,I'{:}\href{../text/modules.html#text-typeuse}{\mathtt{typeuse}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call\_indirect}}~x
& (\mathrel{\mbox{if}} I' = \{\}) \\
\end{array}\end{split}\]
Note
The side condition stating that the identifier context \(I'\) must be empty in the rule for \(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call\_indirect}}\) enforces that no identifier can be bound in any \(\href{../text/types.html#text-functype}{\mathtt{param}}\) declaration appearing in the type annotation.
Abbreviations
The \(\def\mathdef1807#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1807{else}\) keyword of an \(\def\mathdef1808#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1808{if}\) instruction can be omitted if the following instruction sequence is empty.
\[\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{block instruction} &
\def\mathdef1809#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1809{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1810#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1810{end}
&\equiv&
\def\mathdef1811#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1811{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1812#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1812{else}~~\def\mathdef1813#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1813{end}
\end{array}\]
Parametric Instructions
\[\begin{split}\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|&
\def\mathdef1814#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1814{drop} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{drop}} \\ &&|&
\def\mathdef1815#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1815{select} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{select}} \\
\end{array}\end{split}\]
Variable Instructions
\[\begin{split}\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|&
\def\mathdef1816#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1816{local.get}~~x{:}\href{../text/modules.html#text-localidx}{\mathtt{localidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.get}}~x \\ &&|&
\def\mathdef1817#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1817{local.set}~~x{:}\href{../text/modules.html#text-localidx}{\mathtt{localidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.set}}~x \\ &&|&
\def\mathdef1818#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1818{local.tee}~~x{:}\href{../text/modules.html#text-localidx}{\mathtt{localidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.tee}}~x \\ &&|&
\def\mathdef1819#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1819{global.get}~~x{:}\href{../text/modules.html#text-globalidx}{\mathtt{globalidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{global.get}}~x \\ &&|&
\def\mathdef1820#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1820{global.set}~~x{:}\href{../text/modules.html#text-globalidx}{\mathtt{globalidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{global.set}}~x \\
\end{array}\end{split}\]
Memory Instructions
The offset and alignment immediates to memory instructions are optional.
The offset defaults to \(\mathtt{0}\), the alignment to the storage size of the respective memory access, which is its natural alignment.
Lexically, an \(\href{../text/instructions.html#text-memarg}{\mathtt{offset}}\) or \(\href{../text/instructions.html#text-memarg}{\mathtt{align}}\) phrase is considered a single keyword token, so no white space is allowed around the \(\def\mathdef1821#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1821{=}\).
\[\begin{split}\begin{array}{llcllll}
\def\mathdef1755#1{{}}\mathdef1755{memory argument} & \href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_N &::=&
o{:}\href{../text/instructions.html#text-memarg}{\mathtt{offset}}~~a{:}\href{../text/instructions.html#text-memarg}{\mathtt{align}}_N &\Rightarrow& \{ \href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{align}}~n,~\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{offset}}~o \} & (\mathrel{\mbox{if}} a = 2^n) \\
\def\mathdef1755#1{{}}\mathdef1755{memory offset} & \href{../text/instructions.html#text-memarg}{\mathtt{offset}} &::=&
\def\mathdef1822#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1822{offset{=}}o{:}\href{../text/values.html#text-int}{\def\mathdef1780#1{{\mathtt{u}#1}}\mathdef1780{\mathtt{32}}} &\Rightarrow& o \\ &&|&
\epsilon &\Rightarrow& 0 \\
\def\mathdef1755#1{{}}\mathdef1755{memory alignment} & \href{../text/instructions.html#text-memarg}{\mathtt{align}}_N &::=&
\def\mathdef1823#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1823{align{=}}a{:}\href{../text/values.html#text-int}{\def\mathdef1780#1{{\mathtt{u}#1}}\mathdef1780{\mathtt{32}}} &\Rightarrow& a \\ &&|&
\epsilon &\Rightarrow& N \\
\def\mathdef1755#1{{}}\mathdef1755{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|&
\def\mathdef1824#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1824{i32.load}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}~m \\ &&|&
\def\mathdef1825#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1825{i64.load}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_8 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}~m \\ &&|&
\def\mathdef1826#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1826{f32.load}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}~m \\ &&|&
\def\mathdef1827#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1827{f64.load}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_8 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}~m \\ &&|&
\def\mathdef1828#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1828{i32.load8\_s}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_1 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{8\_s}~m \\ &&|&
\def\mathdef1829#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1829{i32.load8\_u}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_1 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{8\_u}~m \\ &&|&
\def\mathdef1830#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1830{i32.load16\_s}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_2 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{16\_s}~m \\ &&|&
\def\mathdef1831#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1831{i32.load16\_u}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_2 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{16\_u}~m \\ &&|&
\def\mathdef1832#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1832{i64.load8\_s}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_1 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{8\_s}~m \\ &&|&
\def\mathdef1833#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1833{i64.load8\_u}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_1 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{8\_u}~m \\ &&|&
\def\mathdef1834#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1834{i64.load16\_s}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_2 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{16\_s}~m \\ &&|&
\def\mathdef1835#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1835{i64.load16\_u}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_2 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{16\_u}~m \\ &&|&
\def\mathdef1836#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1836{i64.load32\_s}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{32\_s}~m \\ &&|&
\def\mathdef1837#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1837{i64.load32\_u}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}\mathsf{32\_u}~m \\ &&|&
\def\mathdef1838#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1838{i32.store}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}~m \\ &&|&
\def\mathdef1839#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1839{i64.store}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_8 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}~m \\ &&|&
\def\mathdef1840#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1840{f32.store}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}~m \\ &&|&
\def\mathdef1841#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1841{f64.store}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_8 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}~m \\ &&|&
\def\mathdef1842#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1842{i32.store8}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_1 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}\mathsf{8}~m \\ &&|&
\def\mathdef1843#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1843{i32.store16}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_2 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}\mathsf{16}~m \\ &&|&
\def\mathdef1844#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1844{i64.store8}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_1 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}\mathsf{8}~m \\ &&|&
\def\mathdef1845#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1845{i64.store16}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_2 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}\mathsf{16}~m \\ &&|&
\def\mathdef1846#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1846{i64.store32}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}\mathsf{32}~m \\ &&|&
\def\mathdef1847#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1847{memory.size} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{memory.size}} \\ &&|&
\def\mathdef1848#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1848{memory.grow} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{memory.grow}} \\
\end{array}\end{split}\]
Numeric Instructions
\[\begin{split}\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\&&|&
\def\mathdef1849#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1849{i32.const}~~n{:}\href{../text/values.html#text-int}{\def\mathdef1786#1{{\mathtt{i}#1}}\mathdef1786{\mathtt{32}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n \\ &&|&
\def\mathdef1850#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1850{i64.const}~~n{:}\href{../text/values.html#text-int}{\def\mathdef1787#1{{\mathtt{i}#1}}\mathdef1787{\mathtt{64}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n \\ &&|&
\def\mathdef1851#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1851{f32.const}~~z{:}\href{../text/values.html#text-float}{\def\mathdef1790#1{{\mathtt{f}#1}}\mathdef1790{\mathtt{32}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~z \\ &&|&
\def\mathdef1852#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1852{f64.const}~~z{:}\href{../text/values.html#text-float}{\def\mathdef1791#1{{\mathtt{f}#1}}\mathdef1791{\mathtt{64}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~z \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1853#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1853{i32.clz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{clz}} \\ &&|&
\def\mathdef1854#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1854{i32.ctz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ctz}} \\ &&|&
\def\mathdef1855#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1855{i32.popcnt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{popcnt}} \\ &&|&
\def\mathdef1856#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1856{i32.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1857#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1857{i32.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1858#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1858{i32.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1859#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1859{i32.div\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_s} \\ &&|&
\def\mathdef1860#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1860{i32.div\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_u} \\ &&|&
\def\mathdef1861#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1861{i32.rem\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_s} \\ &&|&
\def\mathdef1862#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1862{i32.rem\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_u} \\ &&|&
\def\mathdef1863#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1863{i32.and} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{and}} \\ &&|&
\def\mathdef1864#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1864{i32.or} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{or}} \\ &&|&
\def\mathdef1865#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1865{i32.xor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{xor}} \\ &&|&
\def\mathdef1866#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1866{i32.shl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shl}} \\ &&|&
\def\mathdef1867#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1867{i32.shr\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_s} \\ &&|&
\def\mathdef1868#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1868{i32.shr\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_u} \\ &&|&
\def\mathdef1869#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1869{i32.rotl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotl}} \\ &&|&
\def\mathdef1870#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1870{i32.rotr} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotr}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1871#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1871{i64.clz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{clz}} \\ &&|&
\def\mathdef1872#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1872{i64.ctz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ctz}} \\ &&|&
\def\mathdef1873#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1873{i64.popcnt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{popcnt}} \\ &&|&
\def\mathdef1874#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1874{i64.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1875#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1875{i64.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1876#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1876{i64.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1877#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1877{i64.div\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_s} \\ &&|&
\def\mathdef1878#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1878{i64.div\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_u} \\ &&|&
\def\mathdef1879#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1879{i64.rem\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_s} \\ &&|&
\def\mathdef1880#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1880{i64.rem\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_u} \\ &&|&
\def\mathdef1881#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1881{i64.and} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{and}} \\ &&|&
\def\mathdef1882#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1882{i64.or} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{or}} \\ &&|&
\def\mathdef1883#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1883{i64.xor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{xor}} \\ &&|&
\def\mathdef1884#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1884{i64.shl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shl}} \\ &&|&
\def\mathdef1885#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1885{i64.shr\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_s} \\ &&|&
\def\mathdef1886#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1886{i64.shr\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_u} \\ &&|&
\def\mathdef1887#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1887{i64.rotl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotl}} \\ &&|&
\def\mathdef1888#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1888{i64.rotr} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotr}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1889#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1889{f32.abs} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{abs}} \\ &&|&
\def\mathdef1890#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1890{f32.neg} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{neg}} \\ &&|&
\def\mathdef1891#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1891{f32.ceil} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ceil}} \\ &&|&
\def\mathdef1892#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1892{f32.floor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{floor}} \\ &&|&
\def\mathdef1893#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1893{f32.trunc} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}} \\ &&|&
\def\mathdef1894#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1894{f32.nearest} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{nearest}} \\ &&|&
\def\mathdef1895#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1895{f32.sqrt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sqrt}} \\ &&|&
\def\mathdef1896#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1896{f32.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1897#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1897{f32.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1898#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1898{f32.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1899#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1899{f32.div} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}} \\ &&|&
\def\mathdef1900#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1900{f32.min} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{min}} \\ &&|&
\def\mathdef1901#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1901{f32.max} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{max}} \\ &&|&
\def\mathdef1902#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1902{f32.copysign} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{copysign}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1903#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1903{f64.abs} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{abs}} \\ &&|&
\def\mathdef1904#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1904{f64.neg} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{neg}} \\ &&|&
\def\mathdef1905#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1905{f64.ceil} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ceil}} \\ &&|&
\def\mathdef1906#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1906{f64.floor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{floor}} \\ &&|&
\def\mathdef1907#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1907{f64.trunc} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}} \\ &&|&
\def\mathdef1908#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1908{f64.nearest} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{nearest}} \\ &&|&
\def\mathdef1909#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1909{f64.sqrt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sqrt}} \\ &&|&
\def\mathdef1910#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1910{f64.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1911#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1911{f64.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1912#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1912{f64.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1913#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1913{f64.div} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}} \\ &&|&
\def\mathdef1914#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1914{f64.min} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{min}} \\ &&|&
\def\mathdef1915#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1915{f64.max} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{max}} \\ &&|&
\def\mathdef1916#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1916{f64.copysign} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{copysign}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1917#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1917{i32.eqz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eqz}} \\ &&|&
\def\mathdef1918#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1918{i32.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1919#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1919{i32.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1920#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1920{i32.lt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_s} \\ &&|&
\def\mathdef1921#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1921{i32.lt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_u} \\ &&|&
\def\mathdef1922#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1922{i32.gt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_s} \\ &&|&
\def\mathdef1923#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1923{i32.gt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_u} \\ &&|&
\def\mathdef1924#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1924{i32.le\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_s} \\ &&|&
\def\mathdef1925#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1925{i32.le\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_u} \\ &&|&
\def\mathdef1926#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1926{i32.ge\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_s} \\ &&|&
\def\mathdef1927#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1927{i32.ge\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_u} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1928#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1928{i64.eqz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eqz}} \\ &&|&
\def\mathdef1929#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1929{i64.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1930#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1930{i64.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1931#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1931{i64.lt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_s} \\ &&|&
\def\mathdef1932#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1932{i64.lt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_u} \\ &&|&
\def\mathdef1933#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1933{i64.gt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_s} \\ &&|&
\def\mathdef1934#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1934{i64.gt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_u} \\ &&|&
\def\mathdef1935#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1935{i64.le\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_s} \\ &&|&
\def\mathdef1936#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1936{i64.le\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_u} \\ &&|&
\def\mathdef1937#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1937{i64.ge\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_s} \\ &&|&
\def\mathdef1938#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1938{i64.ge\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_u} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1939#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1939{f32.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1940#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1940{f32.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1941#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1941{f32.lt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}} \\ &&|&
\def\mathdef1942#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1942{f32.gt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}} \\ &&|&
\def\mathdef1943#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1943{f32.le} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}} \\ &&|&
\def\mathdef1944#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1944{f32.ge} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1945#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1945{f64.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1946#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1946{f64.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1947#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1947{f64.lt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}} \\ &&|&
\def\mathdef1948#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1948{f64.gt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}} \\ &&|&
\def\mathdef1949#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1949{f64.le} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}} \\ &&|&
\def\mathdef1950#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1950{f64.ge} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1951#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1951{i32.wrap\_i64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{wrap}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}} \\ &&|&
\def\mathdef1952#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1952{i32.trunc\_f32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_s} \\ &&|&
\def\mathdef1953#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1953{i32.trunc\_f32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_u} \\ &&|&
\def\mathdef1954#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1954{i32.trunc\_f64\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_s} \\ &&|&
\def\mathdef1955#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1955{i32.trunc\_f64\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_u} \\ &&|&
\def\mathdef1956#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1956{i32.trunc\_sat_f32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_s} \\ &&|&
\def\mathdef1957#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1957{i32.trunc\_sat_f32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_u} \\ &&|&
\def\mathdef1958#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1958{i32.trunc\_sat_f64\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_s} \\ &&|&
\def\mathdef1959#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1959{i32.trunc\_sat_f64\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_u} \\ &&|&
\def\mathdef1960#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1960{i64.extend\_i32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}\mathsf{\_s} \\ &&|&
\def\mathdef1961#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1961{i64.extend\_i32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}\mathsf{\_u} \\ &&|&
\def\mathdef1962#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1962{i64.trunc\_f32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_s} \\ &&|&
\def\mathdef1963#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1963{i64.trunc\_f32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_u} \\ &&|&
\def\mathdef1964#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1964{i64.trunc\_f64\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_s} \\ &&|&
\def\mathdef1965#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1965{i64.trunc\_f64\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_u} \\ &&|&
\def\mathdef1966#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1966{i64.trunc\_sat_f32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_s} \\ &&|&
\def\mathdef1967#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1967{i64.trunc\_sat_f32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}\mathsf{\_u} \\ &&|&
\def\mathdef1968#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1968{i64.trunc\_sat_f64\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_s} \\ &&|&
\def\mathdef1969#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1969{i64.trunc\_sat_f64\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}\mathsf{\_u} \\ &&|&
\def\mathdef1970#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1970{f32.convert\_i32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}\mathsf{\_s} \\ &&|&
\def\mathdef1971#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1971{f32.convert\_i32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}\mathsf{\_u} \\ &&|&
\def\mathdef1972#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1972{f32.convert\_i64\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}\mathsf{\_s} \\ &&|&
\def\mathdef1973#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1973{f32.convert\_i64\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}\mathsf{\_u} \\ &&|&
\def\mathdef1974#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1974{f32.demote\_f64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{demote}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}} \\ &&|&
\def\mathdef1975#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1975{f64.convert\_i32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}\mathsf{\_s} \\ &&|&
\def\mathdef1976#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1976{f64.convert\_i32\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}\mathsf{\_u} \\ &&|&
\def\mathdef1977#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1977{f64.convert\_i64\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}\mathsf{\_s} \\ &&|&
\def\mathdef1978#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1978{f64.convert\_i64\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}\mathsf{\_u} \\ &&|&
\def\mathdef1979#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1979{f64.promote\_f32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{promote}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}} \\ &&|&
\def\mathdef1980#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1980{i32.reinterpret\_f32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{reinterpret}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}} \\ &&|&
\def\mathdef1981#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1981{i64.reinterpret\_f64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{reinterpret}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}} \\ &&|&
\def\mathdef1982#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1982{f32.reinterpret\_i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{reinterpret}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|&
\def\mathdef1983#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1983{f64.reinterpret\_i64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{reinterpret}}\mathsf{\_}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}} \\
\end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll}
\phantom{\def\mathdef1755#1{{}}\mathdef1755{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1984#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1984{i32.extend8\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{8\_s} \\ &&|&
\def\mathdef1985#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1985{i32.extend16\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{16\_s} \\ &&|&
\def\mathdef1986#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1986{i64.extend8\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{8\_s} \\ &&|&
\def\mathdef1987#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1987{i64.extend16\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{16\_s} \\ &&|&
\def\mathdef1988#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1988{i64.extend32\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{32\_s} \\
\end{array}\end{split}\]
Folded Instructions
Instructions can be written as S-expressions by grouping them into folded form. In that notation, an instruction is wrapped in parentheses and optionally includes nested folded instructions to indicate its operands.
In the case of block instructions, the folded form omits the \(\def\mathdef1989#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1989{end}\) delimiter.
For \(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{if}}\) instructions, both branches have to be wrapped into nested S-expressions, headed by the keywords \(\def\mathdef1990#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1990{then}\) and \(\def\mathdef1991#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1991{else}\).
The set of all phrases defined by the following abbreviations recursively forms the auxiliary syntactic class \(\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}\).
Such a folded instruction can appear anywhere a regular instruction can.
\[\begin{split}\begin{array}{lllll}
\def\mathdef1755#1{{}}\mathdef1755{instruction} &
\def\mathdef1992#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1992{(}~\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}~~\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~\def\mathdef1993#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1993{)}
&\equiv\quad \href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~~\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}} \\ &
\def\mathdef1994#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1994{(}~\def\mathdef1995#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1995{block}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~\def\mathdef1996#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1996{)}
&\equiv\quad \def\mathdef1997#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1997{block}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1998#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1998{end} \\ &
\def\mathdef1999#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1999{(}~\def\mathdef2000#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2000{loop}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~\def\mathdef2001#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2001{)}
&\equiv\quad \def\mathdef2002#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2002{loop}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef2003#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2003{end} \\ &
\def\mathdef2004#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2004{(}~\def\mathdef2005#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2005{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}}~~\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast
&\hspace{-3ex} \def\mathdef2006#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2006{(}~\def\mathdef2007#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2007{then}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}_1^\ast~\def\mathdef2008#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2008{)}~~\def\mathdef2009#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2009{(}~\def\mathdef2010#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2010{else}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}_2^\ast~\def\mathdef2011#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2011{)}^?~~\def\mathdef2012#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2012{)}
\quad\equiv \\ &\qquad
\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~~\def\mathdef2013#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2013{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/instructions.html#text-blocktype}{\mathtt{blocktype}} &\hspace{-1ex} \href{../text/instructions.html#text-instr}{\mathtt{instr}}_1^\ast~~\def\mathdef2014#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2014{else}~~(\href{../text/instructions.html#text-instr}{\mathtt{instr}}_2^\ast)^?~\def\mathdef2015#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2015{end} \\
\end{array}\end{split}\]
Note
For example, the instruction sequence
\[\mathtt{(local.get~\$x)~(i32.const~2)~i32.add~(i32.const~3)~i32.mul}\]
can be folded into
\[\mathtt{(i32.mul~(i32.add~(local.get~\$x)~(i32.const~2))~(i32.const~3))}\]
Folded instructions are solely syntactic sugar,
no additional syntactic or type-based checking is implied.
Expressions
Expressions are written as instruction sequences.
No explicit \(\def\mathdef2016#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2016{end}\) keyword is included, since they only occur in bracketed positions.
\[\begin{split}\begin{array}{llclll}
\def\mathdef1755#1{{}}\mathdef1755{expression} & \href{../text/instructions.html#text-expr}{\mathtt{expr}} &::=&
(\mathit{in}{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}})^\ast &\Rightarrow& \mathit{in}^\ast~\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{end}} \\
\end{array}\end{split}\]