Instructions
Instructions are syntactically distinguished into plain and structured instructions.
\[\begin{split}\begin{array}{llclll}
\def\mathdef1679#1{{}}\mathdef1679{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\mathdef1679#1{{}}\mathdef1679{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.
\[\begin{split}\begin{array}{llclll}
\def\mathdef1679#1{{}}\mathdef1679{block instruction} & \href{../text/instructions.html#text-blockinstr}{\mathtt{blockinstr}}_I &::=&
\def\mathdef1715#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1715{block}~~I'{:}\href{../text/instructions.html#text-label}{\mathtt{label}}_I~~\mathit{rt}{:}\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~(\mathit{in}{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef1716#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1716{end}~~\href{../text/values.html#text-id}{\mathtt{id}}^?
\\ &&&\qquad \Rightarrow\quad \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{block}}~\mathit{rt}~\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\mathdef1717#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1717{loop}~~I'{:}\href{../text/instructions.html#text-label}{\mathtt{label}}_I~~\mathit{rt}{:}\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~(\mathit{in}{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef1718#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1718{end}~~\href{../text/values.html#text-id}{\mathtt{id}}^?
\\ &&&\qquad \Rightarrow\quad \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{loop}}~\mathit{rt}~\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\mathdef1719#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1719{if}~~I'{:}\href{../text/instructions.html#text-label}{\mathtt{label}}_I~~\mathit{rt}{:}\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~(\mathit{in}_1{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~
\def\mathdef1720#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1720{else}~~\href{../text/values.html#text-id}{\mathtt{id}}_1^?~~(\mathit{in}_2{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef1721#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1721{end}~~\href{../text/values.html#text-id}{\mathtt{id}}_2^?
\\ &&&\qquad \Rightarrow\quad \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{if}}~\mathit{rt}~\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}\]
All other control instruction are represented verbatim.
\[\begin{split}\begin{array}{llcllll}
\def\mathdef1679#1{{}}\mathdef1679{plain instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=&
\def\mathdef1722#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1722{unreachable} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{unreachable}} \\ &&|&
\def\mathdef1723#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1723{nop} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{nop}} \\ &&|&
\def\mathdef1724#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1724{br}~~l{:}\href{../text/modules.html#text-labelidx}{\mathtt{labelidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{br}}~l \\ &&|&
\def\mathdef1725#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1725{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\mathdef1726#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1726{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\mathdef1727#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1727{return} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{return}} \\ &&|&
\def\mathdef1728#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1728{call}~~x{:}\href{../text/modules.html#text-funcidx}{\mathtt{funcidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call}}~x \\ &&|&
\def\mathdef1729#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1729{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\mathdef1730#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1730{else}\) keyword of an \(\def\mathdef1731#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1731{if}\) instruction can be omitted if the following instruction sequence is empty.
\[\begin{array}{llclll}
\def\mathdef1679#1{{}}\mathdef1679{block instruction} &
\def\mathdef1732#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1732{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1733#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1733{end}
&\equiv&
\def\mathdef1734#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1734{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1735#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1735{else}~~\def\mathdef1736#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1736{end}
\end{array}\]
Parametric Instructions
\[\begin{split}\begin{array}{llclll}
\def\mathdef1679#1{{}}\mathdef1679{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|&
\def\mathdef1737#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1737{drop} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{drop}} \\ &&|&
\def\mathdef1738#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1738{select} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{select}} \\
\end{array}\end{split}\]
Variable Instructions
\[\begin{split}\begin{array}{llclll}
\def\mathdef1679#1{{}}\mathdef1679{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|&
\def\mathdef1739#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1739{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\mathdef1740#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1740{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\mathdef1741#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1741{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\mathdef1742#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1742{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\mathdef1743#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1743{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\mathdef1744#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1744{=}\).
\[\begin{split}\begin{array}{llcllll}
\def\mathdef1679#1{{}}\mathdef1679{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\mathdef1679#1{{}}\mathdef1679{memory offset} & \href{../text/instructions.html#text-memarg}{\mathtt{offset}} &::=&
\def\mathdef1745#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1745{offset{=}}o{:}\href{../text/values.html#text-int}{\def\mathdef1703#1{{\mathtt{u}#1}}\mathdef1703{\mathtt{32}}} &\Rightarrow& o \\ &&|&
\epsilon &\Rightarrow& 0 \\
\def\mathdef1679#1{{}}\mathdef1679{memory alignment} & \href{../text/instructions.html#text-memarg}{\mathtt{align}}_N &::=&
\def\mathdef1746#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1746{align{=}}a{:}\href{../text/values.html#text-int}{\def\mathdef1703#1{{\mathtt{u}#1}}\mathdef1703{\mathtt{32}}} &\Rightarrow& a \\ &&|&
\epsilon &\Rightarrow& N \\
\def\mathdef1679#1{{}}\mathdef1679{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|&
\def\mathdef1747#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1747{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\mathdef1748#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1748{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\mathdef1749#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1749{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\mathdef1750#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1750{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\mathdef1751#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1751{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\mathdef1752#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1752{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\mathdef1753#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1753{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\mathdef1754#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1754{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\mathdef1755#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1755{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\mathdef1756#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1756{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\mathdef1757#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1757{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\mathdef1758#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1758{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\mathdef1759#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1759{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\mathdef1760#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1760{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\mathdef1761#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1761{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\mathdef1762#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1762{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\mathdef1763#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1763{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\mathdef1764#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1764{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\mathdef1765#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1765{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\mathdef1766#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1766{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\mathdef1767#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1767{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\mathdef1768#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1768{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\mathdef1769#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1769{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\mathdef1770#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1770{memory.size} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{memory.size}} \\ &&|&
\def\mathdef1771#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1771{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\mathdef1679#1{{}}\mathdef1679{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\&&|&
\def\mathdef1772#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1772{i32.const}~~n{:}\href{../text/values.html#text-int}{\def\mathdef1709#1{{\mathtt{i}#1}}\mathdef1709{\mathtt{32}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n \\ &&|&
\def\mathdef1773#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1773{i64.const}~~n{:}\href{../text/values.html#text-int}{\def\mathdef1710#1{{\mathtt{i}#1}}\mathdef1710{\mathtt{64}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n \\ &&|&
\def\mathdef1774#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1774{f32.const}~~z{:}\href{../text/values.html#text-float}{\def\mathdef1713#1{{\mathtt{f}#1}}\mathdef1713{\mathtt{32}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~z \\ &&|&
\def\mathdef1775#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1775{f64.const}~~z{:}\href{../text/values.html#text-float}{\def\mathdef1714#1{{\mathtt{f}#1}}\mathdef1714{\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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1776#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1776{i32.clz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{clz}} \\ &&|&
\def\mathdef1777#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1777{i32.ctz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ctz}} \\ &&|&
\def\mathdef1778#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1778{i32.popcnt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{popcnt}} \\ &&|&
\def\mathdef1779#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1779{i32.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1780#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1780{i32.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1781#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1781{i32.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1782#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1782{i32.div\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_s} \\ &&|&
\def\mathdef1783#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1783{i32.div\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_u} \\ &&|&
\def\mathdef1784#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1784{i32.rem\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_s} \\ &&|&
\def\mathdef1785#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1785{i32.rem\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_u} \\ &&|&
\def\mathdef1786#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1786{i32.and} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{and}} \\ &&|&
\def\mathdef1787#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1787{i32.or} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{or}} \\ &&|&
\def\mathdef1788#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1788{i32.xor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{xor}} \\ &&|&
\def\mathdef1789#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1789{i32.shl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shl}} \\ &&|&
\def\mathdef1790#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1790{i32.shr\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_s} \\ &&|&
\def\mathdef1791#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1791{i32.shr\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_u} \\ &&|&
\def\mathdef1792#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1792{i32.rotl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotl}} \\ &&|&
\def\mathdef1793#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1793{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1794#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1794{i64.clz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{clz}} \\ &&|&
\def\mathdef1795#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1795{i64.ctz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ctz}} \\ &&|&
\def\mathdef1796#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1796{i64.popcnt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{popcnt}} \\ &&|&
\def\mathdef1797#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1797{i64.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1798#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1798{i64.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1799#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1799{i64.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1800#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1800{i64.div\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_s} \\ &&|&
\def\mathdef1801#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1801{i64.div\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_u} \\ &&|&
\def\mathdef1802#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1802{i64.rem\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_s} \\ &&|&
\def\mathdef1803#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1803{i64.rem\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_u} \\ &&|&
\def\mathdef1804#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1804{i64.and} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{and}} \\ &&|&
\def\mathdef1805#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1805{i64.or} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{or}} \\ &&|&
\def\mathdef1806#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1806{i64.xor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{xor}} \\ &&|&
\def\mathdef1807#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1807{i64.shl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shl}} \\ &&|&
\def\mathdef1808#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1808{i64.shr\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_s} \\ &&|&
\def\mathdef1809#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1809{i64.shr\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_u} \\ &&|&
\def\mathdef1810#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1810{i64.rotl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotl}} \\ &&|&
\def\mathdef1811#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1811{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1812#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1812{f32.abs} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{abs}} \\ &&|&
\def\mathdef1813#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1813{f32.neg} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{neg}} \\ &&|&
\def\mathdef1814#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1814{f32.ceil} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ceil}} \\ &&|&
\def\mathdef1815#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1815{f32.floor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{floor}} \\ &&|&
\def\mathdef1816#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1816{f32.trunc} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}} \\ &&|&
\def\mathdef1817#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1817{f32.nearest} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{nearest}} \\ &&|&
\def\mathdef1818#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1818{f32.sqrt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sqrt}} \\ &&|&
\def\mathdef1819#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1819{f32.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1820#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1820{f32.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1821#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1821{f32.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1822#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1822{f32.div} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}} \\ &&|&
\def\mathdef1823#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1823{f32.min} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{min}} \\ &&|&
\def\mathdef1824#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1824{f32.max} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{max}} \\ &&|&
\def\mathdef1825#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1825{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1826#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1826{f64.abs} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{abs}} \\ &&|&
\def\mathdef1827#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1827{f64.neg} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{neg}} \\ &&|&
\def\mathdef1828#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1828{f64.ceil} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ceil}} \\ &&|&
\def\mathdef1829#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1829{f64.floor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{floor}} \\ &&|&
\def\mathdef1830#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1830{f64.trunc} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}} \\ &&|&
\def\mathdef1831#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1831{f64.nearest} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{nearest}} \\ &&|&
\def\mathdef1832#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1832{f64.sqrt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sqrt}} \\ &&|&
\def\mathdef1833#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1833{f64.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|&
\def\mathdef1834#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1834{f64.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|&
\def\mathdef1835#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1835{f64.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|&
\def\mathdef1836#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1836{f64.div} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}} \\ &&|&
\def\mathdef1837#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1837{f64.min} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{min}} \\ &&|&
\def\mathdef1838#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1838{f64.max} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{max}} \\ &&|&
\def\mathdef1839#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1839{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1840#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1840{i32.eqz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eqz}} \\ &&|&
\def\mathdef1841#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1841{i32.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1842#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1842{i32.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1843#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1843{i32.lt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_s} \\ &&|&
\def\mathdef1844#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1844{i32.lt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_u} \\ &&|&
\def\mathdef1845#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1845{i32.gt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_s} \\ &&|&
\def\mathdef1846#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1846{i32.gt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_u} \\ &&|&
\def\mathdef1847#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1847{i32.le\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_s} \\ &&|&
\def\mathdef1848#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1848{i32.le\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_u} \\ &&|&
\def\mathdef1849#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1849{i32.ge\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_s} \\ &&|&
\def\mathdef1850#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1850{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1851#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1851{i64.eqz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eqz}} \\ &&|&
\def\mathdef1852#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1852{i64.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1853#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1853{i64.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1854#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1854{i64.lt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_s} \\ &&|&
\def\mathdef1855#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1855{i64.lt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_u} \\ &&|&
\def\mathdef1856#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1856{i64.gt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_s} \\ &&|&
\def\mathdef1857#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1857{i64.gt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_u} \\ &&|&
\def\mathdef1858#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1858{i64.le\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_s} \\ &&|&
\def\mathdef1859#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1859{i64.le\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_u} \\ &&|&
\def\mathdef1860#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1860{i64.ge\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_s} \\ &&|&
\def\mathdef1861#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1861{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1862#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1862{f32.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1863#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1863{f32.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1864#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1864{f32.lt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}} \\ &&|&
\def\mathdef1865#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1865{f32.gt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}} \\ &&|&
\def\mathdef1866#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1866{f32.le} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}} \\ &&|&
\def\mathdef1867#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1867{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1868#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1868{f64.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|&
\def\mathdef1869#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1869{f64.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|&
\def\mathdef1870#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1870{f64.lt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}} \\ &&|&
\def\mathdef1871#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1871{f64.gt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}} \\ &&|&
\def\mathdef1872#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1872{f64.le} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}} \\ &&|&
\def\mathdef1873#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1873{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\mathdef1679#1{{}}\mathdef1679{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|&
\def\mathdef1874#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1874{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\mathdef1875#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1875{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\mathdef1876#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1876{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\mathdef1877#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1877{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\mathdef1878#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1878{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\mathdef1879#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1879{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\mathdef1880#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1880{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\mathdef1881#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1881{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\mathdef1882#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1882{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\mathdef1883#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1883{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\mathdef1884#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1884{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\mathdef1885#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1885{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\mathdef1886#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1886{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\mathdef1887#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1887{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\mathdef1888#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1888{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\mathdef1889#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1889{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\mathdef1890#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1890{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\mathdef1891#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1891{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\mathdef1892#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1892{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\mathdef1893#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1893{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\mathdef1894#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1894{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\mathdef1895#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1895{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\mathdef1896#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1896{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\mathdef1897#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1897{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\mathdef1898#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1898{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}\]
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\mathdef1899#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1899{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\mathdef1900#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1900{then}\) and \(\def\mathdef1901#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1901{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\mathdef1679#1{{}}\mathdef1679{instruction} &
\def\mathdef1902#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1902{(}~\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}~~\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~\def\mathdef1903#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1903{)}
&\equiv\quad \href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~~\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}} \\ &
\def\mathdef1904#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1904{(}~\def\mathdef1905#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1905{block}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~\def\mathdef1906#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1906{)}
&\equiv\quad \def\mathdef1907#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1907{block}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1908#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1908{end} \\ &
\def\mathdef1909#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1909{(}~\def\mathdef1910#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1910{loop}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~\def\mathdef1911#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1911{)}
&\equiv\quad \def\mathdef1912#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1912{loop}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}^\ast~~\def\mathdef1913#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1913{end} \\ &
\def\mathdef1914#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1914{(}~\def\mathdef1915#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1915{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}}~~\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast
&\hspace{-3ex} \def\mathdef1916#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1916{(}~\def\mathdef1917#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1917{then}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}_1^\ast~\def\mathdef1918#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1918{)}~~\def\mathdef1919#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1919{(}~\def\mathdef1920#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1920{else}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}_2^\ast~\def\mathdef1921#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1921{)}^?~~\def\mathdef1922#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1922{)}
\quad\equiv \\ &\qquad
\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~~\def\mathdef1923#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1923{if}~~\href{../text/instructions.html#text-label}{\mathtt{label}}~~\href{../text/types.html#text-resulttype}{\mathtt{resulttype}} &\hspace{-1ex} \href{../text/instructions.html#text-instr}{\mathtt{instr}}_1^\ast~~\def\mathdef1924#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1924{else}~~(\href{../text/instructions.html#text-instr}{\mathtt{instr}}_2^\ast)^?~\def\mathdef1925#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1925{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\mathdef1926#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef1926{end}\) keyword is included, since they only occur in bracketed positions.
\[\begin{split}\begin{array}{llclll}
\def\mathdef1679#1{{}}\mathdef1679{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}\]