Instructions

Instructions are syntactically distinguished into plain and structured instructions.

\[\begin{split}\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{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\mathdef2644#1{{}}\mathdef2644{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\mathdef2644#1{{}}\mathdef2644{block instruction} & \href{../text/instructions.html#text-blockinstr}{\mathtt{blockinstr}}_I &::=& \def\mathdef2701#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2701{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\mathdef2702#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2702{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\mathdef2703#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2703{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\mathdef2704#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2704{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\mathdef2705#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2705{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\mathdef2706#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2706{else}~~\href{../text/values.html#text-id}{\mathtt{id}}_1^?~~(\mathit{in}_2{:}\href{../text/instructions.html#text-instr}{\mathtt{instr}}_{I'})^\ast~~\def\mathdef2707#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2707{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}{llclll} \def\mathdef2644#1{{}}\mathdef2644{plain instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \def\mathdef2708#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2708{unreachable} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{unreachable}} \\ &&|& \def\mathdef2709#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2709{nop} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{nop}} \\ &&|& \def\mathdef2710#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2710{br}~~l{:}\href{../text/modules.html#text-labelidx}{\mathtt{labelidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{br}}~l \\ &&|& \def\mathdef2711#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2711{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\mathdef2712#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2712{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\mathdef2713#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2713{return} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{return}} \\ &&|& \def\mathdef2714#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2714{call}~~x{:}\href{../text/modules.html#text-funcidx}{\mathtt{funcidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call}}~x \\ &&|& \def\mathdef2715#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2715{call\_indirect}~~x{:}\href{../text/modules.html#text-typeidx}{\mathtt{typeidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call\_indirect}}~x \\ \end{array}\end{split}\]

Abbreviations

The \(\def\mathdef2716#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2716{else}\) keyword of an \(\def\mathdef2717#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2717{if}\) instruction can be omitted if the following instruction sequence is empty.

\[\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{block instruction} & \def\mathdef2718#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2718{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\mathdef2719#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2719{end} &\equiv& \def\mathdef2720#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2720{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\mathdef2721#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2721{else}~~\def\mathdef2722#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2722{end} \end{array}\]

Parametric Instructions

\[\begin{split}\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|& \def\mathdef2723#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2723{drop} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{drop}} \\ &&|& \def\mathdef2724#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2724{select} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{select}} \\ \end{array}\end{split}\]

Variable Instructions

\[\begin{split}\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|& \def\mathdef2725#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2725{get\_local}~~x{:}\href{../text/modules.html#text-localidx}{\mathtt{localidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{get\_local}}~x \\ &&|& \def\mathdef2726#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2726{set\_local}~~x{:}\href{../text/modules.html#text-localidx}{\mathtt{localidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{set\_local}}~x \\ &&|& \def\mathdef2727#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2727{tee\_local}~~x{:}\href{../text/modules.html#text-localidx}{\mathtt{localidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{tee\_local}}~x \\ &&|& \def\mathdef2728#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2728{get\_global}~~x{:}\href{../text/modules.html#text-globalidx}{\mathtt{globalidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{get\_global}}~x \\ &&|& \def\mathdef2729#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2729{set\_global}~~x{:}\href{../text/modules.html#text-globalidx}{\mathtt{globalidx}}_I &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{set\_global}}~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\mathdef2730#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2730{=}\).

\[\begin{split}\begin{array}{llcllll} \def\mathdef2644#1{{}}\mathdef2644{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\mathdef2644#1{{}}\mathdef2644{memory offset} & \href{../text/instructions.html#text-memarg}{\mathtt{offset}} &::=& \def\mathdef2731#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2731{offset{=}}o{:}\href{../text/values.html#text-int}{\def\mathdef2689#1{{\mathtt{u}#1}}\mathdef2689{\mathtt{32}}} &\Rightarrow& o \\ &&|& \epsilon &\Rightarrow& 0 \\ \def\mathdef2644#1{{}}\mathdef2644{memory alignment} & \href{../text/instructions.html#text-memarg}{\mathtt{align}}_N &::=& \def\mathdef2732#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2732{align{=}}a{:}\href{../text/values.html#text-int}{\def\mathdef2689#1{{\mathtt{u}#1}}\mathdef2689{\mathtt{32}}} &\Rightarrow& a \\ &&|& \epsilon &\Rightarrow& N \\ \def\mathdef2644#1{{}}\mathdef2644{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\ &&|& \def\mathdef2733#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2733{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\mathdef2734#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2734{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\mathdef2735#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2735{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\mathdef2736#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2736{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\mathdef2737#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2737{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\mathdef2738#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2738{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\mathdef2739#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2739{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\mathdef2740#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2740{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\mathdef2741#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2741{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\mathdef2742#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2742{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\mathdef2743#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2743{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\mathdef2744#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2744{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\mathdef2745#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2745{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\mathdef2746#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2746{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\mathdef2747#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2747{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\mathdef2748#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2748{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\mathdef2749#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2749{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\mathdef2750#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2750{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\mathdef2751#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2751{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\mathdef2752#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2752{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\mathdef2753#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2753{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\mathdef2754#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2754{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\mathdef2755#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2755{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\mathdef2756#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2756{current\_memory} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{current\_memory}} \\ &&|& \def\mathdef2757#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2757{grow\_memory} &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{grow\_memory}} \\ \end{array}\end{split}\]

Atomic Memory Instructions

The offset immediate to atomic memory instructions is optional, and defaults to \(\mathtt{0}\).

\[\begin{split}\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \phantom{thisshouldbeenoughnowitissee} && \phantom{thisshouldbeenough} \\ &&|& \def\mathdef2758#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2758{atomic.wake}~~m{:}\href{../text/instructions.html#text-memarg}{\mathtt{memarg}}_4 &\Rightarrow& \href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{atomic.wake}}~m \\ &&|& \def\mathdef2759#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2759{i32.atomic.wait}~~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-atomic-memory}{\mathsf{atomic.wait}}~m \\ &&|& \def\mathdef2760#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2760{i64.atomic.wait}~~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-atomic-memory}{\mathsf{atomic.wait}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2761#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2761{i32.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}~m \\ &&|& \def\mathdef2762#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2762{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}~m \\ &&|& \def\mathdef2763#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2763{i32.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}\mathsf{8\_u}~m \\ &&|& \def\mathdef2764#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2764{i32.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}\mathsf{16\_u}~m \\ &&|& \def\mathdef2765#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2765{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}\mathsf{8\_u}~m \\ &&|& \def\mathdef2766#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2766{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}\mathsf{16\_u}~m \\ &&|& \def\mathdef2767#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2767{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.load}}\mathsf{32\_u}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2768#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2768{i32.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}~m \\ &&|& \def\mathdef2769#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2769{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}~m \\ &&|& \def\mathdef2770#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2770{i32.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}\mathsf{8}~m \\ &&|& \def\mathdef2771#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2771{i32.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}\mathsf{16}~m \\ &&|& \def\mathdef2772#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2772{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}\mathsf{8}~m \\ &&|& \def\mathdef2773#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2773{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}\mathsf{16}~m \\ &&|& \def\mathdef2774#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2774{i64.atomic{.}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-atomic-memory}{\mathsf{atomic.store}}\mathsf{32}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2775#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2775{i32.atomic{.}rmw{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ &&|& \def\mathdef2776#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2776{i64.atomic{.}rmw{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ &&|& \def\mathdef2777#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2777{i32.atomic{.}rmw8\_u{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ &&|& \def\mathdef2778#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2778{i32.atomic{.}rmw16\_u{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ &&|& \def\mathdef2779#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2779{i64.atomic{.}rmw8\_u{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ &&|& \def\mathdef2780#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2780{i64.atomic{.}rmw16\_u{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ &&|& \def\mathdef2781#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2781{i64.atomic{.}rmw32\_u{.}add}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{add}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2782#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2782{i32.atomic{.}rmw{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ &&|& \def\mathdef2783#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2783{i64.atomic{.}rmw{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ &&|& \def\mathdef2784#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2784{i32.atomic{.}rmw8\_u{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ &&|& \def\mathdef2785#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2785{i32.atomic{.}rmw16\_u{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ &&|& \def\mathdef2786#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2786{i64.atomic{.}rmw8\_u{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ &&|& \def\mathdef2787#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2787{i64.atomic{.}rmw16\_u{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ &&|& \def\mathdef2788#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2788{i64.atomic{.}rmw32\_u{.}sub}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{sub}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2789#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2789{i32.atomic{.}rmw{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ &&|& \def\mathdef2790#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2790{i64.atomic{.}rmw{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ &&|& \def\mathdef2791#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2791{i32.atomic{.}rmw8\_u{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ &&|& \def\mathdef2792#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2792{i32.atomic{.}rmw16\_u{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ &&|& \def\mathdef2793#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2793{i64.atomic{.}rmw8\_u{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ &&|& \def\mathdef2794#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2794{i64.atomic{.}rmw16\_u{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ &&|& \def\mathdef2795#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2795{i64.atomic{.}rmw32\_u{.}and}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{and}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2796#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2796{i32.atomic{.}rmw{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ &&|& \def\mathdef2797#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2797{i64.atomic{.}rmw{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ &&|& \def\mathdef2798#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2798{i32.atomic{.}rmw8\_u{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ &&|& \def\mathdef2799#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2799{i32.atomic{.}rmw16\_u{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ &&|& \def\mathdef2800#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2800{i64.atomic{.}rmw8\_u{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ &&|& \def\mathdef2801#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2801{i64.atomic{.}rmw16\_u{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ &&|& \def\mathdef2802#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2802{i64.atomic{.}rmw32\_u{.}or}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{or}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2803#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2803{i32.atomic{.}rmw{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ &&|& \def\mathdef2804#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2804{i64.atomic{.}rmw{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ &&|& \def\mathdef2805#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2805{i32.atomic{.}rmw8\_u{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ &&|& \def\mathdef2806#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2806{i32.atomic{.}rmw16\_u{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ &&|& \def\mathdef2807#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2807{i64.atomic{.}rmw8\_u{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ &&|& \def\mathdef2808#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2808{i64.atomic{.}rmw16\_u{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ &&|& \def\mathdef2809#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2809{i64.atomic{.}rmw32\_u{.}xor}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xor}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2810#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2810{i32.atomic{.}rmw{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ &&|& \def\mathdef2811#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2811{i64.atomic{.}rmw{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ &&|& \def\mathdef2812#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2812{i32.atomic{.}rmw8\_u{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ &&|& \def\mathdef2813#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2813{i32.atomic{.}rmw16\_u{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ &&|& \def\mathdef2814#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2814{i64.atomic{.}rmw8\_u{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ &&|& \def\mathdef2815#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2815{i64.atomic{.}rmw16\_u{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ &&|& \def\mathdef2816#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2816{i64.atomic{.}rmw32\_u{.}xchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{xchg}}~m \\ \end{array}\end{split}\]
\[\begin{split}\begin{array}{llclll} \phantom{\def\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2817#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2817{i32.atomic{.}rmw{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ &&|& \def\mathdef2818#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2818{i64.atomic{.}rmw{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ &&|& \def\mathdef2819#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2819{i32.atomic{.}rmw8\_u{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ &&|& \def\mathdef2820#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2820{i32.atomic{.}rmw16\_u{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ &&|& \def\mathdef2821#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2821{i64.atomic{.}rmw8\_u{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{8\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ &&|& \def\mathdef2822#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2822{i64.atomic{.}rmw16\_u{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{16\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ &&|& \def\mathdef2823#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2823{i64.atomic{.}rmw32\_u{.}cmpxchg}~~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-atomic-memory}{\mathsf{atomic.rmw}}\mathsf{32\_u}.\href{../syntax/instructions.html#syntax-instr-atomic-memory}{\mathsf{cmpxchg}}~m \\ \end{array}\end{split}\]

Numeric Instructions

\[\begin{split}\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{instruction} & \href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I &::=& \dots \\&&|& \def\mathdef2824#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2824{i32.const}~~n{:}\href{../text/values.html#text-int}{\def\mathdef2695#1{{\mathtt{i}#1}}\mathdef2695{\mathtt{32}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n \\ &&|& \def\mathdef2825#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2825{i64.const}~~n{:}\href{../text/values.html#text-int}{\def\mathdef2696#1{{\mathtt{i}#1}}\mathdef2696{\mathtt{64}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n \\ &&|& \def\mathdef2826#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2826{f32.const}~~z{:}\href{../text/values.html#text-float}{\def\mathdef2699#1{{\mathtt{f}#1}}\mathdef2699{\mathtt{32}}} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~z \\ &&|& \def\mathdef2827#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2827{f64.const}~~z{:}\href{../text/values.html#text-float}{\def\mathdef2700#1{{\mathtt{f}#1}}\mathdef2700{\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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2828#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2828{i32.clz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{clz}} \\ &&|& \def\mathdef2829#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2829{i32.ctz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ctz}} \\ &&|& \def\mathdef2830#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2830{i32.popcnt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{popcnt}} \\ &&|& \def\mathdef2831#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2831{i32.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|& \def\mathdef2832#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2832{i32.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|& \def\mathdef2833#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2833{i32.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|& \def\mathdef2834#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2834{i32.div\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_s} \\ &&|& \def\mathdef2835#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2835{i32.div\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_u} \\ &&|& \def\mathdef2836#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2836{i32.rem\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_s} \\ &&|& \def\mathdef2837#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2837{i32.rem\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_u} \\ &&|& \def\mathdef2838#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2838{i32.and} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{and}} \\ &&|& \def\mathdef2839#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2839{i32.or} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{or}} \\ &&|& \def\mathdef2840#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2840{i32.xor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{xor}} \\ &&|& \def\mathdef2841#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2841{i32.shl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shl}} \\ &&|& \def\mathdef2842#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2842{i32.shr\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_s} \\ &&|& \def\mathdef2843#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2843{i32.shr\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_u} \\ &&|& \def\mathdef2844#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2844{i32.rotl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotl}} \\ &&|& \def\mathdef2845#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2845{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2846#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2846{i64.clz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{clz}} \\ &&|& \def\mathdef2847#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2847{i64.ctz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ctz}} \\ &&|& \def\mathdef2848#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2848{i64.popcnt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{popcnt}} \\ &&|& \def\mathdef2849#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2849{i64.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|& \def\mathdef2850#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2850{i64.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|& \def\mathdef2851#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2851{i64.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|& \def\mathdef2852#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2852{i64.div\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_s} \\ &&|& \def\mathdef2853#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2853{i64.div\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}}\mathsf{\_u} \\ &&|& \def\mathdef2854#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2854{i64.rem\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_s} \\ &&|& \def\mathdef2855#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2855{i64.rem\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rem}}\mathsf{\_u} \\ &&|& \def\mathdef2856#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2856{i64.and} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{and}} \\ &&|& \def\mathdef2857#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2857{i64.or} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{or}} \\ &&|& \def\mathdef2858#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2858{i64.xor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{xor}} \\ &&|& \def\mathdef2859#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2859{i64.shl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shl}} \\ &&|& \def\mathdef2860#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2860{i64.shr\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_s} \\ &&|& \def\mathdef2861#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2861{i64.shr\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{shr}}\mathsf{\_u} \\ &&|& \def\mathdef2862#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2862{i64.rotl} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{rotl}} \\ &&|& \def\mathdef2863#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2863{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2864#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2864{f32.abs} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{abs}} \\ &&|& \def\mathdef2865#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2865{f32.neg} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{neg}} \\ &&|& \def\mathdef2866#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2866{f32.ceil} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ceil}} \\ &&|& \def\mathdef2867#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2867{f32.floor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{floor}} \\ &&|& \def\mathdef2868#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2868{f32.trunc} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}} \\ &&|& \def\mathdef2869#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2869{f32.nearest} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{nearest}} \\ &&|& \def\mathdef2870#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2870{f32.sqrt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sqrt}} \\ &&|& \def\mathdef2871#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2871{f32.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|& \def\mathdef2872#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2872{f32.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|& \def\mathdef2873#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2873{f32.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|& \def\mathdef2874#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2874{f32.div} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}} \\ &&|& \def\mathdef2875#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2875{f32.min} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{min}} \\ &&|& \def\mathdef2876#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2876{f32.max} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{max}} \\ &&|& \def\mathdef2877#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2877{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2878#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2878{f64.abs} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{abs}} \\ &&|& \def\mathdef2879#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2879{f64.neg} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{neg}} \\ &&|& \def\mathdef2880#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2880{f64.ceil} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ceil}} \\ &&|& \def\mathdef2881#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2881{f64.floor} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{floor}} \\ &&|& \def\mathdef2882#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2882{f64.trunc} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}} \\ &&|& \def\mathdef2883#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2883{f64.nearest} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{nearest}} \\ &&|& \def\mathdef2884#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2884{f64.sqrt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sqrt}} \\ &&|& \def\mathdef2885#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2885{f64.add} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{add}} \\ &&|& \def\mathdef2886#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2886{f64.sub} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{sub}} \\ &&|& \def\mathdef2887#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2887{f64.mul} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{mul}} \\ &&|& \def\mathdef2888#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2888{f64.div} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{div}} \\ &&|& \def\mathdef2889#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2889{f64.min} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{min}} \\ &&|& \def\mathdef2890#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2890{f64.max} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{max}} \\ &&|& \def\mathdef2891#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2891{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2892#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2892{i32.eqz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eqz}} \\ &&|& \def\mathdef2893#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2893{i32.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|& \def\mathdef2894#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2894{i32.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|& \def\mathdef2895#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2895{i32.lt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_s} \\ &&|& \def\mathdef2896#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2896{i32.lt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_u} \\ &&|& \def\mathdef2897#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2897{i32.gt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_s} \\ &&|& \def\mathdef2898#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2898{i32.gt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_u} \\ &&|& \def\mathdef2899#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2899{i32.le\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_s} \\ &&|& \def\mathdef2900#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2900{i32.le\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_u} \\ &&|& \def\mathdef2901#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2901{i32.ge\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_s} \\ &&|& \def\mathdef2902#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2902{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2903#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2903{i64.eqz} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eqz}} \\ &&|& \def\mathdef2904#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2904{i64.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|& \def\mathdef2905#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2905{i64.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|& \def\mathdef2906#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2906{i64.lt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_s} \\ &&|& \def\mathdef2907#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2907{i64.lt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}}\mathsf{\_u} \\ &&|& \def\mathdef2908#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2908{i64.gt\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_s} \\ &&|& \def\mathdef2909#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2909{i64.gt\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}}\mathsf{\_u} \\ &&|& \def\mathdef2910#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2910{i64.le\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_s} \\ &&|& \def\mathdef2911#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2911{i64.le\_u} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}}\mathsf{\_u} \\ &&|& \def\mathdef2912#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2912{i64.ge\_s} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ge}}\mathsf{\_s} \\ &&|& \def\mathdef2913#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2913{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2914#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2914{f32.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|& \def\mathdef2915#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2915{f32.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|& \def\mathdef2916#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2916{f32.lt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}} \\ &&|& \def\mathdef2917#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2917{f32.gt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}} \\ &&|& \def\mathdef2918#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2918{f32.le} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}} \\ &&|& \def\mathdef2919#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2919{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2920#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2920{f64.eq} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{eq}} \\ &&|& \def\mathdef2921#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2921{f64.ne} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{ne}} \\ &&|& \def\mathdef2922#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2922{f64.lt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{lt}} \\ &&|& \def\mathdef2923#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2923{f64.gt} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{gt}} \\ &&|& \def\mathdef2924#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2924{f64.le} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{le}} \\ &&|& \def\mathdef2925#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2925{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2926#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2926{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\mathdef2927#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2927{i32.trunc\_s/f32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}} \\ &&|& \def\mathdef2928#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2928{i32.trunc\_u/f32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}} \\ &&|& \def\mathdef2929#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2929{i32.trunc\_s/f64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}} \\ &&|& \def\mathdef2930#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2930{i32.trunc\_u/f64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}} \\ &&|& \def\mathdef2931#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2931{i64.extend\_s/i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|& \def\mathdef2932#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2932{i64.extend\_u/i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|& \def\mathdef2933#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2933{i64.trunc\_s/f32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}} \\ &&|& \def\mathdef2934#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2934{i64.trunc\_u/f32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f32}} \\ &&|& \def\mathdef2935#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2935{i64.trunc\_s/f64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}} \\ &&|& \def\mathdef2936#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2936{i64.trunc\_u/f64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{i64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{f64}} \\ &&|& \def\mathdef2937#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2937{f32.convert\_s/i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|& \def\mathdef2938#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2938{f32.convert\_u/i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|& \def\mathdef2939#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2939{f32.convert\_s/i64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}} \\ &&|& \def\mathdef2940#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2940{f32.convert\_u/i64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f32}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}} \\ &&|& \def\mathdef2941#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2941{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\mathdef2942#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2942{f64.convert\_s/i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|& \def\mathdef2943#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2943{f64.convert\_u/i32} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i32}} \\ &&|& \def\mathdef2944#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2944{f64.convert\_s/i64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_s/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}} \\ &&|& \def\mathdef2945#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2945{f64.convert\_u/i64} &\Rightarrow& \href{../syntax/types.html#syntax-valtype}{\mathsf{f64}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{convert}}\mathsf{\_u/}\href{../syntax/types.html#syntax-valtype}{\mathsf{i64}} \\ &&|& \def\mathdef2946#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2946{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\mathdef2947#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2947{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\mathdef2948#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2948{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\mathdef2949#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2949{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\mathdef2950#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2950{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\mathdef2644#1{{}}\mathdef2644{instruction}} & \phantom{\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}_I} &\phantom{::=}& \phantom{thisisenough} && \phantom{thisshouldbeenough} \\[-2ex] &&|& \def\mathdef2951#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2951{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\mathdef2952#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2952{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\mathdef2953#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2953{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\mathdef2954#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2954{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\mathdef2955#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2955{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\mathdef2956#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2956{end}\) delimiter. For \(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{if}}\) instructions, both branches have to wrapped into nested S-expressions, headed by the keywords \(\def\mathdef2957#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2957{then}\) and \(\def\mathdef2958#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2958{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\mathdef2644#1{{}}\mathdef2644{instruction} & \def\mathdef2959#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2959{(}~\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}}~~\href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~\def\mathdef2960#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2960{)} &\equiv\quad \href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~~\href{../text/instructions.html#text-plaininstr}{\mathtt{plaininstr}} \\ & \def\mathdef2961#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2961{(}~\def\mathdef2962#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2962{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\mathdef2963#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2963{)} &\equiv\quad \def\mathdef2964#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2964{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\mathdef2965#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2965{end} \\ & \def\mathdef2966#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2966{(}~\def\mathdef2967#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2967{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\mathdef2968#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2968{)} &\equiv\quad \def\mathdef2969#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2969{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\mathdef2970#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2970{end} \\ & \def\mathdef2971#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2971{(}~\def\mathdef2972#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2972{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\mathdef2973#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2973{(}~\def\mathdef2974#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2974{then}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}_1^\ast~\def\mathdef2975#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2975{)}~~\def\mathdef2976#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2976{(}~\def\mathdef2977#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2977{else}~~\href{../text/instructions.html#text-instr}{\mathtt{instr}}_2^\ast~\def\mathdef2978#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2978{)}^?~~\def\mathdef2979#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2979{)} \quad\equiv \\ &\qquad \href{../text/instructions.html#text-foldedinstr}{\mathtt{foldedinstr}}^\ast~~\def\mathdef2980#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2980{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\mathdef2981#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2981{else}~~(\href{../text/instructions.html#text-instr}{\mathtt{instr}}_2^\ast)^?~\def\mathdef2982#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2982{end} \\ \end{array}\end{split}\]

Note

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\mathdef2983#1{\mbox{‘}\mathtt{#1}\mbox{’}}\mathdef2983{end}\) keyword is included, since they only occur in bracketed positions.

\[\begin{split}\begin{array}{llclll} \def\mathdef2644#1{{}}\mathdef2644{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}\]