From 5cb71e59984477530be90e848200d2915dccc11f Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Mon, 24 Jul 2023 07:14:37 +0200 Subject: [PATCH] Sync spec --- document/core/appendix/index-instructions.py | 85 +++++++++++++------- document/core/appendix/index-types.rst | 22 ++--- document/core/binary/instructions.rst | 60 +++++++------- document/core/binary/types.rst | 22 ++--- interpreter/binary/decode.ml | 10 +++ 5 files changed, 116 insertions(+), 83 deletions(-) diff --git a/document/core/appendix/index-instructions.py b/document/core/appendix/index-instructions.py index 8d33768ab..f779a6b66 100755 --- a/document/core/appendix/index-instructions.py +++ b/document/core/appendix/index-instructions.py @@ -320,37 +320,38 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(None, r'\hex{F8}'), Instruction(None, r'\hex{F9}'), Instruction(None, r'\hex{FA}'), - Instruction(r'\STRUCTNEW~x', r'\hex{FB}~\hex{01}', r'[t^\ast] \to [(\REF~x)]', r'valid-struct.new', r'exec-struct.new'), - Instruction(r'\STRUCTNEWDEFAULT~x', r'\hex{FB}~\hex{02}', r'[] \to [(\REF~x)]', r'valid-struct.new_default', r'exec-struct.new_default'), - Instruction(r'\STRUCTGET~x~i', r'\hex{FB}~\hex{03}', r'[(\REF~\NULL~x)] \to [t]', r'valid-struct.get', r'exec-struct.get'), - Instruction(r'\STRUCTGETS~x~i', r'\hex{FB}~\hex{04}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), - Instruction(r'\STRUCTGETU~x~i', r'\hex{FB}~\hex{05}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), - Instruction(r'\STRUCTSET~x~i', r'\hex{FB}~\hex{06}', r'[(\REF~\NULL~x)~t] \to []', r'valid-struct.set', r'exec-struct.set'), - Instruction(r'\ARRAYFILL~x', r'\hex{FB}~\hex{0F}', r'[(\REF~\NULL~x)~\I32~t~\I32] \to []', r'valid-array.fill', r'exec-array.fill'), - Instruction(r'\ARRAYNEW~x', r'\hex{FB}~\hex{11}', r'[t] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'), - Instruction(r'\ARRAYNEWDEFAULT~x', r'\hex{FB}~\hex{12}', r'[] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'), - Instruction(r'\ARRAYGET~x', r'\hex{FB}~\hex{13}', r'[(\REF~\NULL~x)~\I32] \to [t]', r'valid-array.get', r'exec-array.get'), - Instruction(r'\ARRAYGETS~x', r'\hex{FB}~\hex{14}', r'[(\REF~\NULL~x)~\I32] \to [\I32]', r'valid-array.get', r'exec-array.get'), - Instruction(r'\ARRAYGETU~x', r'\hex{FB}~\hex{15}', r'[(\REF~\NULL~x)~\I32] \to [\I32]', r'valid-array.get', r'exec-array.get'), - Instruction(r'\ARRAYSET~x', r'\hex{FB}~\hex{16}', r'[(\REF~\NULL~x)~\I32~t] \to []', r'valid-array.set', r'exec-array.set'), - Instruction(r'\ARRAYLEN', r'\hex{FB}~\hex{17}', r'[\ARRAYREF] \to []', r'valid-array.len', r'exec-array.len'), - Instruction(r'\ARRAYCOPY~x~y', r'\hex{FB}~\hex{18}', r'[(\REF~\NULL~x)~\I32~(\REF~\NULL~y)~\I32~\I32] \to []', r'valid-array.copy', r'exec-array.copy'), - Instruction(r'\ARRAYNEWFIXED~x~n', r'\hex{FB}~\hex{19}', r'[t^n] \to [(\REF~x)]', r'valid-array.new_fixed', r'exec-array.new_fixed'), - Instruction(r'\ARRAYNEWDATA~x~y', r'\hex{FB}~\hex{1B}', r'[\I32~\I32] \to [(\REF~x)]', r'valid-array.new_data', r'exec-array.new_data'), - Instruction(r'\ARRAYNEWELEM~x~y', r'\hex{FB}~\hex{1C}', r'[\I32~\I32] \to [(\REF~x)]', r'valid-array.new_elem', r'exec-array.new_elem'), - Instruction(r'\I31NEW', r'\hex{FB}~\hex{20}', r'[\I32] \to [\I31REF]', r'valid-i31.new', r'exec-i31.new'), - Instruction(r'\I31GETS', r'\hex{FB}~\hex{21}', r'[\I31REF] \to [\I32]', r'valid-i31.get_sx', r'exec-i31.get_sx'), - Instruction(r'\I31GETU', r'\hex{FB}~\hex{22}', r'[\I31REF] \to [\I32]', r'valid-i31.get_sx', r'exec-i31.get_sx'), - Instruction(r'\REFTEST~(\REF~t)', r'\hex{FB}~\hex{40}', r"[(\REF~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'), - Instruction(r'\REFCAST~(\REF~t)', r'\hex{FB}~\hex{41}', r"[(\REF~t')] \to [(\REF~t)]", r'valid-ref.test', r'exec-ref.test'), - Instruction(r'\REFTEST~(\REF~\NULL~t)', r'\hex{FB}~\hex{48}', r"[(REF~\NULL~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'), - Instruction(r'\REFCAST~(\REF~\NULL~t)', r'\hex{FB}~\hex{49}', r"[(\REF~\NULL~t')] \to [(\REF~\NULL~t)]", r'valid-ref.cast', r'exec-ref.cast'), - Instruction(r'\BRONCAST~t_1~t_2', r'\hex{FB}~\hex{4E}', r'[t_1] \to [t_1\reftypediff t_2]', r'valid-br_on_cast', r'exec-br_on_cast'), - Instruction(r'\BRONCASTFAIL~t_1~t_2', r'\hex{FB}~\hex{4F}', r'[t_1] \to [t_2]', r'valid-br_on_cast_fail', r'exec-br_on_cast_fail'), - Instruction(r'\ARRAYINITDATA~x~y', r'\hex{FB}~\hex{54}', r'[(\REF~\NULL~x)~\I32~\I32~\I32] \to []', r'valid-array.init_data', r'exec-array.init_data'), - Instruction(r'\ARRAYINITELEM~x~y', r'\hex{FB}~\hex{55}', r'[(\REF~\NULL~x)~\I32~\I32~\I32] \to []', r'valid-array.init_elem', r'exec-array.init_elem'), - Instruction(r'\EXTERNINTERNALIZE', r'\hex{FB}~\hex{70}', r'[\EXTERNREF] \to [\ANYREF]', r'valid-extern.internalize', r'exec-extern.internalize'), - Instruction(r'\EXTERNEXTERNALIZE', r'\hex{FB}~\hex{71}', r'[\ANYREF] \to [\EXTERNREF]', r'valid-extern.externalize', r'exec-extern.externalize'), + Instruction(r'\STRUCTNEW~x', r'\hex{FB}~\hex{00}', r'[t^\ast] \to [(\REF~x)]', r'valid-struct.new', r'exec-struct.new'), + Instruction(r'\STRUCTNEWDEFAULT~x', r'\hex{FB}~\hex{01}', r'[] \to [(\REF~x)]', r'valid-struct.new_default', r'exec-struct.new_default'), + Instruction(r'\STRUCTGET~x~i', r'\hex{FB}~\hex{02}', r'[(\REF~\NULL~x)] \to [t]', r'valid-struct.get', r'exec-struct.get'), + Instruction(r'\STRUCTGETS~x~i', r'\hex{FB}~\hex{03}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), + Instruction(r'\STRUCTGETU~x~i', r'\hex{FB}~\hex{04}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), + Instruction(r'\STRUCTSET~x~i', r'\hex{FB}~\hex{05}', r'[(\REF~\NULL~x)~t] \to []', r'valid-struct.set', r'exec-struct.set'), + Instruction(r'\ARRAYNEW~x', r'\hex{FB}~\hex{06}', r'[t] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'), + Instruction(r'\ARRAYNEWDEFAULT~x', r'\hex{FB}~\hex{07}', r'[] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'), + Instruction(r'\ARRAYNEWFIXED~x~n', r'\hex{FB}~\hex{08}', r'[t^n] \to [(\REF~x)]', r'valid-array.new_fixed', r'exec-array.new_fixed'), + Instruction(r'\ARRAYNEWDATA~x~y', r'\hex{FB}~\hex{09}', r'[\I32~\I32] \to [(\REF~x)]', r'valid-array.new_data', r'exec-array.new_data'), + Instruction(r'\ARRAYNEWELEM~x~y', r'\hex{FB}~\hex{0A}', r'[\I32~\I32] \to [(\REF~x)]', r'valid-array.new_elem', r'exec-array.new_elem'), + Instruction(r'\ARRAYGET~x', r'\hex{FB}~\hex{0B}', r'[(\REF~\NULL~x)~\I32] \to [t]', r'valid-array.get', r'exec-array.get'), + Instruction(r'\ARRAYGETS~x', r'\hex{FB}~\hex{0C}', r'[(\REF~\NULL~x)~\I32] \to [\I32]', r'valid-array.get', r'exec-array.get'), + Instruction(r'\ARRAYGETU~x', r'\hex{FB}~\hex{0D}', r'[(\REF~\NULL~x)~\I32] \to [\I32]', r'valid-array.get', r'exec-array.get'), + Instruction(r'\ARRAYSET~x', r'\hex{FB}~\hex{0E}', r'[(\REF~\NULL~x)~\I32~t] \to []', r'valid-array.set', r'exec-array.set'), + Instruction(r'\ARRAYLEN', r'\hex{FB}~\hex{0F}', r'[\ARRAYREF] \to []', r'valid-array.len', r'exec-array.len'), + Instruction(r'\ARRAYFILL~x', r'\hex{FB}~\hex{10}', r'[(\REF~\NULL~x)~\I32~t~\I32] \to []', r'valid-array.fill', r'exec-array.fill'), + Instruction(r'\ARRAYCOPY~x~y', r'\hex{FB}~\hex{11}', r'[(\REF~\NULL~x)~\I32~(\REF~\NULL~y)~\I32~\I32] \to []', r'valid-array.copy', r'exec-array.copy'), + Instruction(r'\ARRAYINITDATA~x~y', r'\hex{FB}~\hex{12}', r'[(\REF~\NULL~x)~\I32~\I32~\I32] \to []', r'valid-array.init_data', r'exec-array.init_data'), + Instruction(r'\ARRAYINITELEM~x~y', r'\hex{FB}~\hex{13}', r'[(\REF~\NULL~x)~\I32~\I32~\I32] \to []', r'valid-array.init_elem', r'exec-array.init_elem'), + Instruction(r'\REFTEST~(\REF~t)', r'\hex{FB}~\hex{14}', r"[(\REF~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'), + Instruction(r'\REFTEST~(\REF~\NULL~t)', r'\hex{FB}~\hex{15}', r"[(REF~\NULL~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'), + Instruction(r'\REFCAST~(\REF~t)', r'\hex{FB}~\hex{16}', r"[(\REF~t')] \to [(\REF~t)]", r'valid-ref.test', r'exec-ref.test'), + Instruction(r'\REFCAST~(\REF~\NULL~t)', r'\hex{FB}~\hex{17}', r"[(\REF~\NULL~t')] \to [(\REF~\NULL~t)]", r'valid-ref.cast', r'exec-ref.cast'), + Instruction(r'\BRONCAST~t_1~t_2', r'\hex{FB}~\hex{18}', r'[t_1] \to [t_1\reftypediff t_2]', r'valid-br_on_cast', r'exec-br_on_cast'), + Instruction(r'\BRONCASTFAIL~t_1~t_2', r'\hex{FB}~\hex{19}', r'[t_1] \to [t_2]', r'valid-br_on_cast_fail', r'exec-br_on_cast_fail'), + Instruction(r'\EXTERNINTERNALIZE', r'\hex{FB}~\hex{1A}', r'[\EXTERNREF] \to [\ANYREF]', r'valid-extern.internalize', r'exec-extern.internalize'), + Instruction(r'\EXTERNEXTERNALIZE', r'\hex{FB}~\hex{1B}', r'[\ANYREF] \to [\EXTERNREF]', r'valid-extern.externalize', r'exec-extern.externalize'), + Instruction(r'\I31NEW', r'\hex{FB}~\hex{1C}', r'[\I32] \to [\I31REF]', r'valid-i31.new', r'exec-i31.new'), + Instruction(r'\I31GETS', r'\hex{FB}~\hex{1D}', r'[\I31REF] \to [\I32]', r'valid-i31.get_sx', r'exec-i31.get_sx'), + Instruction(r'\I31GETU', r'\hex{FB}~\hex{1E}', r'[\I31REF] \to [\I32]', r'valid-i31.get_sx', r'exec-i31.get_sx'), + Instruction(None, r'\hex{FB}~\hex{1E} \dots'), Instruction(r'\I32.\TRUNC\K{\_sat\_}\F32\K{\_s}', r'\hex{FC}~\hex{00}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_s'), Instruction(r'\I32.\TRUNC\K{\_sat\_}\F32\K{\_u}', r'\hex{FC}~\hex{01}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_u'), Instruction(r'\I32.\TRUNC\K{\_sat\_}\F64\K{\_s}', r'\hex{FC}~\hex{02}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_s'), @@ -369,6 +370,7 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\TABLEGROW~x', r'\hex{FC}~\hex{0F}', r'[t~\I32] \to [\I32]', r'valid-table.grow', r'exec-table.grow'), Instruction(r'\TABLESIZE~x', r'\hex{FC}~\hex{10}', r'[] \to [\I32]', r'valid-table.size', r'exec-table.size'), Instruction(r'\TABLEFILL~x', r'\hex{FC}~\hex{11}', r'[\I32~t~\I32] \to []', r'valid-table.fill', r'exec-table.fill'), + Instruction(None, r'\hex{FC}~\hex{1E} \dots'), Instruction(r'\V128.\LOAD~\memarg', r'\hex{FD}~~\hex{00}', r'[\I32] \to [\V128]', r'valid-load', r'exec-load'), Instruction(r'\V128.\LOAD\K{8x8\_s}~\memarg', r'\hex{FD}~~\hex{01}', r'[\I32] \to [\V128]', r'valid-load-extend', r'exec-load-extend'), Instruction(r'\V128.\LOAD\K{8x8\_u}~\memarg', r'\hex{FD}~~\hex{02}', r'[\I32] \to [\V128]', r'valid-load-extend', r'exec-load-extend'), @@ -523,6 +525,7 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I16X8.\VMIN\K{\_u}', r'\hex{FD}~~\hex{97}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin_u'), Instruction(r'\I16X8.\VMAX\K{\_s}', r'\hex{FD}~~\hex{98}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax_s'), Instruction(r'\I16X8.\VMAX\K{\_u}', r'\hex{FD}~~\hex{99}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax_u'), + Instruction(None, r'\hex{FD}~\hex{9A}~\hex{01}'), Instruction(r'\I16X8.\AVGR\K{\_u}', r'\hex{FD}~~\hex{9B}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iavgr_u'), Instruction(r'\I16X8.\EXTMUL\K{\_low\_i8x16\_s}', r'\hex{FD}~~\hex{9C}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vec-extmul', r'exec-vec-extmul'), Instruction(r'\I16X8.\EXTMUL\K{\_high\_i8x16\_s}', r'\hex{FD}~~\hex{9D}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vec-extmul', r'exec-vec-extmul'), @@ -530,8 +533,11 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I16X8.\EXTMUL\K{\_high\_i8x16\_u}', r'\hex{FD}~~\hex{9F}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vec-extmul', r'exec-vec-extmul'), Instruction(r'\I32X4.\VABS', r'\hex{FD}~~\hex{A0}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), Instruction(r'\I32X4.\VNEG', r'\hex{FD}~~\hex{A1}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), + Instruction(None, r'\hex{FD}~\hex{A2}~\hex{01}'), Instruction(r'\I32X4.\ALLTRUE', r'\hex{FD}~~\hex{A3}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), Instruction(r'\I32X4.\BITMASK', r'\hex{FD}~~\hex{A4}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vec-bitmask', r'exec-vec-bitmask'), + Instruction(None, r'\hex{FD}~\hex{A5}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{A6}~\hex{01}'), Instruction(r'\I32X4.\VEXTEND\K{\_low\_i16x8\_s}', r'\hex{FD}~~\hex{A7}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), Instruction(r'\I32X4.\VEXTEND\K{\_high\_i16x8\_s}', r'\hex{FD}~~\hex{A8}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), Instruction(r'\I32X4.\VEXTEND\K{\_low\_i16x8\_u}', r'\hex{FD}~~\hex{A9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), @@ -540,7 +546,12 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I32X4.\VSHR\K{\_s}', r'\hex{FD}~~\hex{AC}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vishiftop', r'exec-vishiftop', r'op-ishr_s'), Instruction(r'\I32X4.\VSHR\K{\_u}', r'\hex{FD}~~\hex{AD}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vishiftop', r'exec-vishiftop', r'op-ishr_u'), Instruction(r'\I32X4.\VADD', r'\hex{FD}~~\hex{AE}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd'), + Instruction(None, r'\hex{FD}~\hex{AF}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{B0}~\hex{01}'), Instruction(r'\I32X4.\VSUB', r'\hex{FD}~~\hex{B1}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub'), + Instruction(None, r'\hex{FD}~\hex{B2}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{B3}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{B4}~\hex{01}'), Instruction(r'\I32X4.\VMUL', r'\hex{FD}~~\hex{B5}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imul'), Instruction(r'\I32X4.\VMIN\K{\_s}', r'\hex{FD}~~\hex{B6}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin_s'), Instruction(r'\I32X4.\VMIN\K{\_u}', r'\hex{FD}~~\hex{B7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin_u'), @@ -553,8 +564,11 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I32X4.\EXTMUL\K{\_high\_i16x8\_u}', r'\hex{FD}~~\hex{BF}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vec-extmul', r'exec-vec-extmul'), Instruction(r'\I64X2.\VABS', r'\hex{FD}~~\hex{C0}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), Instruction(r'\I64X2.\VNEG', r'\hex{FD}~~\hex{C1}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), + Instruction(None, r'\hex{FD}~\hex{C2}~\hex{01}'), Instruction(r'\I64X2.\ALLTRUE', r'\hex{FD}~~\hex{C3}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), Instruction(r'\I64X2.\BITMASK', r'\hex{FD}~~\hex{C4}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vec-bitmask', r'exec-vec-bitmask'), + Instruction(None, r'\hex{FD}~\hex{C5}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{C6}~\hex{01}'), Instruction(r'\I64X2.\VEXTEND\K{\_low\_i32x4\_s}', r'\hex{FD}~~\hex{C7}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), Instruction(r'\I64X2.\VEXTEND\K{\_high\_i32x4\_s}', r'\hex{FD}~~\hex{C8}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), Instruction(r'\I64X2.\VEXTEND\K{\_low\_i32x4\_u}', r'\hex{FD}~~\hex{C9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), @@ -563,7 +577,12 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I64X2.\VSHR\K{\_s}', r'\hex{FD}~~\hex{CC}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vishiftop', r'exec-vishiftop', r'op-ishr_s'), Instruction(r'\I64X2.\VSHR\K{\_u}', r'\hex{FD}~~\hex{CD}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vishiftop', r'exec-vishiftop', r'op-ishr_u'), Instruction(r'\I64X2.\VADD', r'\hex{FD}~~\hex{CE}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd'), + Instruction(None, r'\hex{FD}~\hex{CF}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{D0}~\hex{01}'), Instruction(r'\I64X2.\VSUB', r'\hex{FD}~~\hex{D1}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub'), + Instruction(None, r'\hex{FD}~\hex{D2}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{D3}~\hex{01}'), + Instruction(None, r'\hex{FD}~\hex{D4}~\hex{01}'), Instruction(r'\I64X2.\VMUL', r'\hex{FD}~~\hex{D5}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imul'), Instruction(r'\I64X2.\VEQ', r'\hex{FD}~~\hex{D6}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ieq'), Instruction(r'\I64X2.\VNE', r'\hex{FD}~~\hex{D7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ine'), @@ -577,6 +596,7 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I64X2.\EXTMUL\K{\_high\_i32x4\_u}', r'\hex{FD}~~\hex{DF}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vec-extmul', r'exec-vec-extmul'), Instruction(r'\F32X4.\VABS', r'\hex{FD}~~\hex{E0}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fabs'), Instruction(r'\F32X4.\VNEG', r'\hex{FD}~~\hex{E1}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fneg'), + Instruction(None, r'\hex{FD}~\hex{E2}~\hex{01}'), Instruction(r'\F32X4.\VSQRT', r'\hex{FD}~~\hex{E3}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fsqrt'), Instruction(r'\F32X4.\VADD', r'\hex{FD}~~\hex{E4}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fadd'), Instruction(r'\F32X4.\VSUB', r'\hex{FD}~~\hex{E5}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fsub'), @@ -605,6 +625,9 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat Instruction(r'\I32X4.\VTRUNC\K{\_sat\_f64x2\_u\_zero}', r'\hex{FD}~~\hex{FD}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat_u'), Instruction(r'\F64X2.\VCONVERT\K{\_low\_i32x4\_s}', r'\hex{FD}~~\hex{FE}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert_s'), Instruction(r'\F64X2.\VCONVERT\K{\_low\_i32x4\_u}', r'\hex{FD}~~\hex{FF}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert_u'), + Instruction(None, r'\hex{FD}~\hex{00}~\hex{02} \dots'), + Instruction(None, r'\hex{FE}'), + Instruction(None, r'\hex{FF}'), ] diff --git a/document/core/appendix/index-types.rst b/document/core/appendix/index-types.rst index 2e6282113..3e30ef352 100644 --- a/document/core/appendix/index-types.rst +++ b/document/core/appendix/index-types.rst @@ -15,27 +15,27 @@ Category Constructor :ref:`Vector type ` |V128| :math:`\hex{7B}` (-5 as |Bs7|) :ref:`Packed type ` |I8| :math:`\hex{7A}` (-6 as |Bs7|) :ref:`Packed type ` |I16| :math:`\hex{79}` (-7 as |Bs7|) -(reserved) :math:`\hex{78}` .. :math:`\hex{71}` +(reserved) :math:`\hex{78}` .. :math:`\hex{74}` +:ref:`Heap type ` |NOFUNC| :math:`\hex{73}` (-13 as |Bs7|) +:ref:`Heap type ` |NOEXTERN| :math:`\hex{72}` (-14 as |Bs7|) +:ref:`Heap type ` |NONE| :math:`\hex{71}` (-15 as |Bs7|) :ref:`Heap type ` |FUNC| :math:`\hex{70}` (-16 as |Bs7|) :ref:`Heap type ` |EXTERN| :math:`\hex{6F}` (-17 as |Bs7|) :ref:`Heap type ` |ANY| :math:`\hex{6E}` (-18 as |Bs7|) :ref:`Heap type ` |EQT| :math:`\hex{6D}` (-19 as |Bs7|) -:ref:`Reference type ` |REF| |NULL| :math:`\hex{6C}` (-20 as |Bs7|) -:ref:`Reference type ` |REF| :math:`\hex{6B}` (-21 as |Bs7|) -:ref:`Heap type ` |I31| :math:`\hex{6A}` (-22 as |Bs7|) -:ref:`Heap type ` |NOFUNC| :math:`\hex{69}` (-23 as |Bs7|) -:ref:`Heap type ` |NOEXTERN| :math:`\hex{68}` (-24 as |Bs7|) -:ref:`Heap type ` |STRUCT| :math:`\hex{67}` (-25 as |Bs7|) -:ref:`Heap type ` |ARRAY| :math:`\hex{66}` (-26 as |Bs7|) -:ref:`Heap type ` |NONE| :math:`\hex{65}` (-27 as |Bs7|) +:ref:`Heap type ` |I31| :math:`\hex{6C}` (-20 as |Bs7|) +:ref:`Heap type ` |STRUCT| :math:`\hex{6B}` (-21 as |Bs7|) +:ref:`Heap type ` |ARRAY| :math:`\hex{6A}` (-22 as |Bs7|) +:ref:`Reference type ` |REF| :math:`\hex{64}` (-28 as |Bs7|) +:ref:`Reference type ` |REF| |NULL| :math:`\hex{63}` (-29 as |Bs7|) (reserved) :math:`\hex{64}` .. :math:`\hex{61}` :ref:`Compound type ` :math:`\TFUNC~[\valtype^\ast] \toF[\valtype^\ast]` :math:`\hex{60}` (-32 as |Bs7|) :ref:`Compound type ` :math:`\TSTRUCT~\fieldtype^\ast` :math:`\hex{5F}` (-33 as |Bs7|) :ref:`Compound type ` :math:`\TARRAY~\fieldtype` :math:`\hex{5E}` (-34 as |Bs7|) (reserved) :math:`\hex{5D}` .. :math:`\hex{51}` :ref:`Sub type ` :math:`\TSUB~\typeidx^\ast~\comptype` :math:`\hex{50}` (-48 as |Bs7|) -:ref:`Recursive type ` :math:`\TREC~\subtype^\ast` :math:`\hex{4F}` (-49 as |Bs7|) -:ref:`Sub type ` :math:`\TSUB~\TFINAL~\typeidx^\ast~\comptype` :math:`\hex{4E}` (-50 as |Bs7|) +:ref:`Sub type ` :math:`\TSUB~\TFINAL~\typeidx^\ast~\comptype` :math:`\hex{4F}` (-49 as |Bs7|) +:ref:`Recursive type ` :math:`\TREC~\subtype^\ast` :math:`\hex{4E}` (-50 as |Bs7|) (reserved) :math:`\hex{4D}` .. :math:`\hex{41}` :ref:`Result type ` :math:`[\epsilon]` :math:`\hex{40}` (-64 as |Bs7|) :ref:`Table type ` :math:`\limits~\reftype` (none) diff --git a/document/core/binary/instructions.rst b/document/core/binary/instructions.rst index 4e69cdbcb..a23c02cf0 100644 --- a/document/core/binary/instructions.rst +++ b/document/core/binary/instructions.rst @@ -77,8 +77,8 @@ Control Instructions \hex{15}~~x{:}\Btypeidx &\Rightarrow& \RETURNCALLREF~x \\ &&|& \hex{D4}~~l{:}\Blabelidx &\Rightarrow& \BRONNULL~l \\ &&|& \hex{D6}~~l{:}\Blabelidx &\Rightarrow& \BRONNONNULL~l \\ &&|& - \hex{FB}~~78{:}\Bu32~~(\NULL_1^?,\NULL_2^?){:}\Bcastflags\\&&&~~~~l{:}\Blabelidx~~\X{ht}_1{:}\Bheaptype~~\X{ht}_2{:}\Bheaptype &\Rightarrow& \BRONCAST~l~(\REF~\NULL_1^?~\X{ht}_1)~(\REF~\NULL_2^?~\X{ht}_2) \\ &&|& - \hex{FB}~~79{:}\Bu32~~(\NULL_1^?,\NULL_2^?){:}\Bcastflags\\&&&~~~~l{:}\Blabelidx~~\X{ht}_1{:}\Bheaptype~~\X{ht}_2{:}\Bheaptype &\Rightarrow& \BRONCASTFAIL~l~(\REF~\NULL_1^?~\X{ht}_1)~(\REF~\NULL_2^?~\X{ht}_2) \\ + \hex{FB}~~24{:}\Bu32~~(\NULL_1^?,\NULL_2^?){:}\Bcastflags\\&&&~~~~l{:}\Blabelidx~~\X{ht}_1{:}\Bheaptype~~\X{ht}_2{:}\Bheaptype &\Rightarrow& \BRONCAST~l~(\REF~\NULL_1^?~\X{ht}_1)~(\REF~\NULL_2^?~\X{ht}_2) \\ &&|& + \hex{FB}~~25{:}\Bu32~~(\NULL_1^?,\NULL_2^?){:}\Bcastflags\\&&&~~~~l{:}\Blabelidx~~\X{ht}_1{:}\Bheaptype~~\X{ht}_2{:}\Bheaptype &\Rightarrow& \BRONCASTFAIL~l~(\REF~\NULL_1^?~\X{ht}_1)~(\REF~\NULL_2^?~\X{ht}_2) \\ \production{cast flags} & \Bcastflags &::=& 0{:}\Bu8 &\Rightarrow& (\epsilon, \epsilon) \\ &&|& 1{:}\Bu8 &\Rightarrow& (\NULL, \epsilon) \\ &&|& @@ -142,35 +142,35 @@ Generic :ref:`reference instructions ` are represented by sing \hex{D2}~~x{:}\Bfuncidx &\Rightarrow& \REFFUNC~x \\ &&|& \hex{D3} &\Rightarrow& \REFASNONNULL \\ &&|& \hex{D5} &\Rightarrow& \REFEQ \\ &&|& - \hex{FB}~~1{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \STRUCTNEW~x \\ &&|& - \hex{FB}~~2{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \STRUCTNEWDEFAULT~x \\ &&|& - \hex{FB}~~3{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTGET~x~i \\ &&|& - \hex{FB}~~4{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTGETS~x~i \\ &&|& - \hex{FB}~~5{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTGETU~x~i \\ &&|& - \hex{FB}~~6{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTSET~x~i \\ &&|& + \hex{FB}~~0{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \STRUCTNEW~x \\ &&|& + \hex{FB}~~1{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \STRUCTNEWDEFAULT~x \\ &&|& + \hex{FB}~~2{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTGET~x~i \\ &&|& + \hex{FB}~~3{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTGETS~x~i \\ &&|& + \hex{FB}~~4{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTGETU~x~i \\ &&|& + \hex{FB}~~5{:}\Bu32~~x{:}\Btypeidx~~i{:}\Bu32 &\Rightarrow& \STRUCTSET~x~i \\ &&|& + \hex{FB}~~6{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYNEW~x \\ &&|& + \hex{FB}~~7{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYNEWDEFAULT~x \\ &&|& + \hex{FB}~~8{:}\Bu32~~x{:}\Btypeidx~~n{:}\Bu32 &\Rightarrow& \ARRAYNEWFIXED~x~n \\ &&|& + \hex{FB}~~9{:}\Bu32~~x{:}\Btypeidx~~y{:}\Bdataidx &\Rightarrow& \ARRAYNEWDATA~x~y \\ &&|& + \hex{FB}~~10{:}\Bu32~~x{:}\Btypeidx~~y{:}\Belemidx &\Rightarrow& \ARRAYNEWELEM~x~y \\ &&|& + \hex{FB}~~11{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYGET~x \\ &&|& + \hex{FB}~~12{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYGETS~x \\ &&|& + \hex{FB}~~13{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYGETU~x \\ &&|& + \hex{FB}~~14{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYSET~x \\ &&|& + \hex{FB}~~15{:}\Bu32 &\Rightarrow& \ARRAYLEN \\ &&|& \hex{FB}~~16{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYFILL~x \\ &&|& - \hex{FB}~~17{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYNEW~x \\ &&|& - \hex{FB}~~18{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYNEWDEFAULT~x \\ &&|& - \hex{FB}~~19{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYGET~x \\ &&|& - \hex{FB}~~20{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYGETS~x \\ &&|& - \hex{FB}~~21{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYGETU~x \\ &&|& - \hex{FB}~~22{:}\Bu32~~x{:}\Btypeidx &\Rightarrow& \ARRAYSET~x \\ &&|& - \hex{FB}~~23{:}\Bu32 &\Rightarrow& \ARRAYLEN \\ &&|& - \hex{FB}~~24{:}\Bu32~~x{:}\Btypeidx~~y{:}\Btypeidx &\Rightarrow& \ARRAYCOPY~x~y \\ &&|& - \hex{FB}~~25{:}\Bu32~~x{:}\Btypeidx~~n{:}\Bu32 &\Rightarrow& \ARRAYNEWFIXED~x~n \\ &&|& - \hex{FB}~~27{:}\Bu32~~x{:}\Btypeidx~~y{:}\Bdataidx &\Rightarrow& \ARRAYNEWDATA~x~y \\ &&|& - \hex{FB}~~28{:}\Bu32~~x{:}\Btypeidx~~y{:}\Belemidx &\Rightarrow& \ARRAYNEWELEM~x~y \\ &&|& - \hex{FB}~~32{:}\Bu32 &\Rightarrow& \I31NEW \\ &&|& - \hex{FB}~~33{:}\Bu32 &\Rightarrow& \I31GETS \\ &&|& - \hex{FB}~~34{:}\Bu32 &\Rightarrow& \I31GETU \\ &&|& - \hex{FB}~~64{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFTEST~(\REF~\X{ht}) \\ &&|& - \hex{FB}~~65{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFCAST~(\REF~\X{ht}) \\ &&|& - \hex{FB}~~72{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFTEST~(\REF~\NULL~\X{ht}) \\ &&|& - \hex{FB}~~73{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFCAST~(\REF~\NULL~\X{ht}) \\ &&|& - \hex{FB}~~84{:}\Bu32~~x{:}\Btypeidx~~y{:}\Bdataidx &\Rightarrow& \ARRAYINITDATA~x~y \\ &&|& - \hex{FB}~~85{:}\Bu32~~x{:}\Btypeidx~~y{:}\Belemidx &\Rightarrow& \ARRAYINITELEM~x~y \\ &&|& - \hex{FB}~~112{:}\Bu32 &\Rightarrow& \EXTERNINTERNALIZE \\ &&|& - \hex{FB}~~113{:}\Bu32 &\Rightarrow& \EXTERNEXTERNALIZE \\ + \hex{FB}~~17{:}\Bu32~~x{:}\Btypeidx~~y{:}\Btypeidx &\Rightarrow& \ARRAYCOPY~x~y \\ &&|& + \hex{FB}~~18{:}\Bu32~~x{:}\Btypeidx~~y{:}\Bdataidx &\Rightarrow& \ARRAYINITDATA~x~y \\ &&|& + \hex{FB}~~19{:}\Bu32~~x{:}\Btypeidx~~y{:}\Belemidx &\Rightarrow& \ARRAYINITELEM~x~y \\ &&|& + \hex{FB}~~20{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFTEST~(\REF~\X{ht}) \\ &&|& + \hex{FB}~~21{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFTEST~(\REF~\NULL~\X{ht}) \\ &&|& + \hex{FB}~~22{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFCAST~(\REF~\X{ht}) \\ &&|& + \hex{FB}~~23{:}\Bu32~~\X{ht}{:}\Bheaptype &\Rightarrow& \REFCAST~(\REF~\NULL~\X{ht}) \\ &&|& + \hex{FB}~~26{:}\Bu32 &\Rightarrow& \EXTERNINTERNALIZE \\ &&|& + \hex{FB}~~27{:}\Bu32 &\Rightarrow& \EXTERNEXTERNALIZE \\ &&|& + \hex{FB}~~28{:}\Bu32 &\Rightarrow& \I31NEW \\ &&|& + \hex{FB}~~29{:}\Bu32 &\Rightarrow& \I31GETS \\ &&|& + \hex{FB}~~30{:}\Bu32 &\Rightarrow& \I31GETU \\ \end{array} diff --git a/document/core/binary/types.rst b/document/core/binary/types.rst index 3214f6b66..bd2940368 100644 --- a/document/core/binary/types.rst +++ b/document/core/binary/types.rst @@ -58,16 +58,16 @@ Heap Types .. math:: \begin{array}{llclll@{\qquad\qquad}l} \production{abstract heap type} & \Babsheaptype &::=& - \hex{65} &\Rightarrow& \NONE \\ &&|& - \hex{66} &\Rightarrow& \ARRAY \\ &&|& - \hex{67} &\Rightarrow& \STRUCT \\ &&|& - \hex{68} &\Rightarrow& \NOEXTERN \\ &&|& - \hex{69} &\Rightarrow& \NOFUNC \\ &&|& - \hex{6A} &\Rightarrow& \I31 \\ &&|& - \hex{6D} &\Rightarrow& \EQT \\ &&|& - \hex{6E} &\Rightarrow& \ANY \\ &&|& + \hex{73} &\Rightarrow& \NOFUNC \\ &&|& + \hex{72} &\Rightarrow& \NOEXTERN \\ &&|& + \hex{71} &\Rightarrow& \NONE \\ &&|& + \hex{70} &\Rightarrow& \FUNC \\ &&|& \hex{6F} &\Rightarrow& \EXTERN \\ &&|& - \hex{70} &\Rightarrow& \FUNC \\ + \hex{6E} &\Rightarrow& \ANY \\ &&|& + \hex{6D} &\Rightarrow& \EQT \\ &&|& + \hex{6C} &\Rightarrow& \I31 \\ &&|& + \hex{6B} &\Rightarrow& \STRUCT \\ &&|& + \hex{6A} &\Rightarrow& \ARRAY \\ \production{heap type} & \Bheaptype &::=& \X{ht}{:}\Babsheaptype &\Rightarrow& \X{ht} \\ &&|& x{:}\Bs33 &\Rightarrow& x & (\iff x \geq 0) \\ @@ -86,8 +86,8 @@ Reference Types .. math:: \begin{array}{llclll@{\qquad\qquad}l} \production{reference type} & \Breftype &::=& - \hex{6B}~~\X{ht}{:}\Bheaptype &\Rightarrow& \REF~\X{ht} \\ &&|& - \hex{6C}~~\X{ht}{:}\Bheaptype &\Rightarrow& \REF~\NULL~\X{ht} \\ &&|& + \hex{64}~~\X{ht}{:}\Bheaptype &\Rightarrow& \REF~\X{ht} \\ &&|& + \hex{63}~~\X{ht}{:}\Bheaptype &\Rightarrow& \REF~\NULL~\X{ht} \\ &&|& \X{ht}{:}\Babsheaptype &\Rightarrow& \REF~\NULL~\X{ht} \\ \end{array} diff --git a/interpreter/binary/decode.ml b/interpreter/binary/decode.ml index e9958ef49..cbff7fb2b 100644 --- a/interpreter/binary/decode.ml +++ b/interpreter/binary/decode.ml @@ -846,6 +846,7 @@ let rec instr s = | 0x97l -> i16x8_min_u | 0x98l -> i16x8_max_s | 0x99l -> i16x8_max_u + | 0x9al as n -> illegal s pos (I32.to_int_u n) | 0x9bl -> i16x8_avgr_u | 0x9cl -> i16x8_extmul_low_i8x16_s | 0x9dl -> i16x8_extmul_high_i8x16_s @@ -853,8 +854,10 @@ let rec instr s = | 0x9fl -> i16x8_extmul_high_i8x16_u | 0xa0l -> i32x4_abs | 0xa1l -> i32x4_neg + | 0xa2l as n -> illegal s pos (I32.to_int_u n) | 0xa3l -> i32x4_all_true | 0xa4l -> i32x4_bitmask + | 0xa5l | 0xa6l as n -> illegal s pos (I32.to_int_u n) | 0xa7l -> i32x4_extend_low_i16x8_s | 0xa8l -> i32x4_extend_high_i16x8_s | 0xa9l -> i32x4_extend_low_i16x8_u @@ -863,7 +866,9 @@ let rec instr s = | 0xacl -> i32x4_shr_s | 0xadl -> i32x4_shr_u | 0xael -> i32x4_add + | 0xafl | 0xb0l as n -> illegal s pos (I32.to_int_u n) | 0xb1l -> i32x4_sub + | 0xb2l | 0xb3l | 0xb4l as n -> illegal s pos (I32.to_int_u n) | 0xb5l -> i32x4_mul | 0xb6l -> i32x4_min_s | 0xb7l -> i32x4_min_u @@ -876,8 +881,10 @@ let rec instr s = | 0xbfl -> i32x4_extmul_high_i16x8_u | 0xc0l -> i64x2_abs | 0xc1l -> i64x2_neg + | 0xc2l as n -> illegal s pos (I32.to_int_u n) | 0xc3l -> i64x2_all_true | 0xc4l -> i64x2_bitmask + | 0xc5l | 0xc6l as n -> illegal s pos (I32.to_int_u n) | 0xc7l -> i64x2_extend_low_i32x4_s | 0xc8l -> i64x2_extend_high_i32x4_s | 0xc9l -> i64x2_extend_low_i32x4_u @@ -886,7 +893,9 @@ let rec instr s = | 0xccl -> i64x2_shr_s | 0xcdl -> i64x2_shr_u | 0xcel -> i64x2_add + | 0xcfl | 0xd0l as n -> illegal s pos (I32.to_int_u n) | 0xd1l -> i64x2_sub + | 0xd2l | 0xd3l | 0xd4l as n -> illegal s pos (I32.to_int_u n) | 0xd5l -> i64x2_mul | 0xd6l -> i64x2_eq | 0xd7l -> i64x2_ne @@ -900,6 +909,7 @@ let rec instr s = | 0xdfl -> i64x2_extmul_high_i32x4_u | 0xe0l -> f32x4_abs | 0xe1l -> f32x4_neg + | 0xe2l as n -> illegal s pos (I32.to_int_u n) | 0xe3l -> f32x4_sqrt | 0xe4l -> f32x4_add | 0xe5l -> f32x4_sub