diff --git a/document/core/exec/instructions.rst b/document/core/exec/instructions.rst index ab3ef5b0ab..26f845a66e 100644 --- a/document/core/exec/instructions.rst +++ b/document/core/exec/instructions.rst @@ -986,7 +986,7 @@ Memory Instructions a. Let :math:`n` be the integer for which :math:`\bytes_{\iN}(n) = b^\ast`. - b. Let :math:`c` be the result of computing :math:`\extend\F{\_}\sx_{N,|t|}(n)`. + b. Let :math:`c` be the result of computing :math:`\extend^{\sx}_{N,|t|}(n)`. 13. Else: @@ -1009,7 +1009,7 @@ Memory Instructions \\[1ex] \begin{array}{lcl@{\qquad}l} S; F; (\I32.\CONST~i)~(t.\LOAD{N}\K{\_}\sx~\memarg) &\stepto& - S; F; (t.\CONST~\extend\F{\_}\sx_{N,|t|}(n)) + S; F; (t.\CONST~\extend^{\sx}_{N,|t|}(n)) \end{array} \\ \qquad \begin{array}[t]{@{}r@{~}l@{}} diff --git a/test/core/select.wast b/test/core/select.wast index bfa30636c5..b343bf93cb 100644 --- a/test/core/select.wast +++ b/test/core/select.wast @@ -405,6 +405,14 @@ "type mismatch" ) +(assert_invalid + (module (func $type-num-vs-num (select (i32.const 1) (i64.const 1) (i32.const 1)) (drop))) + "type mismatch" +) +(assert_invalid + (module (func $type-num-vs-num (select (i32.const 1) (f32.const 1.0) (i32.const 1)) (drop))) + "type mismatch" +) (assert_invalid (module (func $type-num-vs-num (select (i32.const 1) (i64.const 1) (i32.const 1)) (drop))) "type mismatch"