diff --git a/.github/workflows/ci-interpreter.yml b/.github/workflows/ci-interpreter.yml index 52c214eed6..72dbef536e 100644 --- a/.github/workflows/ci-interpreter.yml +++ b/.github/workflows/ci-interpreter.yml @@ -27,7 +27,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v2 with: - node-version: 19.x + node-version: 20.x - name: Build interpreter run: cd interpreter && opam exec make - name: Run tests diff --git a/document/core/appendix/changes.rst b/document/core/appendix/changes.rst index 849cfd9804..dca5646819 100644 --- a/document/core/appendix/changes.rst +++ b/document/core/appendix/changes.rst @@ -518,6 +518,48 @@ Added managed reference types. [#proposal-gc]_ - |EXTERNCONVERTANY| +.. index:: instruction, vector instruction, SIMD + +Relaxed Vector Instructions +........................... + +Added new *relaxed* vector instructions, +whose behaviour is non-deterministic and implementation-dependent. [#proposal-relaxed]_ + +* New binary :ref:`vector instruction `: + + - :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_min}` + - :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_max}` + - :math:`\K{i16x8.relaxed\_q15mulr\_s}` + - :math:`\K{i16x8.relaxed\_dot\_i8x16\_i7x16\_s}` + +* New ternary :ref:`vector instruction `: + + - :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_madd}` + - :math:`\K{f}\!N\!\K{x}\!M\!\K{.relaxed\_nmadd}` + - :math:`\K{i}\!N\!\K{x}\!M\!\K{.relaxed\_laneselect}` + - :math:`\K{i32x4.relaxed\_dot\_i8x16\_i7x16\_add\_s}` + +* New conversion :ref:`vector instructions `: + + - :math:`\K{i32x4.relaxed\_trunc\_f32x4\_}\sx` + - :math:`\K{i32x4.relaxed\_trunc\_f64x2\_}\sx\K{\_zero}` + +* New byte reordering :ref:`vector instruction `: + + - :math:`\K{i8x16.relaxed\_swizzle}` + + +.. index:: determinism, non-determinism, profiles + +Profiles +........ + +Introduced the concept of :ref:`profile ` for specifying language subsets. + +* A new profile defining a :ref:`deterministic ` mode of execution. + + .. index:: text format, annotation, custom section, identifier, module, type, function, local, structure field Custom Annotations @@ -542,7 +584,7 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_ .. [#proposal-extconst] - https://github.com/WebAssembly/extended-const/blob/main/proposals/extended-const/ + https://github.com/WebAssembly/spec/blob/main/proposals/extended-const/ .. [#proposal-tailcall] https://github.com/WebAssembly/spec/tree/main/proposals/tail-call/ @@ -551,7 +593,7 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_ https://github.com/WebAssembly/spec/tree/main/proposals/exception-handling/ .. [#proposal-multimem] - https://github.com/WebAssembly/multi-memory/blob/main/proposals/multi-memory/ + https://github.com/WebAssembly/spec/blob/main/proposals/multi-memory/ .. [#proposal-typedref] https://github.com/WebAssembly/spec/tree/main/proposals/function-references/ @@ -559,5 +601,8 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_ .. [#proposal-gc] https://github.com/WebAssembly/spec/tree/main/proposals/gc/ +.. [#proposal-relaxed] + https://github.com/WebAssembly/spec/tree/main/proposals/relaxed-simd/ + .. [#proposal-annot] https://github.com/WebAssembly/annotations/tree/main/proposals/annotations/ diff --git a/document/core/appendix/index-instructions.py b/document/core/appendix/index-instructions.py index 6ef4ff12d0..bebc757f8b 100755 --- a/document/core/appendix/index-instructions.py +++ b/document/core/appendix/index-instructions.py @@ -52,7 +52,7 @@ def RefWrap(s, kind): return f':ref:`{kind} <{s}>`' -def Instruction(name, opcode, type=None, validation=None, execution=None, operator=None, validation2=None, execution2=None): +def Instruction(version, name, opcode, type=None, validation=None, execution=None, operator=None, validation2=None, execution2=None): if operator: execution_str = RefWrap(execution, 'execution') + ' (' + RefWrap(operator, 'operator') + ')' elif execution2: @@ -77,565 +77,585 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat INSTRUCTIONS = [ - Instruction(r'\UNREACHABLE', r'\hex{00}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-unreachable', r'exec-unreachable'), - Instruction(r'\NOP', r'\hex{01}', r'[] \to []', r'valid-nop', r'exec-nop'), - Instruction(r'\BLOCK~\X{bt}', r'\hex{02}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-block', r'exec-block'), - Instruction(r'\LOOP~\X{bt}', r'\hex{03}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-loop', r'exec-loop'), - Instruction(r'\IF~\X{bt}', r'\hex{04}', r'[t_1^\ast~\I32] \to [t_2^\ast]', r'valid-if', r'exec-if'), - Instruction(r'\ELSE', r'\hex{05}'), - Instruction(None, r'\hex{06}'), - Instruction(None, r'\hex{07}'), - Instruction(r'\THROW~x', r'\hex{08}', r'[t_1^\ast~t_x^\ast] \to [t_2^\ast]', r'valid-throw', r'exec-throw'), - Instruction(None, r'\hex{09}'), - Instruction(r'\THROWREF', r'\hex{0A}', r'[t_1^\ast~\EXNREF] \to [t_2^\ast]', r'valid-throw_ref', r'exec-throw_ref'), - Instruction(r'\END', r'\hex{0B}'), - Instruction(r'\BR~l', r'\hex{0C}', r'[t_1^\ast~t^\ast] \to [t_2^\ast]', r'valid-br', r'exec-br'), - Instruction(r'\BRIF~l', r'\hex{0D}', r'[t^\ast~\I32] \to [t^\ast]', r'valid-br_if', r'exec-br_if'), - Instruction(r'\BRTABLE~l^\ast~l', r'\hex{0E}', r'[t_1^\ast~t^\ast~\I32] \to [t_2^\ast]', r'valid-br_table', r'exec-br_table'), - Instruction(r'\RETURN', r'\hex{0F}', r'[t_1^\ast~t^\ast] \to [t_2^\ast]', r'valid-return', r'exec-return'), - Instruction(r'\CALL~x', r'\hex{10}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-call', r'exec-call'), - Instruction(r'\CALLINDIRECT~x~y', r'\hex{11}', r'[t_1^\ast~\I32] \to [t_2^\ast]', r'valid-call_indirect', r'exec-call_indirect'), - Instruction(r'\RETURNCALL~x', r'\hex{12}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-return_call', r'exec-return_call'), - Instruction(r'\RETURNCALLINDIRECT~x~y', r'\hex{13}', r'[t_1^\ast~\I32] \to [t_2^\ast]', r'valid-return_call_indirect', r'exec-return_call_indirect'), - Instruction(r'\CALLREF~x', r'\hex{14}', r'[t_1^\ast~(\REF~\NULL~x)] \to [t_2^\ast]', r'valid-call_ref', r'exec-call_ref'), - Instruction(r'\RETURNCALLREF~x', r'\hex{15}', r'[t_1^\ast~(\REF~\NULL~x)] \to [t_2^\ast]', r'valid-return_call_ref', r'exec-return_call_ref'), - Instruction(None, r'\hex{16}'), - Instruction(None, r'\hex{17}'), - Instruction(None, r'\hex{18}'), - Instruction(None, r'\hex{19}'), - Instruction(r'\DROP', r'\hex{1A}', r'[t] \to []', r'valid-drop', r'exec-drop'), - Instruction(r'\SELECT', r'\hex{1B}', r'[t~t~\I32] \to [t]', r'valid-select', r'exec-select'), - Instruction(r'\SELECT~t', r'\hex{1C}', r'[t~t~\I32] \to [t]', r'valid-select', r'exec-select'), - Instruction(None, r'\hex{1D}'), - Instruction(None, r'\hex{1E}'), - Instruction(r'\TRYTABLE~\X{bt}', r'\hex{1F}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-try_table', r'exec-try_table'), - Instruction(r'\LOCALGET~x', r'\hex{20}', r'[] \to [t]', r'valid-local.get', r'exec-local.get'), - Instruction(r'\LOCALSET~x', r'\hex{21}', r'[t] \to []', r'valid-local.set', r'exec-local.set'), - Instruction(r'\LOCALTEE~x', r'\hex{22}', r'[t] \to [t]', r'valid-local.tee', r'exec-local.tee'), - Instruction(r'\GLOBALGET~x', r'\hex{23}', r'[] \to [t]', r'valid-global.get', r'exec-global.get'), - Instruction(r'\GLOBALSET~x', r'\hex{24}', r'[t] \to []', r'valid-global.set', r'exec-global.set'), - Instruction(r'\TABLEGET~x', r'\hex{25}', r'[\I32] \to [t]', r'valid-table.get', r'exec-table.get'), - Instruction(r'\TABLESET~x', r'\hex{26}', r'[\I32~t] \to []', r'valid-table.set', r'exec-table.set'), - Instruction(None, r'\hex{27}'), - Instruction(r'\I32.\LOAD~x~\memarg', r'\hex{28}', r'[\I32] \to [\I32]', r'valid-load-val', r'exec-load-val'), - Instruction(r'\I64.\LOAD~x~\memarg', r'\hex{29}', r'[\I32] \to [\I64]', r'valid-load-val', r'exec-load-val'), - Instruction(r'\F32.\LOAD~x~\memarg', r'\hex{2A}', r'[\I32] \to [\F32]', r'valid-load-val', r'exec-load-val'), - Instruction(r'\F64.\LOAD~x~\memarg', r'\hex{2B}', r'[\I32] \to [\F64]', r'valid-load-val', r'exec-load-val'), - Instruction(r'\I32.\LOAD\K{8\_s}~x~\memarg', r'\hex{2C}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I32.\LOAD\K{8\_u}~x~\memarg', r'\hex{2D}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I32.\LOAD\K{16\_s}~x~\memarg', r'\hex{2E}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I32.\LOAD\K{16\_u}~x~\memarg', r'\hex{2F}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I64.\LOAD\K{8\_s}~x~\memarg', r'\hex{30}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I64.\LOAD\K{8\_u}~x~\memarg', r'\hex{31}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I64.\LOAD\K{16\_s}~x~\memarg', r'\hex{32}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I64.\LOAD\K{16\_u}~x~\memarg', r'\hex{33}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I64.\LOAD\K{32\_s}~x~\memarg', r'\hex{34}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I64.\LOAD\K{32\_u}~x~\memarg', r'\hex{35}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), - Instruction(r'\I32.\STORE~x~\memarg', r'\hex{36}', r'[\I32~\I32] \to []', r'valid-store-val', r'exec-store-val'), - Instruction(r'\I64.\STORE~x~\memarg', r'\hex{37}', r'[\I32~\I64] \to []', r'valid-store-val', r'exec-store-val'), - Instruction(r'\F32.\STORE~x~\memarg', r'\hex{38}', r'[\I32~\F32] \to []', r'valid-store-val', r'exec-store-val'), - Instruction(r'\F64.\STORE~x~\memarg', r'\hex{39}', r'[\I32~\F64] \to []', r'valid-store-val', r'exec-store-val'), - Instruction(r'\I32.\STORE\K{8}~x~\memarg', r'\hex{3A}', r'[\I32~\I32] \to []', r'valid-store-pack', r'exec-store-pack'), - Instruction(r'\I32.\STORE\K{16}~x~\memarg', r'\hex{3B}', r'[\I32~\I32] \to []', r'valid-store-pack', r'exec-store-pack'), - Instruction(r'\I64.\STORE\K{8}~x~\memarg', r'\hex{3C}', r'[\I32~\I64] \to []', r'valid-store-pack', r'exec-store-pack'), - Instruction(r'\I64.\STORE\K{16}~x~\memarg', r'\hex{3D}', r'[\I32~\I64] \to []', r'valid-store-pack', r'exec-store-pack'), - Instruction(r'\I64.\STORE\K{32}~x~\memarg', r'\hex{3E}', r'[\I32~\I64] \to []', r'valid-store-pack', r'exec-store-pack'), - Instruction(r'\MEMORYSIZE~x', r'\hex{3F}', r'[] \to [\I32]', r'valid-memory.size', r'exec-memory.size'), - Instruction(r'\MEMORYGROW~x', r'\hex{40}', r'[\I32] \to [\I32]', r'valid-memory.grow', r'exec-memory.grow'), - Instruction(r'\I32.\CONST~\i32', r'\hex{41}', r'[] \to [\I32]', r'valid-const', r'exec-const'), - Instruction(r'\I64.\CONST~\i64', r'\hex{42}', r'[] \to [\I64]', r'valid-const', r'exec-const'), - Instruction(r'\F32.\CONST~\f32', r'\hex{43}', r'[] \to [\F32]', r'valid-const', r'exec-const'), - Instruction(r'\F64.\CONST~\f64', r'\hex{44}', r'[] \to [\F64]', r'valid-const', r'exec-const'), - Instruction(r'\I32.\EQZ', r'\hex{45}', r'[\I32] \to [\I32]', r'valid-testop', r'exec-testop', r'op-ieqz'), - Instruction(r'\I32.\EQ', r'\hex{46}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ieq'), - Instruction(r'\I32.\NE', r'\hex{47}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ine'), - Instruction(r'\I32.\LT\K{\_s}', r'\hex{48}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), - Instruction(r'\I32.\LT\K{\_u}', r'\hex{49}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), - Instruction(r'\I32.\GT\K{\_s}', r'\hex{4A}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), - Instruction(r'\I32.\GT\K{\_u}', r'\hex{4B}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), - Instruction(r'\I32.\LE\K{\_s}', r'\hex{4C}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), - Instruction(r'\I32.\LE\K{\_u}', r'\hex{4D}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), - Instruction(r'\I32.\GE\K{\_s}', r'\hex{4E}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), - Instruction(r'\I32.\GE\K{\_u}', r'\hex{4F}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), - Instruction(r'\I64.\EQZ', r'\hex{50}', r'[\I64] \to [\I32]', r'valid-testop', r'exec-testop', r'op-ieqz'), - Instruction(r'\I64.\EQ', r'\hex{51}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ieq'), - Instruction(r'\I64.\NE', r'\hex{52}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ine'), - Instruction(r'\I64.\LT\K{\_s}', r'\hex{53}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), - Instruction(r'\I64.\LT\K{\_u}', r'\hex{54}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), - Instruction(r'\I64.\GT\K{\_s}', r'\hex{55}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), - Instruction(r'\I64.\GT\K{\_u}', r'\hex{56}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), - Instruction(r'\I64.\LE\K{\_s}', r'\hex{57}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), - Instruction(r'\I64.\LE\K{\_u}', r'\hex{58}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), - Instruction(r'\I64.\GE\K{\_s}', r'\hex{59}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), - Instruction(r'\I64.\GE\K{\_u}', r'\hex{5A}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), - Instruction(r'\F32.\EQ', r'\hex{5B}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-feq'), - Instruction(r'\F32.\NE', r'\hex{5C}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fne'), - Instruction(r'\F32.\LT', r'\hex{5D}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-flt'), - Instruction(r'\F32.\GT', r'\hex{5E}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fgt'), - Instruction(r'\F32.\LE', r'\hex{5F}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fle'), - Instruction(r'\F32.\GE', r'\hex{60}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fge'), - Instruction(r'\F64.\EQ', r'\hex{61}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-feq'), - Instruction(r'\F64.\NE', r'\hex{62}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fne'), - Instruction(r'\F64.\LT', r'\hex{63}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-flt'), - Instruction(r'\F64.\GT', r'\hex{64}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fgt'), - Instruction(r'\F64.\LE', r'\hex{65}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fle'), - Instruction(r'\F64.\GE', r'\hex{66}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fge'), - Instruction(r'\I32.\CLZ', r'\hex{67}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-iclz'), - Instruction(r'\I32.\CTZ', r'\hex{68}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-ictz'), - Instruction(r'\I32.\POPCNT', r'\hex{69}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-ipopcnt'), - Instruction(r'\I32.\ADD', r'\hex{6A}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-iadd'), - Instruction(r'\I32.\SUB', r'\hex{6B}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-isub'), - Instruction(r'\I32.\MUL', r'\hex{6C}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-imul'), - Instruction(r'\I32.\DIV\K{\_s}', r'\hex{6D}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-idiv'), - Instruction(r'\I32.\DIV\K{\_u}', r'\hex{6E}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-idiv'), - Instruction(r'\I32.\REM\K{\_s}', r'\hex{6F}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irem'), - Instruction(r'\I32.\REM\K{\_u}', r'\hex{70}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irem'), - Instruction(r'\I32.\AND', r'\hex{71}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-iand'), - Instruction(r'\I32.\OR', r'\hex{72}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ior'), - Instruction(r'\I32.\XOR', r'\hex{73}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ixor'), - Instruction(r'\I32.\SHL', r'\hex{74}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ishl'), - Instruction(r'\I32.\SHR\K{\_s}', r'\hex{75}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ishr'), - Instruction(r'\I32.\SHR\K{\_u}', r'\hex{76}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ishr'), - Instruction(r'\I32.\ROTL', r'\hex{77}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irotl'), - Instruction(r'\I32.\ROTR', r'\hex{78}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irotr'), - Instruction(r'\I64.\CLZ', r'\hex{79}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iclz'), - Instruction(r'\I64.\CTZ', r'\hex{7A}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-ictz'), - Instruction(r'\I64.\POPCNT', r'\hex{7B}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-ipopcnt'), - Instruction(r'\I64.\ADD', r'\hex{7C}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-iadd'), - Instruction(r'\I64.\SUB', r'\hex{7D}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-isub'), - Instruction(r'\I64.\MUL', r'\hex{7E}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-imul'), - Instruction(r'\I64.\DIV\K{\_s}', r'\hex{7F}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-idiv'), - Instruction(r'\I64.\DIV\K{\_u}', r'\hex{80}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-idiv'), - Instruction(r'\I64.\REM\K{\_s}', r'\hex{81}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irem'), - Instruction(r'\I64.\REM\K{\_u}', r'\hex{82}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irem'), - Instruction(r'\I64.\AND', r'\hex{83}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-iand'), - Instruction(r'\I64.\OR', r'\hex{84}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ior'), - Instruction(r'\I64.\XOR', r'\hex{85}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ixor'), - Instruction(r'\I64.\SHL', r'\hex{86}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ishl'), - Instruction(r'\I64.\SHR\K{\_s}', r'\hex{87}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ishr'), - Instruction(r'\I64.\SHR\K{\_u}', r'\hex{88}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ishr'), - Instruction(r'\I64.\ROTL', r'\hex{89}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irotl'), - Instruction(r'\I64.\ROTR', r'\hex{8A}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irotr'), - Instruction(r'\F32.\ABS', r'\hex{8B}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fabs'), - Instruction(r'\F32.\NEG', r'\hex{8C}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fneg'), - Instruction(r'\F32.\CEIL', r'\hex{8D}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fceil'), - Instruction(r'\F32.\FLOOR', r'\hex{8E}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-ffloor'), - Instruction(r'\F32.\TRUNC', r'\hex{8F}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-ftrunc'), - Instruction(r'\F32.\NEAREST', r'\hex{90}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fnearest'), - Instruction(r'\F32.\SQRT', r'\hex{91}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fsqrt'), - Instruction(r'\F32.\ADD', r'\hex{92}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fadd'), - Instruction(r'\F32.\SUB', r'\hex{93}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fsub'), - Instruction(r'\F32.\MUL', r'\hex{94}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fmul'), - Instruction(r'\F32.\DIV', r'\hex{95}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fdiv'), - Instruction(r'\F32.\FMIN', r'\hex{96}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fmin'), - Instruction(r'\F32.\FMAX', r'\hex{97}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fmax'), - Instruction(r'\F32.\COPYSIGN', r'\hex{98}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fcopysign'), - Instruction(r'\F64.\ABS', r'\hex{99}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fabs'), - Instruction(r'\F64.\NEG', r'\hex{9A}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fneg'), - Instruction(r'\F64.\CEIL', r'\hex{9B}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fceil'), - Instruction(r'\F64.\FLOOR', r'\hex{9C}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-ffloor'), - Instruction(r'\F64.\TRUNC', r'\hex{9D}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-ftrunc'), - Instruction(r'\F64.\NEAREST', r'\hex{9E}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fnearest'), - Instruction(r'\F64.\SQRT', r'\hex{9F}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fsqrt'), - Instruction(r'\F64.\ADD', r'\hex{A0}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fadd'), - Instruction(r'\F64.\SUB', r'\hex{A1}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fsub'), - Instruction(r'\F64.\MUL', r'\hex{A2}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fmul'), - Instruction(r'\F64.\DIV', r'\hex{A3}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fdiv'), - Instruction(r'\F64.\FMIN', r'\hex{A4}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fmin'), - Instruction(r'\F64.\FMAX', r'\hex{A5}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fmax'), - Instruction(r'\F64.\COPYSIGN', r'\hex{A6}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fcopysign'), - Instruction(r'\I32.\WRAP\K{\_}\I64', r'\hex{A7}', r'[\I64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-wrap'), - Instruction(r'\I32.\TRUNC\K{\_}\F32\K{\_s}', r'\hex{A8}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I32.\TRUNC\K{\_}\F32\K{\_u}', r'\hex{A9}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I32.\TRUNC\K{\_}\F64\K{\_s}', r'\hex{AA}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I32.\TRUNC\K{\_}\F64\K{\_u}', r'\hex{AB}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I64.\EXTEND\K{\_}\I32\K{\_s}', r'\hex{AC}', r'[\I32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-extend'), - Instruction(r'\I64.\EXTEND\K{\_}\I32\K{\_u}', r'\hex{AD}', r'[\I32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-extend'), - Instruction(r'\I64.\TRUNC\K{\_}\F32\K{\_s}', r'\hex{AE}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I64.\TRUNC\K{\_}\F32\K{\_u}', r'\hex{AF}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I64.\TRUNC\K{\_}\F64\K{\_s}', r'\hex{B0}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\I64.\TRUNC\K{\_}\F64\K{\_u}', r'\hex{B1}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), - Instruction(r'\F32.\CONVERT\K{\_}\I32\K{\_s}', r'\hex{B2}', r'[\I32] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F32.\CONVERT\K{\_}\I32\K{\_u}', r'\hex{B3}', r'[\I32] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F32.\CONVERT\K{\_}\I64\K{\_s}', r'\hex{B4}', r'[\I64] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F32.\CONVERT\K{\_}\I64\K{\_u}', r'\hex{B5}', r'[\I64] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F32.\DEMOTE\K{\_}\F64', r'\hex{B6}', r'[\F64] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-demote'), - Instruction(r'\F64.\CONVERT\K{\_}\I32\K{\_s}', r'\hex{B7}', r'[\I32] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F64.\CONVERT\K{\_}\I32\K{\_u}', r'\hex{B8}', r'[\I32] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F64.\CONVERT\K{\_}\I64\K{\_s}', r'\hex{B9}', r'[\I64] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F64.\CONVERT\K{\_}\I64\K{\_u}', r'\hex{BA}', r'[\I64] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), - Instruction(r'\F64.\PROMOTE\K{\_}\F32', r'\hex{BB}', r'[\F32] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-promote'), - Instruction(r'\I32.\REINTERPRET\K{\_}\F32', r'\hex{BC}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), - Instruction(r'\I64.\REINTERPRET\K{\_}\F64', r'\hex{BD}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), - Instruction(r'\F32.\REINTERPRET\K{\_}\I32', r'\hex{BE}', r'[\I32] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), - Instruction(r'\F64.\REINTERPRET\K{\_}\I64', r'\hex{BF}', r'[\I64] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), - Instruction(r'\I32.\EXTEND\K{8\_s}', r'\hex{C0}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-iextendn'), - Instruction(r'\I32.\EXTEND\K{16\_s}', r'\hex{C1}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-iextendn'), - Instruction(r'\I64.\EXTEND\K{8\_s}', r'\hex{C2}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iextendn'), - Instruction(r'\I64.\EXTEND\K{16\_s}', r'\hex{C3}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iextendn'), - Instruction(r'\I64.\EXTEND\K{32\_s}', r'\hex{C4}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iextendn'), - Instruction(None, r'\hex{C5}'), - Instruction(None, r'\hex{C6}'), - Instruction(None, r'\hex{C7}'), - Instruction(None, r'\hex{C8}'), - Instruction(None, r'\hex{C9}'), - Instruction(None, r'\hex{CA}'), - Instruction(None, r'\hex{CB}'), - Instruction(None, r'\hex{CC}'), - Instruction(None, r'\hex{CD}'), - Instruction(None, r'\hex{CE}'), - Instruction(None, r'\hex{CF}'), - Instruction(r'\REFNULL~\X{ht}', r'\hex{D0}', r'[] \to [(\REF~\NULL~\X{ht})]', r'valid-ref.null', r'exec-ref.null'), - Instruction(r'\REFISNULL', r'\hex{D1}', r'[(\REF~\NULL~\X{ht})] \to [\I32]', r'valid-ref.is_null', r'exec-ref.is_null'), - Instruction(r'\REFFUNC~x', r'\hex{D2}', r'[] \to [\REF~\X{ht}]', r'valid-ref.func', r'exec-ref.func'), - Instruction(r'\REFEQ', r'\hex{D3}', r'[\EQREF~\EQREF] \to [\I32]', r'valid-ref.eq', r'exec-ref.eq'), - Instruction(r'\REFASNONNULL', r'\hex{D4}', r'[(\REF~\NULL~\X{ht})] \to [(\REF~\X{ht})]', r'valid-ref.as_non_null', r'exec-ref.as_non_null'), - Instruction(r'\BRONNULL~l', r'\hex{D5}', r'[t^\ast~(\REF~\NULL~\X{ht})] \to [t^\ast~(\REF~\X{ht})]', r'valid-br_on_null', r'exec-br_on_null'), - Instruction(r'\BRONNONNULL~l', r'\hex{D6}', r'[t^\ast~(\REF~\NULL~\X{ht})] \to [t^\ast]', r'valid-br_on_non_null', r'exec-br_on_non_null'), - Instruction(None, r'\hex{D7}'), - Instruction(None, r'\hex{D8}'), - Instruction(None, r'\hex{D9}'), - Instruction(None, r'\hex{DA}'), - Instruction(None, r'\hex{DB}'), - Instruction(None, r'\hex{DC}'), - Instruction(None, r'\hex{DD}'), - Instruction(None, r'\hex{DE}'), - Instruction(None, r'\hex{DF}'), - Instruction(None, r'\hex{E0}'), - Instruction(None, r'\hex{E1}'), - Instruction(None, r'\hex{E2}'), - Instruction(None, r'\hex{E3}'), - Instruction(None, r'\hex{E4}'), - Instruction(None, r'\hex{E5}'), - Instruction(None, r'\hex{E6}'), - Instruction(None, r'\hex{E7}'), - Instruction(None, r'\hex{E8}'), - Instruction(None, r'\hex{E9}'), - Instruction(None, r'\hex{EA}'), - Instruction(None, r'\hex{EB}'), - Instruction(None, r'\hex{EC}'), - Instruction(None, r'\hex{ED}'), - Instruction(None, r'\hex{EE}'), - Instruction(None, r'\hex{EF}'), - Instruction(None, r'\hex{F0}'), - Instruction(None, r'\hex{F1}'), - Instruction(None, r'\hex{F2}'), - Instruction(None, r'\hex{F3}'), - Instruction(None, r'\hex{F4}'), - Instruction(None, r'\hex{F5}'), - Instruction(None, r'\hex{F6}'), - Instruction(None, r'\hex{F7}'), - Instruction(None, r'\hex{F8}'), - Instruction(None, r'\hex{F9}'), - Instruction(None, r'\hex{FA}'), - 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~y', r'\hex{FB}~\hex{02}', r'[(\REF~\NULL~x)] \to [t]', r'valid-struct.get', r'exec-struct.get'), - Instruction(r'\STRUCTGETS~x~y', r'\hex{FB}~\hex{03}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), - Instruction(r'\STRUCTGETU~x~y', r'\hex{FB}~\hex{04}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), - Instruction(r'\STRUCTSET~x~y', 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'[\I32] \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'[(\REF~\NULL~\ARRAY)] \to [\I32]', 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.cast', r'exec-ref.cast'), - 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'\ANYCONVERTEXTERN', r'\hex{FB}~\hex{1A}', r'[(\REF~\NULL~\EXTERN)] \to [(\REF~\NULL~\ANY)]', r'valid-any.convert_extern', r'exec-any.convert_extern'), - Instruction(r'\EXTERNCONVERTANY', r'\hex{FB}~\hex{1B}', r'[(\REF~\NULL~\ANY)] \to [(\REF~\NULL~\EXTERN)]', r'valid-extern.convert_any', r'exec-extern.convert_any'), - Instruction(r'\REFI31', r'\hex{FB}~\hex{1C}', r'[\I32] \to [(\REF~\I31)]', r'valid-ref.i31', r'exec-ref.i31'), - 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'), - 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'), - 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'), - Instruction(r'\I32.\TRUNC\K{\_sat\_}\F64\K{\_u}', r'\hex{FC}~\hex{03}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), - Instruction(r'\I64.\TRUNC\K{\_sat\_}\F32\K{\_s}', r'\hex{FC}~\hex{04}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), - Instruction(r'\I64.\TRUNC\K{\_sat\_}\F32\K{\_u}', r'\hex{FC}~\hex{05}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), - Instruction(r'\I64.\TRUNC\K{\_sat\_}\F64\K{\_s}', r'\hex{FC}~\hex{06}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), - Instruction(r'\I64.\TRUNC\K{\_sat\_}\F64\K{\_u}', r'\hex{FC}~\hex{07}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), - Instruction(r'\MEMORYINIT~x~y', r'\hex{FC}~\hex{08}', r'[\I32~\I32~\I32] \to []', r'valid-memory.init', r'exec-memory.init'), - Instruction(r'\DATADROP~x', r'\hex{FC}~\hex{09}', r'[] \to []', r'valid-data.drop', r'exec-data.drop'), - Instruction(r'\MEMORYCOPY~x~y', r'\hex{FC}~\hex{0A}', r'[\I32~\I32~\I32] \to []', r'valid-memory.copy', r'exec-memory.copy'), - Instruction(r'\MEMORYFILL~y', r'\hex{FC}~\hex{0B}', r'[\I32~\I32~\I32] \to []', r'valid-memory.fill', r'exec-memory.fill'), - Instruction(r'\TABLEINIT~x~y', r'\hex{FC}~\hex{0C}', r'[\I32~\I32~\I32] \to []', r'valid-table.init', r'exec-table.init'), - Instruction(r'\ELEMDROP~x', r'\hex{FC}~\hex{0D}', r'[] \to []', r'valid-elem.drop', r'exec-elem.drop'), - Instruction(r'\TABLECOPY~x~y', r'\hex{FC}~\hex{0E}', r'[\I32~\I32~\I32] \to []', r'valid-table.copy', r'exec-table.copy'), - 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.\VLOAD~x~\memarg', r'\hex{FD}~~\hex{00}', r'[\I32] \to [\V128]', r'valid-vload-val', r'exec-vload-val'), - Instruction(r'\V128.\VLOAD\K{8x8\_s}~x~\memarg', r'\hex{FD}~~\hex{01}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), - Instruction(r'\V128.\VLOAD\K{8x8\_u}~x~\memarg', r'\hex{FD}~~\hex{02}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), - Instruction(r'\V128.\VLOAD\K{16x4\_s}~x~\memarg', r'\hex{FD}~~\hex{03}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), - Instruction(r'\V128.\VLOAD\K{16x4\_u}~x~\memarg', r'\hex{FD}~~\hex{04}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), - Instruction(r'\V128.\VLOAD\K{32x2\_s}~x~\memarg', r'\hex{FD}~~\hex{05}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), - Instruction(r'\V128.\VLOAD\K{32x2\_u}~x~\memarg', r'\hex{FD}~~\hex{06}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), - Instruction(r'\V128.\VLOAD\K{8\_splat}~x~\memarg', r'\hex{FD}~~\hex{07}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), - Instruction(r'\V128.\VLOAD\K{16\_splat}~x~\memarg', r'\hex{FD}~~\hex{08}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), - Instruction(r'\V128.\VLOAD\K{32\_splat}~x~\memarg', r'\hex{FD}~~\hex{09}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), - Instruction(r'\V128.\VLOAD\K{64\_splat}~x~\memarg', r'\hex{FD}~~\hex{0A}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), - Instruction(r'\V128.\VSTORE~x~\memarg', r'\hex{FD}~~\hex{0B}', r'[\I32~\V128] \to []', r'valid-vstore', r'exec-vstore'), - Instruction(r'\V128.\VCONST~\i128', r'\hex{FD}~~\hex{0C}', r'[] \to [\V128]', r'valid-vconst', r'exec-vconst'), - Instruction(r'\I8X16.\VSHUFFLE~\laneidx^{16}', r'\hex{FD}~~\hex{0D}', r'[\V128~\V128] \to [\V128]', r'valid-vshuffle', r'exec-vshuffle'), - Instruction(r'\I8X16.\VSWIZZLE', r'\hex{FD}~~\hex{0E}', r'[\V128~\V128] \to [\V128]', r'valid-vswizzle', r'exec-vswizzle'), - Instruction(r'\I8X16.\VSPLAT', r'\hex{FD}~~\hex{0F}', r'[\I32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), - Instruction(r'\I16X8.\VSPLAT', r'\hex{FD}~~\hex{10}', r'[\I32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), - Instruction(r'\I32X4.\VSPLAT', r'\hex{FD}~~\hex{11}', r'[\I32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), - Instruction(r'\I64X2.\VSPLAT', r'\hex{FD}~~\hex{12}', r'[\I64] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), - Instruction(r'\F32X4.\VSPLAT', r'\hex{FD}~~\hex{13}', r'[\F32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), - Instruction(r'\F64X2.\VSPLAT', r'\hex{FD}~~\hex{14}', r'[\F64] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), - Instruction(r'\I8X16.\VEXTRACTLANE\K{\_s}~\laneidx', r'\hex{FD}~~\hex{15}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\I8X16.\VEXTRACTLANE\K{\_u}~\laneidx', r'\hex{FD}~~\hex{16}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\I8X16.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{17}', r'[\V128~\I32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), - Instruction(r'\I16X8.\VEXTRACTLANE\K{\_s}~\laneidx', r'\hex{FD}~~\hex{18}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\I16X8.\VEXTRACTLANE\K{\_u}~\laneidx', r'\hex{FD}~~\hex{19}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\I16X8.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{1A}', r'[\V128~\I32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), - Instruction(r'\I32X4.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{1B}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\I32X4.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{1C}', r'[\V128~\I32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), - Instruction(r'\I64X2.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{1D}', r'[\V128] \to [\I64]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\I64X2.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{1E}', r'[\V128~\I64] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), - Instruction(r'\F32X4.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{1F}', r'[\V128] \to [\F32]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\F32X4.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{20}', r'[\V128~\F32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), - Instruction(r'\F64X2.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{21}', r'[\V128] \to [\F64]', r'valid-vextract_lane', r'exec-vextract_lane'), - Instruction(r'\F64X2.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{22}', r'[\V128~\F64] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), - Instruction(r'\I8X16.\VEQ', r'\hex{FD}~~\hex{23}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ieq'), - Instruction(r'\I8X16.\VNE', r'\hex{FD}~~\hex{24}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ine'), - Instruction(r'\I8X16.\VLT\K{\_s}', r'\hex{FD}~~\hex{25}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), - Instruction(r'\I8X16.\VLT\K{\_u}', r'\hex{FD}~~\hex{26}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), - Instruction(r'\I8X16.\VGT\K{\_s}', r'\hex{FD}~~\hex{27}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), - Instruction(r'\I8X16.\VGT\K{\_u}', r'\hex{FD}~~\hex{28}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), - Instruction(r'\I8X16.\VLE\K{\_s}', r'\hex{FD}~~\hex{29}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), - Instruction(r'\I8X16.\VLE\K{\_u}', r'\hex{FD}~~\hex{2A}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), - Instruction(r'\I8X16.\VGE\K{\_s}', r'\hex{FD}~~\hex{2B}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), - Instruction(r'\I8X16.\VGE\K{\_u}', r'\hex{FD}~~\hex{2C}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), - Instruction(r'\I16X8.\VEQ', r'\hex{FD}~~\hex{2D}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ieq'), - Instruction(r'\I16X8.\VNE', r'\hex{FD}~~\hex{2E}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ine'), - Instruction(r'\I16X8.\VLT\K{\_s}', r'\hex{FD}~~\hex{2F}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), - Instruction(r'\I16X8.\VLT\K{\_u}', r'\hex{FD}~~\hex{30}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), - Instruction(r'\I16X8.\VGT\K{\_s}', r'\hex{FD}~~\hex{31}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), - Instruction(r'\I16X8.\VGT\K{\_u}', r'\hex{FD}~~\hex{32}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), - Instruction(r'\I16X8.\VLE\K{\_s}', r'\hex{FD}~~\hex{33}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), - Instruction(r'\I16X8.\VLE\K{\_u}', r'\hex{FD}~~\hex{34}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), - Instruction(r'\I16X8.\VGE\K{\_s}', r'\hex{FD}~~\hex{35}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), - Instruction(r'\I16X8.\VGE\K{\_u}', r'\hex{FD}~~\hex{36}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), - Instruction(r'\I32X4.\VEQ', r'\hex{FD}~~\hex{37}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ieq'), - Instruction(r'\I32X4.\VNE', r'\hex{FD}~~\hex{38}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ine'), - Instruction(r'\I32X4.\VLT\K{\_s}', r'\hex{FD}~~\hex{39}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), - Instruction(r'\I32X4.\VLT\K{\_u}', r'\hex{FD}~~\hex{3A}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), - Instruction(r'\I32X4.\VGT\K{\_s}', r'\hex{FD}~~\hex{3B}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), - Instruction(r'\I32X4.\VGT\K{\_u}', r'\hex{FD}~~\hex{3C}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), - Instruction(r'\I32X4.\VLE\K{\_s}', r'\hex{FD}~~\hex{3D}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), - Instruction(r'\I32X4.\VLE\K{\_u}', r'\hex{FD}~~\hex{3E}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), - Instruction(r'\I32X4.\VGE\K{\_s}', r'\hex{FD}~~\hex{3F}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), - Instruction(r'\I32X4.\VGE\K{\_u}', r'\hex{FD}~~\hex{40}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), - Instruction(r'\F32X4.\VEQ', r'\hex{FD}~~\hex{41}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-feq'), - Instruction(r'\F32X4.\VNE', r'\hex{FD}~~\hex{42}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fne'), - Instruction(r'\F32X4.\VLT', r'\hex{FD}~~\hex{43}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-flt'), - Instruction(r'\F32X4.\VGT', r'\hex{FD}~~\hex{44}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fgt'), - Instruction(r'\F32X4.\VLE', r'\hex{FD}~~\hex{45}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fle'), - Instruction(r'\F32X4.\VGE', r'\hex{FD}~~\hex{46}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fge'), - Instruction(r'\F64X2.\VEQ', r'\hex{FD}~~\hex{47}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-feq'), - Instruction(r'\F64X2.\VNE', r'\hex{FD}~~\hex{48}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fne'), - Instruction(r'\F64X2.\VLT', r'\hex{FD}~~\hex{49}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-flt'), - Instruction(r'\F64X2.\VGT', r'\hex{FD}~~\hex{4A}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fgt'), - Instruction(r'\F64X2.\VLE', r'\hex{FD}~~\hex{4B}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fle'), - Instruction(r'\F64X2.\VGE', r'\hex{FD}~~\hex{4C}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fge'), - Instruction(r'\V128.\VNOT', r'\hex{FD}~~\hex{4D}', r'[\V128] \to [\V128]', r'valid-vvunop', r'exec-vvunop', r'op-inot'), - Instruction(r'\V128.\VAND', r'\hex{FD}~~\hex{4E}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-iand'), - Instruction(r'\V128.\VANDNOT', r'\hex{FD}~~\hex{4F}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-iandnot'), - Instruction(r'\V128.\VOR', r'\hex{FD}~~\hex{50}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-ior'), - Instruction(r'\V128.\VXOR', r'\hex{FD}~~\hex{51}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-ixor'), - Instruction(r'\V128.\VBITSELECT', r'\hex{FD}~~\hex{52}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vvternop', r'exec-vvternop', r'op-ibitselect'), - Instruction(r'\V128.\VANYTRUE', r'\hex{FD}~~\hex{53}', r'[\V128] \to [\I32]', r'valid-vvtestop', r'exec-vvtestop'), - Instruction(r'\V128.\VLOAD\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{54}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), - Instruction(r'\V128.\VLOAD\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{55}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), - Instruction(r'\V128.\VLOAD\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{56}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), - Instruction(r'\V128.\VLOAD\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{57}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), - Instruction(r'\V128.\VSTORE\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{58}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), - Instruction(r'\V128.\VSTORE\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{59}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), - Instruction(r'\V128.\VSTORE\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5A}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), - Instruction(r'\V128.\VSTORE\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5B}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), - Instruction(r'\V128.\VLOAD\K{32\_zero}~\memarg', r'\hex{FD}~~\hex{5C}', r'[\I32] \to [\V128]', r'valid-vload-zero', r'exec-vload-zero'), - Instruction(r'\V128.\VLOAD\K{64\_zero}~\memarg', r'\hex{FD}~~\hex{5D}', r'[\I32] \to [\V128]', r'valid-vload-zero', r'exec-vload-zero'), - Instruction(r'\F32X4.\VDEMOTE\K{\_f64x2\_zero}', r'\hex{FD}~~\hex{5E}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-demote'), - Instruction(r'\F64X2.\VPROMOTE\K{\_}\LOW\K{\_f32x4}', r'\hex{FD}~~\hex{5F}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-promote'), - Instruction(r'\I8X16.\VABS', r'\hex{FD}~~\hex{60}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), - Instruction(r'\I8X16.\VNEG', r'\hex{FD}~~\hex{61}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), - Instruction(r'\I8X16.\VPOPCNT', r'\hex{FD}~~\hex{62}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ipopcnt'), - Instruction(r'\I8X16.\VALLTRUE', r'\hex{FD}~~\hex{63}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), - Instruction(r'\I8X16.\VBITMASK', r'\hex{FD}~~\hex{64}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), - Instruction(r'\I8X16.\VNARROW\K{\_i16x8\_s}', r'\hex{FD}~~\hex{65}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), - Instruction(r'\I8X16.\VNARROW\K{\_i16x8\_u}', r'\hex{FD}~~\hex{66}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), - Instruction(r'\F32X4.\VCEIL', r'\hex{FD}~~\hex{67}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fceil'), - Instruction(r'\F32X4.\VFLOOR', r'\hex{FD}~~\hex{68}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ffloor'), - Instruction(r'\F32X4.\VTRUNC', r'\hex{FD}~~\hex{69}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ftrunc'), - Instruction(r'\F32X4.\VNEAREST', r'\hex{FD}~~\hex{6A}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fnearest'), - Instruction(r'\I8X16.\VSHL', r'\hex{FD}~~\hex{6B}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), - Instruction(r'\I8X16.\VSHR\K{\_s}', r'\hex{FD}~~\hex{6C}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - Instruction(r'\I8X16.\VSHR\K{\_u}', r'\hex{FD}~~\hex{6D}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - Instruction(r'\I8X16.\VADD', r'\hex{FD}~~\hex{6E}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd'), - Instruction(r'\I8X16.\VADDSAT\K{\_s}', r'\hex{FD}~~\hex{6F}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), - Instruction(r'\I8X16.\VADDSAT\K{\_u}', r'\hex{FD}~~\hex{70}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), - Instruction(r'\I8X16.\VSUB', r'\hex{FD}~~\hex{71}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub'), - Instruction(r'\I8X16.\VSUBSAT\K{\_s}', r'\hex{FD}~~\hex{72}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), - Instruction(r'\I8X16.\VSUBSAT\K{\_u}', r'\hex{FD}~~\hex{73}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), - Instruction(r'\F64X2.\VCEIL', r'\hex{FD}~~\hex{74}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fceil'), - Instruction(r'\F64X2.\VFLOOR', r'\hex{FD}~~\hex{75}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ffloor'), - Instruction(r'\I8X16.\VMIN\K{\_s}', r'\hex{FD}~~\hex{76}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin'), - Instruction(r'\I8X16.\VMIN\K{\_u}', r'\hex{FD}~~\hex{77}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin'), - Instruction(r'\I8X16.\VMAX\K{\_s}', r'\hex{FD}~~\hex{78}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), - Instruction(r'\I8X16.\VMAX\K{\_u}', r'\hex{FD}~~\hex{79}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), - Instruction(r'\F64X2.\VTRUNC', r'\hex{FD}~~\hex{7A}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ftrunc'), - Instruction(r'\I8X16.\VAVGR\K{\_u}', r'\hex{FD}~~\hex{7B}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iavgr'), - Instruction(r'\I16X8.\VEXTADDPAIRWISE\K{\_i8x16\_s}', r'\hex{FD}~~\hex{7C}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), - Instruction(r'\I16X8.\VEXTADDPAIRWISE\K{\_i8x16\_u}', r'\hex{FD}~~\hex{7D}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), - Instruction(r'\I32X4.\VEXTADDPAIRWISE\K{\_i16x8\_s}', r'\hex{FD}~~\hex{7E}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), - Instruction(r'\I32X4.\VEXTADDPAIRWISE\K{\_i16x8\_u}', r'\hex{FD}~~\hex{7F}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), - Instruction(r'\I16X8.\VABS', r'\hex{FD}~~\hex{80}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), - Instruction(r'\I16X8.\VNEG', r'\hex{FD}~~\hex{81}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), - Instruction(r'\I16X8.\VQ15MULRSAT\K{\_s}', r'\hex{FD}~~\hex{82}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iq15mulrsat'), - Instruction(r'\I16X8.\VALLTRUE', r'\hex{FD}~~\hex{83}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), - Instruction(r'\I16X8.\VBITMASK', r'\hex{FD}~~\hex{84}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), - Instruction(r'\I16X8.\VNARROW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{85}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), - Instruction(r'\I16X8.\VNARROW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{86}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), - Instruction(r'\I16X8.\VEXTEND\K{\_}\LOW\K{\_i8x16\_s}', r'\hex{FD}~~\hex{87}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I16X8.\VEXTEND\K{\_}\HIGH\K{\_i8x16\_s}', r'\hex{FD}~~\hex{88}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I16X8.\VEXTEND\K{\_}\LOW\K{\_i8x16\_u}', r'\hex{FD}~~\hex{89}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I16X8.\VEXTEND\K{\_}\HIGH\K{\_i8x16\_u}', r'\hex{FD}~~\hex{8A}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I16X8.\VSHL', r'\hex{FD}~~\hex{8B}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), - Instruction(r'\I16X8.\VSHR\K{\_s}', r'\hex{FD}~~\hex{8C}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - Instruction(r'\I16X8.\VSHR\K{\_u}', r'\hex{FD}~~\hex{8D}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - Instruction(r'\I16X8.\VADD', r'\hex{FD}~~\hex{8E}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd'), - Instruction(r'\I16X8.\VADD\K{\_sat\_s}', r'\hex{FD}~~\hex{8F}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), - Instruction(r'\I16X8.\VADD\K{\_sat\_u}', r'\hex{FD}~~\hex{90}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), - Instruction(r'\I16X8.\VSUB', r'\hex{FD}~~\hex{91}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub'), - Instruction(r'\I16X8.\VSUB\K{\_sat\_s}', r'\hex{FD}~~\hex{92}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), - Instruction(r'\I16X8.\VSUB\K{\_sat\_u}', r'\hex{FD}~~\hex{93}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), - Instruction(r'\F64X2.\VNEAREST', r'\hex{FD}~~\hex{94}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fnearest'), - Instruction(r'\I16X8.\VMUL', r'\hex{FD}~~\hex{95}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imul'), - Instruction(r'\I16X8.\VMIN\K{\_s}', r'\hex{FD}~~\hex{96}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin'), - 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'), - 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'), - 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'), - Instruction(None, r'\hex{FD}~\hex{9A}~\hex{01}'), - Instruction(r'\I16X8.\VAVGR\K{\_u}', r'\hex{FD}~~\hex{9B}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iavgr'), - Instruction(r'\I16X8.\VEXTMUL\K{\_}\LOW\K{\_i8x16\_s}', r'\hex{FD}~~\hex{9C}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I16X8.\VEXTMUL\K{\_}\HIGH\K{\_i8x16\_s}', r'\hex{FD}~~\hex{9D}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I16X8.\VEXTMUL\K{\_}\LOW\K{\_i8x16\_u}', r'\hex{FD}~~\hex{9E}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I16X8.\VEXTMUL\K{\_}\HIGH\K{\_i8x16\_u}', r'\hex{FD}~~\hex{9F}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - 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.\VALLTRUE', r'\hex{FD}~~\hex{A3}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), - Instruction(r'\I32X4.\VBITMASK', r'\hex{FD}~~\hex{A4}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), - Instruction(None, r'\hex{FD}~\hex{A5}~\hex{01}'), - Instruction(None, r'\hex{FD}~\hex{A6}~\hex{01}'), - Instruction(r'\I32X4.\VEXTEND\K{\_}\LOW\K{\_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\K{\_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\K{\_i16x8\_u}', r'\hex{FD}~~\hex{A9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I32X4.\VEXTEND\K{\_}\HIGH\K{\_i16x8\_u}', r'\hex{FD}~~\hex{AA}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I32X4.\VSHL', r'\hex{FD}~~\hex{AB}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), - Instruction(r'\I32X4.\VSHR\K{\_s}', r'\hex{FD}~~\hex{AC}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - Instruction(r'\I32X4.\VSHR\K{\_u}', r'\hex{FD}~~\hex{AD}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - 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'), - 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'), - Instruction(r'\I32X4.\VMAX\K{\_s}', r'\hex{FD}~~\hex{B8}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), - Instruction(r'\I32X4.\VMAX\K{\_u}', r'\hex{FD}~~\hex{B9}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), - Instruction(r'\I32X4.\VDOT\K{\_i16x8\_s}', r'\hex{FD}~~\hex{BA}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vdot'), - Instruction(r'\I32X4.\VEXTMUL\K{\_}\LOW\K{\_i16x8\_s}', r'\hex{FD}~~\hex{BC}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I32X4.\VEXTMUL\K{\_}\HIGH\K{\_i16x8\_s}', r'\hex{FD}~~\hex{BD}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I32X4.\VEXTMUL\K{\_}\LOW\K{\_i16x8\_u}', r'\hex{FD}~~\hex{BE}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I32X4.\VEXTMUL\K{\_}\HIGH\K{\_i16x8\_u}', r'\hex{FD}~~\hex{BF}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - 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.\VALLTRUE', r'\hex{FD}~~\hex{C3}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), - Instruction(r'\I64X2.\VBITMASK', r'\hex{FD}~~\hex{C4}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), - Instruction(None, r'\hex{FD}~\hex{C5}~\hex{01}'), - Instruction(None, r'\hex{FD}~\hex{C6}~\hex{01}'), - Instruction(r'\I64X2.\VEXTEND\K{\_}\LOW\K{\_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\K{\_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\K{\_i32x4\_u}', r'\hex{FD}~~\hex{C9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I64X2.\VEXTEND\K{\_}\HIGH\K{\_i32x4\_u}', r'\hex{FD}~~\hex{CA}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), - Instruction(r'\I64X2.\VSHL', r'\hex{FD}~~\hex{CB}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), - Instruction(r'\I64X2.\VSHR\K{\_s}', r'\hex{FD}~~\hex{CC}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - Instruction(r'\I64X2.\VSHR\K{\_u}', r'\hex{FD}~~\hex{CD}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), - 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'), - Instruction(r'\I64X2.\VLT\K{\_s}', r'\hex{FD}~~\hex{D8}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ilt'), - Instruction(r'\I64X2.\VGT\K{\_s}', r'\hex{FD}~~\hex{D9}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-igt'), - Instruction(r'\I64X2.\VLE\K{\_s}', r'\hex{FD}~~\hex{DA}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ile'), - Instruction(r'\I64X2.\VGE\K{\_s}', r'\hex{FD}~~\hex{DB}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ige'), - Instruction(r'\I64X2.\VEXTMUL\K{\_}\LOW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{DC}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I64X2.\VEXTMUL\K{\_}\HIGH\K{\_i32x4\_s}', r'\hex{FD}~~\hex{DD}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I64X2.\VEXTMUL\K{\_}\LOW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{DE}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - Instruction(r'\I64X2.\VEXTMUL\K{\_}\HIGH\K{\_i32x4\_u}', r'\hex{FD}~~\hex{DF}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), - 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'), - Instruction(r'\F32X4.\VMUL', r'\hex{FD}~~\hex{E6}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmul'), - Instruction(r'\F32X4.\VDIV', r'\hex{FD}~~\hex{E7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fdiv'), - Instruction(r'\F32X4.\VMIN', r'\hex{FD}~~\hex{E8}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmin'), - Instruction(r'\F32X4.\VMAX', r'\hex{FD}~~\hex{E9}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmax'), - Instruction(r'\F32X4.\VPMIN', r'\hex{FD}~~\hex{EA}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmin'), - Instruction(r'\F32X4.\VPMAX', r'\hex{FD}~~\hex{EB}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmax'), - Instruction(r'\F64X2.\VABS', r'\hex{FD}~~\hex{EC}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fabs'), - Instruction(r'\F64X2.\VNEG', r'\hex{FD}~~\hex{ED}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fneg'), - Instruction(r'\F64X2.\VSQRT', r'\hex{FD}~~\hex{EF}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fsqrt'), - Instruction(r'\F64X2.\VADD', r'\hex{FD}~~\hex{F0}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fadd'), - Instruction(r'\F64X2.\VSUB', r'\hex{FD}~~\hex{F1}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fsub'), - Instruction(r'\F64X2.\VMUL', r'\hex{FD}~~\hex{F2}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmul'), - Instruction(r'\F64X2.\VDIV', r'\hex{FD}~~\hex{F3}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fdiv'), - Instruction(r'\F64X2.\VMIN', r'\hex{FD}~~\hex{F4}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmin'), - Instruction(r'\F64X2.\VMAX', r'\hex{FD}~~\hex{F5}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmax'), - Instruction(r'\F64X2.\VPMIN', r'\hex{FD}~~\hex{F6}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmin'), - Instruction(r'\F64X2.\VPMAX', r'\hex{FD}~~\hex{F7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmax'), - Instruction(r'\I32X4.\VTRUNCSAT\K{\_f32x4\_s}', r'\hex{FD}~~\hex{F8}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), - Instruction(r'\I32X4.\VTRUNCSAT\K{\_f32x4\_u}', r'\hex{FD}~~\hex{F9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), - Instruction(r'\F32X4.\VCONVERT\K{\_i32x4\_s}', r'\hex{FD}~~\hex{FA}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), - Instruction(r'\F32X4.\VCONVERT\K{\_i32x4\_u}', r'\hex{FD}~~\hex{FB}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), - Instruction(r'\I32X4.\VTRUNCSAT\K{\_f64x2\_s\_zero}', r'\hex{FD}~~\hex{FC}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), - Instruction(r'\I32X4.\VTRUNCSAT\K{\_f64x2\_u\_zero}', r'\hex{FD}~~\hex{FD}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), - Instruction(r'\F64X2.\VCONVERT\K{\_}\LOW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{FE}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), - Instruction(r'\F64X2.\VCONVERT\K{\_}\LOW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{FF}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), - Instruction(None, r'\hex{FD}~\hex{00}~\hex{02} \dots'), - Instruction(None, r'\hex{FE}'), - Instruction(None, r'\hex{FF}'), + Instruction(1.0, r'\UNREACHABLE', r'\hex{00}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-unreachable', r'exec-unreachable'), + Instruction(1.0, r'\NOP', r'\hex{01}', r'[] \to []', r'valid-nop', r'exec-nop'), + Instruction(1.0, r'\BLOCK~\X{bt}', r'\hex{02}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-block', r'exec-block'), + Instruction(1.0, r'\LOOP~\X{bt}', r'\hex{03}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-loop', r'exec-loop'), + Instruction(1.0, r'\IF~\X{bt}', r'\hex{04}', r'[t_1^\ast~\I32] \to [t_2^\ast]', r'valid-if', r'exec-if'), + Instruction(1.0, r'\ELSE', r'\hex{05}'), + Instruction(0.0, None, r'\hex{06}'), + Instruction(0.0, None, r'\hex{07}'), + Instruction(3.0, r'\THROW~x', r'\hex{08}', r'[t_1^\ast~t_x^\ast] \to [t_2^\ast]', r'valid-throw', r'exec-throw'), + Instruction(0.0, None, r'\hex{09}'), + Instruction(3.0, r'\THROWREF', r'\hex{0A}', r'[t_1^\ast~\EXNREF] \to [t_2^\ast]', r'valid-throw_ref', r'exec-throw_ref'), + Instruction(1.0, r'\END', r'\hex{0B}'), + Instruction(1.0, r'\BR~l', r'\hex{0C}', r'[t_1^\ast~t^\ast] \to [t_2^\ast]', r'valid-br', r'exec-br'), + Instruction(1.0, r'\BRIF~l', r'\hex{0D}', r'[t^\ast~\I32] \to [t^\ast]', r'valid-br_if', r'exec-br_if'), + Instruction(1.0, r'\BRTABLE~l^\ast~l', r'\hex{0E}', r'[t_1^\ast~t^\ast~\I32] \to [t_2^\ast]', r'valid-br_table', r'exec-br_table'), + Instruction(1.0, r'\RETURN', r'\hex{0F}', r'[t_1^\ast~t^\ast] \to [t_2^\ast]', r'valid-return', r'exec-return'), + Instruction(1.0, r'\CALL~x', r'\hex{10}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-call', r'exec-call'), + Instruction(1.0, r'\CALLINDIRECT~x~y', r'\hex{11}', r'[t_1^\ast~\I32] \to [t_2^\ast]', r'valid-call_indirect', r'exec-call_indirect'), + Instruction(3.0, r'\RETURNCALL~x', r'\hex{12}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-return_call', r'exec-return_call'), + Instruction(3.0, r'\RETURNCALLINDIRECT~x~y', r'\hex{13}', r'[t_1^\ast~\I32] \to [t_2^\ast]', r'valid-return_call_indirect', r'exec-return_call_indirect'), + Instruction(3.0, r'\CALLREF~x', r'\hex{14}', r'[t_1^\ast~(\REF~\NULL~x)] \to [t_2^\ast]', r'valid-call_ref', r'exec-call_ref'), + Instruction(3.0, r'\RETURNCALLREF~x', r'\hex{15}', r'[t_1^\ast~(\REF~\NULL~x)] \to [t_2^\ast]', r'valid-return_call_ref', r'exec-return_call_ref'), + Instruction(0.0, None, r'\hex{16}'), + Instruction(0.0, None, r'\hex{17}'), + Instruction(0.0, None, r'\hex{18}'), + Instruction(0.0, None, r'\hex{19}'), + Instruction(1.0, r'\DROP', r'\hex{1A}', r'[t] \to []', r'valid-drop', r'exec-drop'), + Instruction(1.0, r'\SELECT', r'\hex{1B}', r'[t~t~\I32] \to [t]', r'valid-select', r'exec-select'), + Instruction(2.0, r'\SELECT~t', r'\hex{1C}', r'[t~t~\I32] \to [t]', r'valid-select', r'exec-select'), + Instruction(0.0, None, r'\hex{1D}'), + Instruction(0.0, None, r'\hex{1E}'), + Instruction(3.0, r'\TRYTABLE~\X{bt}', r'\hex{1F}', r'[t_1^\ast] \to [t_2^\ast]', r'valid-try_table', r'exec-try_table'), + Instruction(1.0, r'\LOCALGET~x', r'\hex{20}', r'[] \to [t]', r'valid-local.get', r'exec-local.get'), + Instruction(1.0, r'\LOCALSET~x', r'\hex{21}', r'[t] \to []', r'valid-local.set', r'exec-local.set'), + Instruction(1.0, r'\LOCALTEE~x', r'\hex{22}', r'[t] \to [t]', r'valid-local.tee', r'exec-local.tee'), + Instruction(1.0, r'\GLOBALGET~x', r'\hex{23}', r'[] \to [t]', r'valid-global.get', r'exec-global.get'), + Instruction(1.0, r'\GLOBALSET~x', r'\hex{24}', r'[t] \to []', r'valid-global.set', r'exec-global.set'), + Instruction(2.0, r'\TABLEGET~x', r'\hex{25}', r'[\I32] \to [t]', r'valid-table.get', r'exec-table.get'), + Instruction(2.0, r'\TABLESET~x', r'\hex{26}', r'[\I32~t] \to []', r'valid-table.set', r'exec-table.set'), + Instruction(0.0, None, r'\hex{27}'), + Instruction(1.0, r'\I32.\LOAD~x~\memarg', r'\hex{28}', r'[\I32] \to [\I32]', r'valid-load-val', r'exec-load-val'), + Instruction(1.0, r'\I64.\LOAD~x~\memarg', r'\hex{29}', r'[\I32] \to [\I64]', r'valid-load-val', r'exec-load-val'), + Instruction(1.0, r'\F32.\LOAD~x~\memarg', r'\hex{2A}', r'[\I32] \to [\F32]', r'valid-load-val', r'exec-load-val'), + Instruction(1.0, r'\F64.\LOAD~x~\memarg', r'\hex{2B}', r'[\I32] \to [\F64]', r'valid-load-val', r'exec-load-val'), + Instruction(1.0, r'\I32.\LOAD\K{8\_s}~x~\memarg', r'\hex{2C}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I32.\LOAD\K{8\_u}~x~\memarg', r'\hex{2D}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I32.\LOAD\K{16\_s}~x~\memarg', r'\hex{2E}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I32.\LOAD\K{16\_u}~x~\memarg', r'\hex{2F}', r'[\I32] \to [\I32]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I64.\LOAD\K{8\_s}~x~\memarg', r'\hex{30}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I64.\LOAD\K{8\_u}~x~\memarg', r'\hex{31}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I64.\LOAD\K{16\_s}~x~\memarg', r'\hex{32}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I64.\LOAD\K{16\_u}~x~\memarg', r'\hex{33}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I64.\LOAD\K{32\_s}~x~\memarg', r'\hex{34}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I64.\LOAD\K{32\_u}~x~\memarg', r'\hex{35}', r'[\I32] \to [\I64]', r'valid-load-pack', r'exec-load-pack'), + Instruction(1.0, r'\I32.\STORE~x~\memarg', r'\hex{36}', r'[\I32~\I32] \to []', r'valid-store-val', r'exec-store-val'), + Instruction(1.0, r'\I64.\STORE~x~\memarg', r'\hex{37}', r'[\I32~\I64] \to []', r'valid-store-val', r'exec-store-val'), + Instruction(1.0, r'\F32.\STORE~x~\memarg', r'\hex{38}', r'[\I32~\F32] \to []', r'valid-store-val', r'exec-store-val'), + Instruction(1.0, r'\F64.\STORE~x~\memarg', r'\hex{39}', r'[\I32~\F64] \to []', r'valid-store-val', r'exec-store-val'), + Instruction(1.0, r'\I32.\STORE\K{8}~x~\memarg', r'\hex{3A}', r'[\I32~\I32] \to []', r'valid-store-pack', r'exec-store-pack'), + Instruction(1.0, r'\I32.\STORE\K{16}~x~\memarg', r'\hex{3B}', r'[\I32~\I32] \to []', r'valid-store-pack', r'exec-store-pack'), + Instruction(1.0, r'\I64.\STORE\K{8}~x~\memarg', r'\hex{3C}', r'[\I32~\I64] \to []', r'valid-store-pack', r'exec-store-pack'), + Instruction(1.0, r'\I64.\STORE\K{16}~x~\memarg', r'\hex{3D}', r'[\I32~\I64] \to []', r'valid-store-pack', r'exec-store-pack'), + Instruction(1.0, r'\I64.\STORE\K{32}~x~\memarg', r'\hex{3E}', r'[\I32~\I64] \to []', r'valid-store-pack', r'exec-store-pack'), + Instruction(1.0, r'\MEMORYSIZE~x', r'\hex{3F}', r'[] \to [\I32]', r'valid-memory.size', r'exec-memory.size'), + Instruction(1.0, r'\MEMORYGROW~x', r'\hex{40}', r'[\I32] \to [\I32]', r'valid-memory.grow', r'exec-memory.grow'), + Instruction(1.0, r'\I32.\CONST~\i32', r'\hex{41}', r'[] \to [\I32]', r'valid-const', r'exec-const'), + Instruction(1.0, r'\I64.\CONST~\i64', r'\hex{42}', r'[] \to [\I64]', r'valid-const', r'exec-const'), + Instruction(1.0, r'\F32.\CONST~\f32', r'\hex{43}', r'[] \to [\F32]', r'valid-const', r'exec-const'), + Instruction(1.0, r'\F64.\CONST~\f64', r'\hex{44}', r'[] \to [\F64]', r'valid-const', r'exec-const'), + Instruction(1.0, r'\I32.\EQZ', r'\hex{45}', r'[\I32] \to [\I32]', r'valid-testop', r'exec-testop', r'op-ieqz'), + Instruction(1.0, r'\I32.\EQ', r'\hex{46}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ieq'), + Instruction(1.0, r'\I32.\NE', r'\hex{47}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ine'), + Instruction(1.0, r'\I32.\LT\K{\_s}', r'\hex{48}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), + Instruction(1.0, r'\I32.\LT\K{\_u}', r'\hex{49}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), + Instruction(1.0, r'\I32.\GT\K{\_s}', r'\hex{4A}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), + Instruction(1.0, r'\I32.\GT\K{\_u}', r'\hex{4B}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), + Instruction(1.0, r'\I32.\LE\K{\_s}', r'\hex{4C}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), + Instruction(1.0, r'\I32.\LE\K{\_u}', r'\hex{4D}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), + Instruction(1.0, r'\I32.\GE\K{\_s}', r'\hex{4E}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), + Instruction(1.0, r'\I32.\GE\K{\_u}', r'\hex{4F}', r'[\I32~\I32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), + Instruction(1.0, r'\I64.\EQZ', r'\hex{50}', r'[\I64] \to [\I32]', r'valid-testop', r'exec-testop', r'op-ieqz'), + Instruction(1.0, r'\I64.\EQ', r'\hex{51}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ieq'), + Instruction(1.0, r'\I64.\NE', r'\hex{52}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ine'), + Instruction(1.0, r'\I64.\LT\K{\_s}', r'\hex{53}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), + Instruction(1.0, r'\I64.\LT\K{\_u}', r'\hex{54}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ilt'), + Instruction(1.0, r'\I64.\GT\K{\_s}', r'\hex{55}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), + Instruction(1.0, r'\I64.\GT\K{\_u}', r'\hex{56}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-igt'), + Instruction(1.0, r'\I64.\LE\K{\_s}', r'\hex{57}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), + Instruction(1.0, r'\I64.\LE\K{\_u}', r'\hex{58}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ile'), + Instruction(1.0, r'\I64.\GE\K{\_s}', r'\hex{59}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), + Instruction(1.0, r'\I64.\GE\K{\_u}', r'\hex{5A}', r'[\I64~\I64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-ige'), + Instruction(1.0, r'\F32.\EQ', r'\hex{5B}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-feq'), + Instruction(1.0, r'\F32.\NE', r'\hex{5C}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fne'), + Instruction(1.0, r'\F32.\LT', r'\hex{5D}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-flt'), + Instruction(1.0, r'\F32.\GT', r'\hex{5E}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fgt'), + Instruction(1.0, r'\F32.\LE', r'\hex{5F}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fle'), + Instruction(1.0, r'\F32.\GE', r'\hex{60}', r'[\F32~\F32] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fge'), + Instruction(1.0, r'\F64.\EQ', r'\hex{61}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-feq'), + Instruction(1.0, r'\F64.\NE', r'\hex{62}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fne'), + Instruction(1.0, r'\F64.\LT', r'\hex{63}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-flt'), + Instruction(1.0, r'\F64.\GT', r'\hex{64}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fgt'), + Instruction(1.0, r'\F64.\LE', r'\hex{65}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fle'), + Instruction(1.0, r'\F64.\GE', r'\hex{66}', r'[\F64~\F64] \to [\I32]', r'valid-relop', r'exec-relop', r'op-fge'), + Instruction(1.0, r'\I32.\CLZ', r'\hex{67}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-iclz'), + Instruction(1.0, r'\I32.\CTZ', r'\hex{68}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-ictz'), + Instruction(1.0, r'\I32.\POPCNT', r'\hex{69}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-ipopcnt'), + Instruction(1.0, r'\I32.\ADD', r'\hex{6A}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-iadd'), + Instruction(1.0, r'\I32.\SUB', r'\hex{6B}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-isub'), + Instruction(1.0, r'\I32.\MUL', r'\hex{6C}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-imul'), + Instruction(1.0, r'\I32.\DIV\K{\_s}', r'\hex{6D}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-idiv'), + Instruction(1.0, r'\I32.\DIV\K{\_u}', r'\hex{6E}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-idiv'), + Instruction(1.0, r'\I32.\REM\K{\_s}', r'\hex{6F}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irem'), + Instruction(1.0, r'\I32.\REM\K{\_u}', r'\hex{70}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irem'), + Instruction(1.0, r'\I32.\AND', r'\hex{71}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-iand'), + Instruction(1.0, r'\I32.\OR', r'\hex{72}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ior'), + Instruction(1.0, r'\I32.\XOR', r'\hex{73}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ixor'), + Instruction(1.0, r'\I32.\SHL', r'\hex{74}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ishl'), + Instruction(1.0, r'\I32.\SHR\K{\_s}', r'\hex{75}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ishr'), + Instruction(1.0, r'\I32.\SHR\K{\_u}', r'\hex{76}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-ishr'), + Instruction(1.0, r'\I32.\ROTL', r'\hex{77}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irotl'), + Instruction(1.0, r'\I32.\ROTR', r'\hex{78}', r'[\I32~\I32] \to [\I32]', r'valid-binop', r'exec-binop', r'op-irotr'), + Instruction(1.0, r'\I64.\CLZ', r'\hex{79}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iclz'), + Instruction(1.0, r'\I64.\CTZ', r'\hex{7A}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-ictz'), + Instruction(1.0, r'\I64.\POPCNT', r'\hex{7B}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-ipopcnt'), + Instruction(1.0, r'\I64.\ADD', r'\hex{7C}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-iadd'), + Instruction(1.0, r'\I64.\SUB', r'\hex{7D}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-isub'), + Instruction(1.0, r'\I64.\MUL', r'\hex{7E}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-imul'), + Instruction(1.0, r'\I64.\DIV\K{\_s}', r'\hex{7F}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-idiv'), + Instruction(1.0, r'\I64.\DIV\K{\_u}', r'\hex{80}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-idiv'), + Instruction(1.0, r'\I64.\REM\K{\_s}', r'\hex{81}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irem'), + Instruction(1.0, r'\I64.\REM\K{\_u}', r'\hex{82}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irem'), + Instruction(1.0, r'\I64.\AND', r'\hex{83}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-iand'), + Instruction(1.0, r'\I64.\OR', r'\hex{84}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ior'), + Instruction(1.0, r'\I64.\XOR', r'\hex{85}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ixor'), + Instruction(1.0, r'\I64.\SHL', r'\hex{86}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ishl'), + Instruction(1.0, r'\I64.\SHR\K{\_s}', r'\hex{87}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ishr'), + Instruction(1.0, r'\I64.\SHR\K{\_u}', r'\hex{88}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-ishr'), + Instruction(1.0, r'\I64.\ROTL', r'\hex{89}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irotl'), + Instruction(1.0, r'\I64.\ROTR', r'\hex{8A}', r'[\I64~\I64] \to [\I64]', r'valid-binop', r'exec-binop', r'op-irotr'), + Instruction(1.0, r'\F32.\ABS', r'\hex{8B}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fabs'), + Instruction(1.0, r'\F32.\NEG', r'\hex{8C}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fneg'), + Instruction(1.0, r'\F32.\CEIL', r'\hex{8D}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fceil'), + Instruction(1.0, r'\F32.\FLOOR', r'\hex{8E}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-ffloor'), + Instruction(1.0, r'\F32.\TRUNC', r'\hex{8F}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-ftrunc'), + Instruction(1.0, r'\F32.\NEAREST', r'\hex{90}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fnearest'), + Instruction(1.0, r'\F32.\SQRT', r'\hex{91}', r'[\F32] \to [\F32]', r'valid-unop', r'exec-unop', r'op-fsqrt'), + Instruction(1.0, r'\F32.\ADD', r'\hex{92}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fadd'), + Instruction(1.0, r'\F32.\SUB', r'\hex{93}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fsub'), + Instruction(1.0, r'\F32.\MUL', r'\hex{94}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fmul'), + Instruction(1.0, r'\F32.\DIV', r'\hex{95}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fdiv'), + Instruction(1.0, r'\F32.\FMIN', r'\hex{96}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fmin'), + Instruction(1.0, r'\F32.\FMAX', r'\hex{97}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fmax'), + Instruction(1.0, r'\F32.\COPYSIGN', r'\hex{98}', r'[\F32~\F32] \to [\F32]', r'valid-binop', r'exec-binop', r'op-fcopysign'), + Instruction(1.0, r'\F64.\ABS', r'\hex{99}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fabs'), + Instruction(1.0, r'\F64.\NEG', r'\hex{9A}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fneg'), + Instruction(1.0, r'\F64.\CEIL', r'\hex{9B}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fceil'), + Instruction(1.0, r'\F64.\FLOOR', r'\hex{9C}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-ffloor'), + Instruction(1.0, r'\F64.\TRUNC', r'\hex{9D}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-ftrunc'), + Instruction(1.0, r'\F64.\NEAREST', r'\hex{9E}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fnearest'), + Instruction(1.0, r'\F64.\SQRT', r'\hex{9F}', r'[\F64] \to [\F64]', r'valid-unop', r'exec-unop', r'op-fsqrt'), + Instruction(1.0, r'\F64.\ADD', r'\hex{A0}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fadd'), + Instruction(1.0, r'\F64.\SUB', r'\hex{A1}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fsub'), + Instruction(1.0, r'\F64.\MUL', r'\hex{A2}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fmul'), + Instruction(1.0, r'\F64.\DIV', r'\hex{A3}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fdiv'), + Instruction(1.0, r'\F64.\FMIN', r'\hex{A4}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fmin'), + Instruction(1.0, r'\F64.\FMAX', r'\hex{A5}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fmax'), + Instruction(1.0, r'\F64.\COPYSIGN', r'\hex{A6}', r'[\F64~\F64] \to [\F64]', r'valid-binop', r'exec-binop', r'op-fcopysign'), + Instruction(1.0, r'\I32.\WRAP\K{\_}\I64', r'\hex{A7}', r'[\I64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-wrap'), + Instruction(1.0, r'\I32.\TRUNC\K{\_}\F32\K{\_s}', r'\hex{A8}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I32.\TRUNC\K{\_}\F32\K{\_u}', r'\hex{A9}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I32.\TRUNC\K{\_}\F64\K{\_s}', r'\hex{AA}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I32.\TRUNC\K{\_}\F64\K{\_u}', r'\hex{AB}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I64.\EXTEND\K{\_}\I32\K{\_s}', r'\hex{AC}', r'[\I32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-extend'), + Instruction(1.0, r'\I64.\EXTEND\K{\_}\I32\K{\_u}', r'\hex{AD}', r'[\I32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-extend'), + Instruction(1.0, r'\I64.\TRUNC\K{\_}\F32\K{\_s}', r'\hex{AE}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I64.\TRUNC\K{\_}\F32\K{\_u}', r'\hex{AF}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I64.\TRUNC\K{\_}\F64\K{\_s}', r'\hex{B0}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\I64.\TRUNC\K{\_}\F64\K{\_u}', r'\hex{B1}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc'), + Instruction(1.0, r'\F32.\CONVERT\K{\_}\I32\K{\_s}', r'\hex{B2}', r'[\I32] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F32.\CONVERT\K{\_}\I32\K{\_u}', r'\hex{B3}', r'[\I32] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F32.\CONVERT\K{\_}\I64\K{\_s}', r'\hex{B4}', r'[\I64] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F32.\CONVERT\K{\_}\I64\K{\_u}', r'\hex{B5}', r'[\I64] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F32.\DEMOTE\K{\_}\F64', r'\hex{B6}', r'[\F64] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-demote'), + Instruction(1.0, r'\F64.\CONVERT\K{\_}\I32\K{\_s}', r'\hex{B7}', r'[\I32] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F64.\CONVERT\K{\_}\I32\K{\_u}', r'\hex{B8}', r'[\I32] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F64.\CONVERT\K{\_}\I64\K{\_s}', r'\hex{B9}', r'[\I64] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F64.\CONVERT\K{\_}\I64\K{\_u}', r'\hex{BA}', r'[\I64] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert'), + Instruction(1.0, r'\F64.\PROMOTE\K{\_}\F32', r'\hex{BB}', r'[\F32] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-promote'), + Instruction(1.0, r'\I32.\REINTERPRET\K{\_}\F32', r'\hex{BC}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), + Instruction(1.0, r'\I64.\REINTERPRET\K{\_}\F64', r'\hex{BD}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), + Instruction(1.0, r'\F32.\REINTERPRET\K{\_}\I32', r'\hex{BE}', r'[\I32] \to [\F32]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), + Instruction(1.0, r'\F64.\REINTERPRET\K{\_}\I64', r'\hex{BF}', r'[\I64] \to [\F64]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'), + Instruction(2.0, r'\I32.\EXTEND\K{8\_s}', r'\hex{C0}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-iextendn'), + Instruction(2.0, r'\I32.\EXTEND\K{16\_s}', r'\hex{C1}', r'[\I32] \to [\I32]', r'valid-unop', r'exec-unop', r'op-iextendn'), + Instruction(2.0, r'\I64.\EXTEND\K{8\_s}', r'\hex{C2}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iextendn'), + Instruction(2.0, r'\I64.\EXTEND\K{16\_s}', r'\hex{C3}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iextendn'), + Instruction(2.0, r'\I64.\EXTEND\K{32\_s}', r'\hex{C4}', r'[\I64] \to [\I64]', r'valid-unop', r'exec-unop', r'op-iextendn'), + Instruction(0.0, None, r'\hex{C5}'), + Instruction(0.0, None, r'\hex{C6}'), + Instruction(0.0, None, r'\hex{C7}'), + Instruction(0.0, None, r'\hex{C8}'), + Instruction(0.0, None, r'\hex{C9}'), + Instruction(0.0, None, r'\hex{CA}'), + Instruction(0.0, None, r'\hex{CB}'), + Instruction(0.0, None, r'\hex{CC}'), + Instruction(0.0, None, r'\hex{CD}'), + Instruction(0.0, None, r'\hex{CE}'), + Instruction(0.0, None, r'\hex{CF}'), + Instruction(2.0, r'\REFNULL~\X{ht}', r'\hex{D0}', r'[] \to [(\REF~\NULL~\X{ht})]', r'valid-ref.null', r'exec-ref.null'), + Instruction(2.0, r'\REFISNULL', r'\hex{D1}', r'[(\REF~\NULL~\X{ht})] \to [\I32]', r'valid-ref.is_null', r'exec-ref.is_null'), + Instruction(2.0, r'\REFFUNC~x', r'\hex{D2}', r'[] \to [\REF~\X{ht}]', r'valid-ref.func', r'exec-ref.func'), + Instruction(3.0, r'\REFEQ', r'\hex{D3}', r'[\EQREF~\EQREF] \to [\I32]', r'valid-ref.eq', r'exec-ref.eq'), + Instruction(3.0, r'\REFASNONNULL', r'\hex{D4}', r'[(\REF~\NULL~\X{ht})] \to [(\REF~\X{ht})]', r'valid-ref.as_non_null', r'exec-ref.as_non_null'), + Instruction(3.0, r'\BRONNULL~l', r'\hex{D5}', r'[t^\ast~(\REF~\NULL~\X{ht})] \to [t^\ast~(\REF~\X{ht})]', r'valid-br_on_null', r'exec-br_on_null'), + Instruction(3.0, r'\BRONNONNULL~l', r'\hex{D6}', r'[t^\ast~(\REF~\NULL~\X{ht})] \to [t^\ast]', r'valid-br_on_non_null', r'exec-br_on_non_null'), + Instruction(0.0, None, r'\hex{D7}'), + Instruction(0.0, None, r'\hex{D8}'), + Instruction(0.0, None, r'\hex{D9}'), + Instruction(0.0, None, r'\hex{DA}'), + Instruction(0.0, None, r'\hex{DB}'), + Instruction(0.0, None, r'\hex{DC}'), + Instruction(0.0, None, r'\hex{DD}'), + Instruction(0.0, None, r'\hex{DE}'), + Instruction(0.0, None, r'\hex{DF}'), + Instruction(0.0, None, r'\hex{E0}'), + Instruction(0.0, None, r'\hex{E1}'), + Instruction(0.0, None, r'\hex{E2}'), + Instruction(0.0, None, r'\hex{E3}'), + Instruction(0.0, None, r'\hex{E4}'), + Instruction(0.0, None, r'\hex{E5}'), + Instruction(0.0, None, r'\hex{E6}'), + Instruction(0.0, None, r'\hex{E7}'), + Instruction(0.0, None, r'\hex{E8}'), + Instruction(0.0, None, r'\hex{E9}'), + Instruction(0.0, None, r'\hex{EA}'), + Instruction(0.0, None, r'\hex{EB}'), + Instruction(0.0, None, r'\hex{EC}'), + Instruction(0.0, None, r'\hex{ED}'), + Instruction(0.0, None, r'\hex{EE}'), + Instruction(0.0, None, r'\hex{EF}'), + Instruction(0.0, None, r'\hex{F0}'), + Instruction(0.0, None, r'\hex{F1}'), + Instruction(0.0, None, r'\hex{F2}'), + Instruction(0.0, None, r'\hex{F3}'), + Instruction(0.0, None, r'\hex{F4}'), + Instruction(0.0, None, r'\hex{F5}'), + Instruction(0.0, None, r'\hex{F6}'), + Instruction(0.0, None, r'\hex{F7}'), + Instruction(0.0, None, r'\hex{F8}'), + Instruction(0.0, None, r'\hex{F9}'), + Instruction(0.0, None, r'\hex{FA}'), + Instruction(3.0, r'\STRUCTNEW~x', r'\hex{FB}~\hex{00}', r'[t^\ast] \to [(\REF~x)]', r'valid-struct.new', r'exec-struct.new'), + Instruction(3.0, r'\STRUCTNEWDEFAULT~x', r'\hex{FB}~\hex{01}', r'[] \to [(\REF~x)]', r'valid-struct.new_default', r'exec-struct.new_default'), + Instruction(3.0, r'\STRUCTGET~x~y', r'\hex{FB}~\hex{02}', r'[(\REF~\NULL~x)] \to [t]', r'valid-struct.get', r'exec-struct.get'), + Instruction(3.0, r'\STRUCTGETS~x~y', r'\hex{FB}~\hex{03}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), + Instruction(3.0, r'\STRUCTGETU~x~y', r'\hex{FB}~\hex{04}', r'[(\REF~\NULL~x)] \to [\I32]', r'valid-struct.get', r'exec-struct.get'), + Instruction(3.0, r'\STRUCTSET~x~y', r'\hex{FB}~\hex{05}', r'[(\REF~\NULL~x)~t] \to []', r'valid-struct.set', r'exec-struct.set'), + Instruction(3.0, r'\ARRAYNEW~x', r'\hex{FB}~\hex{06}', r'[t] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'), + Instruction(3.0, r'\ARRAYNEWDEFAULT~x', r'\hex{FB}~\hex{07}', r'[\I32] \to [(\REF~x)]', r'valid-array.new', r'exec-array.new'), + Instruction(3.0, 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(3.0, 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(3.0, 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(3.0, r'\ARRAYGET~x', r'\hex{FB}~\hex{0B}', r'[(\REF~\NULL~x)~\I32] \to [t]', r'valid-array.get', r'exec-array.get'), + Instruction(3.0, r'\ARRAYGETS~x', r'\hex{FB}~\hex{0C}', r'[(\REF~\NULL~x)~\I32] \to [\I32]', r'valid-array.get', r'exec-array.get'), + Instruction(3.0, r'\ARRAYGETU~x', r'\hex{FB}~\hex{0D}', r'[(\REF~\NULL~x)~\I32] \to [\I32]', r'valid-array.get', r'exec-array.get'), + Instruction(3.0, r'\ARRAYSET~x', r'\hex{FB}~\hex{0E}', r'[(\REF~\NULL~x)~\I32~t] \to []', r'valid-array.set', r'exec-array.set'), + Instruction(3.0, r'\ARRAYLEN', r'\hex{FB}~\hex{0F}', r'[(\REF~\NULL~\ARRAY)] \to [\I32]', r'valid-array.len', r'exec-array.len'), + Instruction(3.0, 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(3.0, 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(3.0, 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(3.0, 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(3.0, r'\REFTEST~(\REF~t)', r'\hex{FB}~\hex{14}', r"[(\REF~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'), + Instruction(3.0, 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(3.0, r'\REFCAST~(\REF~t)', r'\hex{FB}~\hex{16}', r"[(\REF~t')] \to [(\REF~t)]", r'valid-ref.cast', r'exec-ref.cast'), + Instruction(3.0, 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(3.0, 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(3.0, 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(3.0, r'\ANYCONVERTEXTERN', r'\hex{FB}~\hex{1A}', r'[(\REF~\NULL~\EXTERN)] \to [(\REF~\NULL~\ANY)]', r'valid-any.convert_extern', r'exec-any.convert_extern'), + Instruction(3.0, r'\EXTERNCONVERTANY', r'\hex{FB}~\hex{1B}', r'[(\REF~\NULL~\ANY)] \to [(\REF~\NULL~\EXTERN)]', r'valid-extern.convert_any', r'exec-extern.convert_any'), + Instruction(3.0, r'\REFI31', r'\hex{FB}~\hex{1C}', r'[\I32] \to [(\REF~\I31)]', r'valid-ref.i31', r'exec-ref.i31'), + Instruction(3.0, r'\I31GETS', r'\hex{FB}~\hex{1D}', r'[\I31REF] \to [\I32]', r'valid-i31.get_sx', r'exec-i31.get_sx'), + Instruction(3.0, r'\I31GETU', r'\hex{FB}~\hex{1E}', r'[\I31REF] \to [\I32]', r'valid-i31.get_sx', r'exec-i31.get_sx'), + Instruction(0.0, None, r'\hex{FB}~\hex{1E} \dots'), + Instruction(2.0, 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'), + Instruction(2.0, 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'), + Instruction(2.0, 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'), + Instruction(2.0, r'\I32.\TRUNC\K{\_sat\_}\F64\K{\_u}', r'\hex{FC}~\hex{03}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), + Instruction(2.0, r'\I64.\TRUNC\K{\_sat\_}\F32\K{\_s}', r'\hex{FC}~\hex{04}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), + Instruction(2.0, r'\I64.\TRUNC\K{\_sat\_}\F32\K{\_u}', r'\hex{FC}~\hex{05}', r'[\F32] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), + Instruction(2.0, r'\I64.\TRUNC\K{\_sat\_}\F64\K{\_s}', r'\hex{FC}~\hex{06}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), + Instruction(2.0, r'\I64.\TRUNC\K{\_sat\_}\F64\K{\_u}', r'\hex{FC}~\hex{07}', r'[\F64] \to [\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), + Instruction(2.0, r'\MEMORYINIT~x~y', r'\hex{FC}~\hex{08}', r'[\I32~\I32~\I32] \to []', r'valid-memory.init', r'exec-memory.init'), + Instruction(2.0, r'\DATADROP~x', r'\hex{FC}~\hex{09}', r'[] \to []', r'valid-data.drop', r'exec-data.drop'), + Instruction(2.0, r'\MEMORYCOPY~x~y', r'\hex{FC}~\hex{0A}', r'[\I32~\I32~\I32] \to []', r'valid-memory.copy', r'exec-memory.copy'), + Instruction(2.0, r'\MEMORYFILL~y', r'\hex{FC}~\hex{0B}', r'[\I32~\I32~\I32] \to []', r'valid-memory.fill', r'exec-memory.fill'), + Instruction(2.0, r'\TABLEINIT~x~y', r'\hex{FC}~\hex{0C}', r'[\I32~\I32~\I32] \to []', r'valid-table.init', r'exec-table.init'), + Instruction(2.0, r'\ELEMDROP~x', r'\hex{FC}~\hex{0D}', r'[] \to []', r'valid-elem.drop', r'exec-elem.drop'), + Instruction(2.0, r'\TABLECOPY~x~y', r'\hex{FC}~\hex{0E}', r'[\I32~\I32~\I32] \to []', r'valid-table.copy', r'exec-table.copy'), + Instruction(2.0, r'\TABLEGROW~x', r'\hex{FC}~\hex{0F}', r'[t~\I32] \to [\I32]', r'valid-table.grow', r'exec-table.grow'), + Instruction(2.0, r'\TABLESIZE~x', r'\hex{FC}~\hex{10}', r'[] \to [\I32]', r'valid-table.size', r'exec-table.size'), + Instruction(2.0, r'\TABLEFILL~x', r'\hex{FC}~\hex{11}', r'[\I32~t~\I32] \to []', r'valid-table.fill', r'exec-table.fill'), + Instruction(0.0, None, r'\hex{FC}~\hex{1E} \dots'), + Instruction(2.0, r'\V128.\VLOAD~x~\memarg', r'\hex{FD}~~\hex{00}', r'[\I32] \to [\V128]', r'valid-vload-val', r'exec-vload-val'), + Instruction(2.0, r'\V128.\VLOAD\K{8x8\_s}~x~\memarg', r'\hex{FD}~~\hex{01}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), + Instruction(2.0, r'\V128.\VLOAD\K{8x8\_u}~x~\memarg', r'\hex{FD}~~\hex{02}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), + Instruction(2.0, r'\V128.\VLOAD\K{16x4\_s}~x~\memarg', r'\hex{FD}~~\hex{03}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), + Instruction(2.0, r'\V128.\VLOAD\K{16x4\_u}~x~\memarg', r'\hex{FD}~~\hex{04}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), + Instruction(2.0, r'\V128.\VLOAD\K{32x2\_s}~x~\memarg', r'\hex{FD}~~\hex{05}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), + Instruction(2.0, r'\V128.\VLOAD\K{32x2\_u}~x~\memarg', r'\hex{FD}~~\hex{06}', r'[\I32] \to [\V128]', r'valid-vload-pack', r'exec-vload-pack'), + Instruction(2.0, r'\V128.\VLOAD\K{8\_splat}~x~\memarg', r'\hex{FD}~~\hex{07}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), + Instruction(2.0, r'\V128.\VLOAD\K{16\_splat}~x~\memarg', r'\hex{FD}~~\hex{08}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), + Instruction(2.0, r'\V128.\VLOAD\K{32\_splat}~x~\memarg', r'\hex{FD}~~\hex{09}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), + Instruction(2.0, r'\V128.\VLOAD\K{64\_splat}~x~\memarg', r'\hex{FD}~~\hex{0A}', r'[\I32] \to [\V128]', r'valid-vload-splat', r'exec-vload-splat'), + Instruction(2.0, r'\V128.\VSTORE~x~\memarg', r'\hex{FD}~~\hex{0B}', r'[\I32~\V128] \to []', r'valid-vstore', r'exec-vstore'), + Instruction(2.0, r'\V128.\VCONST~\i128', r'\hex{FD}~~\hex{0C}', r'[] \to [\V128]', r'valid-vconst', r'exec-vconst'), + Instruction(2.0, r'\I8X16.\VSHUFFLE~\laneidx^{16}', r'\hex{FD}~~\hex{0D}', r'[\V128~\V128] \to [\V128]', r'valid-vshuffle', r'exec-vshuffle'), + Instruction(2.0, r'\I8X16.\VSWIZZLE', r'\hex{FD}~~\hex{0E}', r'[\V128~\V128] \to [\V128]', r'valid-vswizzlop', r'exec-vswizzlop'), + Instruction(2.0, r'\I8X16.\VSPLAT', r'\hex{FD}~~\hex{0F}', r'[\I32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), + Instruction(2.0, r'\I16X8.\VSPLAT', r'\hex{FD}~~\hex{10}', r'[\I32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), + Instruction(2.0, r'\I32X4.\VSPLAT', r'\hex{FD}~~\hex{11}', r'[\I32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), + Instruction(2.0, r'\I64X2.\VSPLAT', r'\hex{FD}~~\hex{12}', r'[\I64] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), + Instruction(2.0, r'\F32X4.\VSPLAT', r'\hex{FD}~~\hex{13}', r'[\F32] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), + Instruction(2.0, r'\F64X2.\VSPLAT', r'\hex{FD}~~\hex{14}', r'[\F64] \to [\V128]', r'valid-vsplat', r'exec-vsplat'), + Instruction(2.0, r'\I8X16.\VEXTRACTLANE\K{\_s}~\laneidx', r'\hex{FD}~~\hex{15}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\I8X16.\VEXTRACTLANE\K{\_u}~\laneidx', r'\hex{FD}~~\hex{16}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\I8X16.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{17}', r'[\V128~\I32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), + Instruction(2.0, r'\I16X8.\VEXTRACTLANE\K{\_s}~\laneidx', r'\hex{FD}~~\hex{18}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\I16X8.\VEXTRACTLANE\K{\_u}~\laneidx', r'\hex{FD}~~\hex{19}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\I16X8.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{1A}', r'[\V128~\I32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), + Instruction(2.0, r'\I32X4.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{1B}', r'[\V128] \to [\I32]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\I32X4.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{1C}', r'[\V128~\I32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), + Instruction(2.0, r'\I64X2.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{1D}', r'[\V128] \to [\I64]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\I64X2.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{1E}', r'[\V128~\I64] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), + Instruction(2.0, r'\F32X4.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{1F}', r'[\V128] \to [\F32]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\F32X4.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{20}', r'[\V128~\F32] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), + Instruction(2.0, r'\F64X2.\VEXTRACTLANE~\laneidx', r'\hex{FD}~~\hex{21}', r'[\V128] \to [\F64]', r'valid-vextract_lane', r'exec-vextract_lane'), + Instruction(2.0, r'\F64X2.\VREPLACELANE~\laneidx', r'\hex{FD}~~\hex{22}', r'[\V128~\F64] \to [\V128]', r'valid-vreplace_lane', r'exec-vreplace_lane'), + Instruction(2.0, r'\I8X16.\VEQ', r'\hex{FD}~~\hex{23}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ieq'), + Instruction(2.0, r'\I8X16.\VNE', r'\hex{FD}~~\hex{24}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ine'), + Instruction(2.0, r'\I8X16.\VLT\K{\_s}', r'\hex{FD}~~\hex{25}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), + Instruction(2.0, r'\I8X16.\VLT\K{\_u}', r'\hex{FD}~~\hex{26}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), + Instruction(2.0, r'\I8X16.\VGT\K{\_s}', r'\hex{FD}~~\hex{27}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), + Instruction(2.0, r'\I8X16.\VGT\K{\_u}', r'\hex{FD}~~\hex{28}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), + Instruction(2.0, r'\I8X16.\VLE\K{\_s}', r'\hex{FD}~~\hex{29}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), + Instruction(2.0, r'\I8X16.\VLE\K{\_u}', r'\hex{FD}~~\hex{2A}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), + Instruction(2.0, r'\I8X16.\VGE\K{\_s}', r'\hex{FD}~~\hex{2B}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), + Instruction(2.0, r'\I8X16.\VGE\K{\_u}', r'\hex{FD}~~\hex{2C}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), + Instruction(2.0, r'\I16X8.\VEQ', r'\hex{FD}~~\hex{2D}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ieq'), + Instruction(2.0, r'\I16X8.\VNE', r'\hex{FD}~~\hex{2E}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ine'), + Instruction(2.0, r'\I16X8.\VLT\K{\_s}', r'\hex{FD}~~\hex{2F}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), + Instruction(2.0, r'\I16X8.\VLT\K{\_u}', r'\hex{FD}~~\hex{30}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), + Instruction(2.0, r'\I16X8.\VGT\K{\_s}', r'\hex{FD}~~\hex{31}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), + Instruction(2.0, r'\I16X8.\VGT\K{\_u}', r'\hex{FD}~~\hex{32}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), + Instruction(2.0, r'\I16X8.\VLE\K{\_s}', r'\hex{FD}~~\hex{33}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), + Instruction(2.0, r'\I16X8.\VLE\K{\_u}', r'\hex{FD}~~\hex{34}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), + Instruction(2.0, r'\I16X8.\VGE\K{\_s}', r'\hex{FD}~~\hex{35}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), + Instruction(2.0, r'\I16X8.\VGE\K{\_u}', r'\hex{FD}~~\hex{36}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), + Instruction(2.0, r'\I32X4.\VEQ', r'\hex{FD}~~\hex{37}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ieq'), + Instruction(2.0, r'\I32X4.\VNE', r'\hex{FD}~~\hex{38}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ine'), + Instruction(2.0, r'\I32X4.\VLT\K{\_s}', r'\hex{FD}~~\hex{39}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), + Instruction(2.0, r'\I32X4.\VLT\K{\_u}', r'\hex{FD}~~\hex{3A}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ilt'), + Instruction(2.0, r'\I32X4.\VGT\K{\_s}', r'\hex{FD}~~\hex{3B}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), + Instruction(2.0, r'\I32X4.\VGT\K{\_u}', r'\hex{FD}~~\hex{3C}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-igt'), + Instruction(2.0, r'\I32X4.\VLE\K{\_s}', r'\hex{FD}~~\hex{3D}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), + Instruction(2.0, r'\I32X4.\VLE\K{\_u}', r'\hex{FD}~~\hex{3E}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ile'), + Instruction(2.0, r'\I32X4.\VGE\K{\_s}', r'\hex{FD}~~\hex{3F}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), + Instruction(2.0, r'\I32X4.\VGE\K{\_u}', r'\hex{FD}~~\hex{40}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-ige'), + Instruction(2.0, r'\F32X4.\VEQ', r'\hex{FD}~~\hex{41}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-feq'), + Instruction(2.0, r'\F32X4.\VNE', r'\hex{FD}~~\hex{42}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fne'), + Instruction(2.0, r'\F32X4.\VLT', r'\hex{FD}~~\hex{43}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-flt'), + Instruction(2.0, r'\F32X4.\VGT', r'\hex{FD}~~\hex{44}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fgt'), + Instruction(2.0, r'\F32X4.\VLE', r'\hex{FD}~~\hex{45}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fle'), + Instruction(2.0, r'\F32X4.\VGE', r'\hex{FD}~~\hex{46}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fge'), + Instruction(2.0, r'\F64X2.\VEQ', r'\hex{FD}~~\hex{47}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-feq'), + Instruction(2.0, r'\F64X2.\VNE', r'\hex{FD}~~\hex{48}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fne'), + Instruction(2.0, r'\F64X2.\VLT', r'\hex{FD}~~\hex{49}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-flt'), + Instruction(2.0, r'\F64X2.\VGT', r'\hex{FD}~~\hex{4A}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fgt'), + Instruction(2.0, r'\F64X2.\VLE', r'\hex{FD}~~\hex{4B}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fle'), + Instruction(2.0, r'\F64X2.\VGE', r'\hex{FD}~~\hex{4C}', r'[\V128~\V128] \to [\V128]', r'valid-vrelop', r'exec-vrelop', r'op-fge'), + Instruction(2.0, r'\V128.\VNOT', r'\hex{FD}~~\hex{4D}', r'[\V128] \to [\V128]', r'valid-vvunop', r'exec-vvunop', r'op-inot'), + Instruction(2.0, r'\V128.\VAND', r'\hex{FD}~~\hex{4E}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-iand'), + Instruction(2.0, r'\V128.\VANDNOT', r'\hex{FD}~~\hex{4F}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-iandnot'), + Instruction(2.0, r'\V128.\VOR', r'\hex{FD}~~\hex{50}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-ior'), + Instruction(2.0, r'\V128.\VXOR', r'\hex{FD}~~\hex{51}', r'[\V128~\V128] \to [\V128]', r'valid-vvbinop', r'exec-vvbinop', r'op-ixor'), + Instruction(2.0, r'\V128.\VBITSELECT', r'\hex{FD}~~\hex{52}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vvternop', r'exec-vvternop', r'op-ibitselect'), + Instruction(2.0, r'\V128.\VANYTRUE', r'\hex{FD}~~\hex{53}', r'[\V128] \to [\I32]', r'valid-vvtestop', r'exec-vvtestop'), + Instruction(2.0, r'\V128.\VLOAD\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{54}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), + Instruction(2.0, r'\V128.\VLOAD\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{55}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), + Instruction(2.0, r'\V128.\VLOAD\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{56}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), + Instruction(2.0, r'\V128.\VLOAD\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{57}', r'[\I32~\V128] \to [\V128]', r'valid-vload_lane', r'exec-vload_lane'), + Instruction(2.0, r'\V128.\VSTORE\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{58}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), + Instruction(2.0, r'\V128.\VSTORE\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{59}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), + Instruction(2.0, r'\V128.\VSTORE\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5A}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), + Instruction(2.0, r'\V128.\VSTORE\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5B}', r'[\I32~\V128] \to []', r'valid-vstore_lane', r'exec-vstore_lane'), + Instruction(2.0, r'\V128.\VLOAD\K{32\_zero}~\memarg', r'\hex{FD}~~\hex{5C}', r'[\I32] \to [\V128]', r'valid-vload-zero', r'exec-vload-zero'), + Instruction(2.0, r'\V128.\VLOAD\K{64\_zero}~\memarg', r'\hex{FD}~~\hex{5D}', r'[\I32] \to [\V128]', r'valid-vload-zero', r'exec-vload-zero'), + Instruction(2.0, r'\F32X4.\VDEMOTE\K{\_f64x2\_zero}', r'\hex{FD}~~\hex{5E}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-demote'), + Instruction(2.0, r'\F64X2.\VPROMOTE\K{\_}\LOW\K{\_f32x4}', r'\hex{FD}~~\hex{5F}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-promote'), + Instruction(2.0, r'\I8X16.\VABS', r'\hex{FD}~~\hex{60}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), + Instruction(2.0, r'\I8X16.\VNEG', r'\hex{FD}~~\hex{61}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), + Instruction(2.0, r'\I8X16.\VPOPCNT', r'\hex{FD}~~\hex{62}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ipopcnt'), + Instruction(2.0, r'\I8X16.\VALLTRUE', r'\hex{FD}~~\hex{63}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop', r'op-inez'), + Instruction(2.0, r'\I8X16.\VBITMASK', r'\hex{FD}~~\hex{64}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), + Instruction(2.0, r'\I8X16.\VNARROW\K{\_i16x8\_s}', r'\hex{FD}~~\hex{65}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), + Instruction(2.0, r'\I8X16.\VNARROW\K{\_i16x8\_u}', r'\hex{FD}~~\hex{66}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), + Instruction(2.0, r'\F32X4.\VCEIL', r'\hex{FD}~~\hex{67}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fceil'), + Instruction(2.0, r'\F32X4.\VFLOOR', r'\hex{FD}~~\hex{68}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ffloor'), + Instruction(2.0, r'\F32X4.\VTRUNC', r'\hex{FD}~~\hex{69}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ftrunc'), + Instruction(2.0, r'\F32X4.\VNEAREST', r'\hex{FD}~~\hex{6A}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fnearest'), + Instruction(2.0, r'\I8X16.\VSHL', r'\hex{FD}~~\hex{6B}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), + Instruction(2.0, r'\I8X16.\VSHR\K{\_s}', r'\hex{FD}~~\hex{6C}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, r'\I8X16.\VSHR\K{\_u}', r'\hex{FD}~~\hex{6D}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, r'\I8X16.\VADD', r'\hex{FD}~~\hex{6E}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd'), + Instruction(2.0, r'\I8X16.\VADDSAT\K{\_s}', r'\hex{FD}~~\hex{6F}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), + Instruction(2.0, r'\I8X16.\VADDSAT\K{\_u}', r'\hex{FD}~~\hex{70}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), + Instruction(2.0, r'\I8X16.\VSUB', r'\hex{FD}~~\hex{71}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub'), + Instruction(2.0, r'\I8X16.\VSUBSAT\K{\_s}', r'\hex{FD}~~\hex{72}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), + Instruction(2.0, r'\I8X16.\VSUBSAT\K{\_u}', r'\hex{FD}~~\hex{73}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), + Instruction(2.0, r'\F64X2.\VCEIL', r'\hex{FD}~~\hex{74}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fceil'), + Instruction(2.0, r'\F64X2.\VFLOOR', r'\hex{FD}~~\hex{75}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ffloor'), + Instruction(2.0, r'\I8X16.\VMIN\K{\_s}', r'\hex{FD}~~\hex{76}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin'), + Instruction(2.0, r'\I8X16.\VMIN\K{\_u}', r'\hex{FD}~~\hex{77}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin'), + Instruction(2.0, r'\I8X16.\VMAX\K{\_s}', r'\hex{FD}~~\hex{78}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), + Instruction(2.0, r'\I8X16.\VMAX\K{\_u}', r'\hex{FD}~~\hex{79}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), + Instruction(2.0, r'\F64X2.\VTRUNC', r'\hex{FD}~~\hex{7A}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ftrunc'), + Instruction(2.0, r'\I8X16.\VAVGR\K{\_u}', r'\hex{FD}~~\hex{7B}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iavgr'), + Instruction(2.0, r'\I16X8.\VEXTADDPAIRWISE\K{\_i8x16\_s}', r'\hex{FD}~~\hex{7C}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), + Instruction(2.0, r'\I16X8.\VEXTADDPAIRWISE\K{\_i8x16\_u}', r'\hex{FD}~~\hex{7D}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), + Instruction(2.0, r'\I32X4.\VEXTADDPAIRWISE\K{\_i16x8\_s}', r'\hex{FD}~~\hex{7E}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), + Instruction(2.0, r'\I32X4.\VEXTADDPAIRWISE\K{\_i16x8\_u}', r'\hex{FD}~~\hex{7F}', r'[\V128] \to [\V128]', r'valid-vextunop', r'exec-vextadd_pairwise'), + Instruction(2.0, r'\I16X8.\VABS', r'\hex{FD}~~\hex{80}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), + Instruction(2.0, r'\I16X8.\VNEG', r'\hex{FD}~~\hex{81}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), + Instruction(2.0, r'\I16X8.\VQ15MULRSAT\K{\_s}', r'\hex{FD}~~\hex{82}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iq15mulrsat'), + Instruction(2.0, r'\I16X8.\VALLTRUE', r'\hex{FD}~~\hex{83}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), + Instruction(2.0, r'\I16X8.\VBITMASK', r'\hex{FD}~~\hex{84}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), + Instruction(2.0, r'\I16X8.\VNARROW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{85}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), + Instruction(2.0, r'\I16X8.\VNARROW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{86}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vnarrow'), + Instruction(2.0, r'\I16X8.\VEXTEND\K{\_}\LOW\K{\_i8x16\_s}', r'\hex{FD}~~\hex{87}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I16X8.\VEXTEND\K{\_}\HIGH\K{\_i8x16\_s}', r'\hex{FD}~~\hex{88}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I16X8.\VEXTEND\K{\_}\LOW\K{\_i8x16\_u}', r'\hex{FD}~~\hex{89}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I16X8.\VEXTEND\K{\_}\HIGH\K{\_i8x16\_u}', r'\hex{FD}~~\hex{8A}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I16X8.\VSHL', r'\hex{FD}~~\hex{8B}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), + Instruction(2.0, r'\I16X8.\VSHR\K{\_s}', r'\hex{FD}~~\hex{8C}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, r'\I16X8.\VSHR\K{\_u}', r'\hex{FD}~~\hex{8D}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, r'\I16X8.\VADD', r'\hex{FD}~~\hex{8E}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd'), + Instruction(2.0, r'\I16X8.\VADD\K{\_sat\_s}', r'\hex{FD}~~\hex{8F}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), + Instruction(2.0, r'\I16X8.\VADD\K{\_sat\_u}', r'\hex{FD}~~\hex{90}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iadd_sat'), + Instruction(2.0, r'\I16X8.\VSUB', r'\hex{FD}~~\hex{91}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub'), + Instruction(2.0, r'\I16X8.\VSUB\K{\_sat\_s}', r'\hex{FD}~~\hex{92}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), + Instruction(2.0, r'\I16X8.\VSUB\K{\_sat\_u}', r'\hex{FD}~~\hex{93}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-isub_sat'), + Instruction(2.0, r'\F64X2.\VNEAREST', r'\hex{FD}~~\hex{94}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fnearest'), + Instruction(2.0, r'\I16X8.\VMUL', r'\hex{FD}~~\hex{95}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imul'), + Instruction(2.0, r'\I16X8.\VMIN\K{\_s}', r'\hex{FD}~~\hex{96}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imin'), + Instruction(2.0, 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'), + Instruction(2.0, 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'), + Instruction(2.0, 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'), + Instruction(0.0, None, r'\hex{FD}~\hex{9A}~\hex{01}'), + Instruction(2.0, r'\I16X8.\VAVGR\K{\_u}', r'\hex{FD}~~\hex{9B}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iavgr'), + Instruction(2.0, r'\I16X8.\VEXTMUL\K{\_}\LOW\K{\_i8x16\_s}', r'\hex{FD}~~\hex{9C}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I16X8.\VEXTMUL\K{\_}\HIGH\K{\_i8x16\_s}', r'\hex{FD}~~\hex{9D}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I16X8.\VEXTMUL\K{\_}\LOW\K{\_i8x16\_u}', r'\hex{FD}~~\hex{9E}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I16X8.\VEXTMUL\K{\_}\HIGH\K{\_i8x16\_u}', r'\hex{FD}~~\hex{9F}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I32X4.\VABS', r'\hex{FD}~~\hex{A0}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), + Instruction(2.0, r'\I32X4.\VNEG', r'\hex{FD}~~\hex{A1}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), + Instruction(0.0, None, r'\hex{FD}~\hex{A2}~\hex{01}'), + Instruction(2.0, r'\I32X4.\VALLTRUE', r'\hex{FD}~~\hex{A3}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), + Instruction(2.0, r'\I32X4.\VBITMASK', r'\hex{FD}~~\hex{A4}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), + Instruction(0.0, None, r'\hex{FD}~\hex{A5}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{A6}~\hex{01}'), + Instruction(2.0, r'\I32X4.\VEXTEND\K{\_}\LOW\K{\_i16x8\_s}', r'\hex{FD}~~\hex{A7}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I32X4.\VEXTEND\K{\_}\HIGH\K{\_i16x8\_s}', r'\hex{FD}~~\hex{A8}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I32X4.\VEXTEND\K{\_}\LOW\K{\_i16x8\_u}', r'\hex{FD}~~\hex{A9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I32X4.\VEXTEND\K{\_}\HIGH\K{\_i16x8\_u}', r'\hex{FD}~~\hex{AA}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I32X4.\VSHL', r'\hex{FD}~~\hex{AB}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), + Instruction(2.0, r'\I32X4.\VSHR\K{\_s}', r'\hex{FD}~~\hex{AC}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, r'\I32X4.\VSHR\K{\_u}', r'\hex{FD}~~\hex{AD}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, 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(0.0, None, r'\hex{FD}~\hex{AF}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{B0}~\hex{01}'), + Instruction(2.0, 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(0.0, None, r'\hex{FD}~\hex{B2}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{B3}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{B4}~\hex{01}'), + Instruction(2.0, 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(2.0, 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'), + Instruction(2.0, 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'), + Instruction(2.0, r'\I32X4.\VMAX\K{\_s}', r'\hex{FD}~~\hex{B8}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), + Instruction(2.0, r'\I32X4.\VMAX\K{\_u}', r'\hex{FD}~~\hex{B9}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax'), + Instruction(2.0, r'\I32X4.\VDOT\K{\_i16x8\_s}', r'\hex{FD}~~\hex{BA}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vdot'), + Instruction(2.0, r'\I32X4.\VEXTMUL\K{\_}\LOW\K{\_i16x8\_s}', r'\hex{FD}~~\hex{BC}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I32X4.\VEXTMUL\K{\_}\HIGH\K{\_i16x8\_s}', r'\hex{FD}~~\hex{BD}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I32X4.\VEXTMUL\K{\_}\LOW\K{\_i16x8\_u}', r'\hex{FD}~~\hex{BE}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I32X4.\VEXTMUL\K{\_}\HIGH\K{\_i16x8\_u}', r'\hex{FD}~~\hex{BF}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I64X2.\VABS', r'\hex{FD}~~\hex{C0}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'), + Instruction(2.0, r'\I64X2.\VNEG', r'\hex{FD}~~\hex{C1}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-ineg'), + Instruction(0.0, None, r'\hex{FD}~\hex{C2}~\hex{01}'), + Instruction(2.0, r'\I64X2.\VALLTRUE', r'\hex{FD}~~\hex{C3}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vtestop', r'exec-vtestop'), + Instruction(2.0, r'\I64X2.\VBITMASK', r'\hex{FD}~~\hex{C4}~~\hex{01}', r'[\V128] \to [\I32]', r'valid-vbitmask', r'exec-vbitmask'), + Instruction(0.0, None, r'\hex{FD}~\hex{C5}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{C6}~\hex{01}'), + Instruction(2.0, r'\I64X2.\VEXTEND\K{\_}\LOW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{C7}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I64X2.\VEXTEND\K{\_}\HIGH\K{\_i32x4\_s}', r'\hex{FD}~~\hex{C8}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I64X2.\VEXTEND\K{\_}\LOW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{C9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I64X2.\VEXTEND\K{\_}\HIGH\K{\_i32x4\_u}', r'\hex{FD}~~\hex{CA}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vcvtop'), + Instruction(2.0, r'\I64X2.\VSHL', r'\hex{FD}~~\hex{CB}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishl'), + Instruction(2.0, r'\I64X2.\VSHR\K{\_s}', r'\hex{FD}~~\hex{CC}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, r'\I64X2.\VSHR\K{\_u}', r'\hex{FD}~~\hex{CD}~~\hex{01}', r'[\V128~\I32] \to [\V128]', r'valid-vshiftop', r'exec-vshiftop', r'op-ishr'), + Instruction(2.0, 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(0.0, None, r'\hex{FD}~\hex{CF}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{D0}~\hex{01}'), + Instruction(2.0, 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(0.0, None, r'\hex{FD}~\hex{D2}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{D3}~\hex{01}'), + Instruction(0.0, None, r'\hex{FD}~\hex{D4}~\hex{01}'), + Instruction(2.0, 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(2.0, 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(2.0, r'\I64X2.\VNE', r'\hex{FD}~~\hex{D7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ine'), + Instruction(2.0, r'\I64X2.\VLT\K{\_s}', r'\hex{FD}~~\hex{D8}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ilt'), + Instruction(2.0, r'\I64X2.\VGT\K{\_s}', r'\hex{FD}~~\hex{D9}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-igt'), + Instruction(2.0, r'\I64X2.\VLE\K{\_s}', r'\hex{FD}~~\hex{DA}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ile'), + Instruction(2.0, r'\I64X2.\VGE\K{\_s}', r'\hex{FD}~~\hex{DB}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-ige'), + Instruction(2.0, r'\I64X2.\VEXTMUL\K{\_}\LOW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{DC}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I64X2.\VEXTMUL\K{\_}\HIGH\K{\_i32x4\_s}', r'\hex{FD}~~\hex{DD}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I64X2.\VEXTMUL\K{\_}\LOW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{DE}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\I64X2.\VEXTMUL\K{\_}\HIGH\K{\_i32x4\_u}', r'\hex{FD}~~\hex{DF}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vextbinop', r'exec-vextmul'), + Instruction(2.0, r'\F32X4.\VABS', r'\hex{FD}~~\hex{E0}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fabs'), + Instruction(2.0, r'\F32X4.\VNEG', r'\hex{FD}~~\hex{E1}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fneg'), + Instruction(0.0, None, r'\hex{FD}~\hex{E2}~\hex{01}'), + Instruction(2.0, r'\F32X4.\VSQRT', r'\hex{FD}~~\hex{E3}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fsqrt'), + Instruction(2.0, 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(2.0, r'\F32X4.\VSUB', r'\hex{FD}~~\hex{E5}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fsub'), + Instruction(2.0, r'\F32X4.\VMUL', r'\hex{FD}~~\hex{E6}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmul'), + Instruction(2.0, r'\F32X4.\VDIV', r'\hex{FD}~~\hex{E7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fdiv'), + Instruction(2.0, r'\F32X4.\VMIN', r'\hex{FD}~~\hex{E8}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmin'), + Instruction(2.0, r'\F32X4.\VMAX', r'\hex{FD}~~\hex{E9}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmax'), + Instruction(2.0, r'\F32X4.\VPMIN', r'\hex{FD}~~\hex{EA}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmin'), + Instruction(2.0, r'\F32X4.\VPMAX', r'\hex{FD}~~\hex{EB}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmax'), + Instruction(2.0, r'\F64X2.\VABS', r'\hex{FD}~~\hex{EC}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fabs'), + Instruction(2.0, r'\F64X2.\VNEG', r'\hex{FD}~~\hex{ED}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fneg'), + Instruction(2.0, r'\F64X2.\VSQRT', r'\hex{FD}~~\hex{EF}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-fsqrt'), + Instruction(2.0, r'\F64X2.\VADD', r'\hex{FD}~~\hex{F0}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fadd'), + Instruction(2.0, r'\F64X2.\VSUB', r'\hex{FD}~~\hex{F1}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fsub'), + Instruction(2.0, r'\F64X2.\VMUL', r'\hex{FD}~~\hex{F2}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmul'), + Instruction(2.0, r'\F64X2.\VDIV', r'\hex{FD}~~\hex{F3}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fdiv'), + Instruction(2.0, r'\F64X2.\VMIN', r'\hex{FD}~~\hex{F4}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmin'), + Instruction(2.0, r'\F64X2.\VMAX', r'\hex{FD}~~\hex{F5}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fmax'), + Instruction(2.0, r'\F64X2.\VPMIN', r'\hex{FD}~~\hex{F6}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmin'), + Instruction(2.0, r'\F64X2.\VPMAX', r'\hex{FD}~~\hex{F7}~~\hex{01}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-fpmax'), + Instruction(2.0, r'\I32X4.\VTRUNCSAT\K{\_f32x4\_s}', r'\hex{FD}~~\hex{F8}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), + Instruction(2.0, r'\I32X4.\VTRUNCSAT\K{\_f32x4\_u}', r'\hex{FD}~~\hex{F9}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), + Instruction(2.0, r'\F32X4.\VCONVERT\K{\_i32x4\_s}', r'\hex{FD}~~\hex{FA}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), + Instruction(2.0, r'\F32X4.\VCONVERT\K{\_i32x4\_u}', r'\hex{FD}~~\hex{FB}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), + Instruction(2.0, r'\I32X4.\VTRUNCSAT\K{\_f64x2\_s\_zero}', r'\hex{FD}~~\hex{FC}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), + Instruction(2.0, r'\I32X4.\VTRUNCSAT\K{\_f64x2\_u\_zero}', r'\hex{FD}~~\hex{FD}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-trunc_sat'), + Instruction(2.0, r'\F64X2.\VCONVERT\K{\_}\LOW\K{\_i32x4\_s}', r'\hex{FD}~~\hex{FE}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), + Instruction(2.0, r'\F64X2.\VCONVERT\K{\_}\LOW\K{\_i32x4\_u}', r'\hex{FD}~~\hex{FF}~~\hex{01}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-convert'), + Instruction(3.0, r'\I8X16.\VRELAXEDSWIZZLE', r'\hex{FD}~~\hex{80}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vswizzlop', r'exec-vswizzlop'), + Instruction(3.0, r'\I32X4.\VRELAXEDTRUNC\K{\_f32x4\_s}', r'\hex{FD}~~\hex{81}~~\hex{02}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-relaxed_trunc_s'), + Instruction(3.0, r'\I32X4.\VRELAXEDTRUNC\K{\_f32x4\_u}', r'\hex{FD}~~\hex{82}~~\hex{02}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-relaxed_trunc_u'), + Instruction(3.0, r'\I32X4.\VRELAXEDTRUNC\K{\_f64x2\_s}', r'\hex{FD}~~\hex{83}~~\hex{02}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-relaxed_trunc_s'), + Instruction(3.0, r'\I32X4.\VRELAXEDTRUNC\K{\_f64x2\_u}', r'\hex{FD}~~\hex{84}~~\hex{02}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-relaxed_trunc_u'), + Instruction(3.0, r'\F32X4.\VRELAXEDMADD', r'\hex{FD}~~\hex{85}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-frelaxed_madd'), + Instruction(3.0, r'\F32X4.\VRELAXEDNMADD', r'\hex{FD}~~\hex{86}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-frelaxed_nmadd'), + Instruction(3.0, r'\F64X2.\VRELAXEDMADD', r'\hex{FD}~~\hex{87}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-frelaxed_madd'), + Instruction(3.0, r'\F64X2.\VRELAXEDNMADD', r'\hex{FD}~~\hex{88}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-frelaxed_nmadd'), + Instruction(3.0, r'\I8X16.\VRELAXEDLANESELECT', r'\hex{FD}~~\hex{89}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-irelaxed_laneselect'), + Instruction(3.0, r'\I16X8.\VRELAXEDLANESELECT', r'\hex{FD}~~\hex{8A}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-irelaxed_laneselect'), + Instruction(3.0, r'\I32X4.\VRELAXEDLANESELECT', r'\hex{FD}~~\hex{8B}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-irelaxed_laneselect'), + Instruction(3.0, r'\I64X2.\VRELAXEDLANESELECT', r'\hex{FD}~~\hex{8C}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vternop', r'op-irelaxed_laneselect'), + Instruction(3.0, r'\F32X4.\VRELAXEDMIN', r'\hex{FD}~~\hex{8D}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-frelaxed_min'), + Instruction(3.0, r'\F32X4.\VRELAXEDMAX', r'\hex{FD}~~\hex{8E}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-frelaxed_max'), + Instruction(3.0, r'\F64X2.\VRELAXEDMIN', r'\hex{FD}~~\hex{8F}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-frelaxed_min'), + Instruction(3.0, r'\F64X2.\VRELAXEDMAX', r'\hex{FD}~~\hex{90}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-frelaxed_max'), + Instruction(3.0, r'\I16X8.\VRELAXEDQ15MULR\K{\_s}', r'\hex{FD}~~\hex{91}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-irelaxed_q15mulr_s'), + Instruction(3.0, r'\I16X8.\VRELAXEDDOT\K{\_i8x16\_i7x16\_s}', r'\hex{FD}~~\hex{92}~~\hex{02}', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vrelaxed_dot'), + Instruction(3.0, r'\I32X4.\VRELAXEDDOT\K{\_i8x16\_i7x16\_add\_s}', r'\hex{FD}~~\hex{93}~~\hex{02}', r'[\V128~\V128~\V128] \to [\V128]', r'valid-vternop', r'exec-vrelaxed_dot_add'), + Instruction(0.0, None, r'\hex{FD}~\hex{94}~\hex{02} \dots'), + Instruction(0.0, None, r'\hex{FE}'), + Instruction(0.0, None, r'\hex{FF}'), ] diff --git a/document/core/appendix/index.rst b/document/core/appendix/index.rst index 9054e64e34..d3d7247097 100644 --- a/document/core/appendix/index.rst +++ b/document/core/appendix/index.rst @@ -7,6 +7,7 @@ Appendix :maxdepth: 2 embedding + profiles implementation properties algorithm diff --git a/document/core/appendix/profiles.rst b/document/core/appendix/profiles.rst new file mode 100644 index 0000000000..de1d4f9b23 --- /dev/null +++ b/document/core/appendix/profiles.rst @@ -0,0 +1,131 @@ +.. index:: ! profile, abstract syntax, validation, execution, binary format, text format +.. _profiles: + +Profiles +-------- + +To enable the use of WebAssembly in as many environments as possible, *profiles* specify coherent language subsets that fit constraints imposed by common classes of host environments. +A host platform can thereby decide to support the language only under a restricted profile, or even the intersection of multiple profiles. + + +Conventions +~~~~~~~~~~~ + +A profile modification is specified by decorating selected rules in the main body of this specification with a *profile annotation* that defines them as conditional on the choice of profile. + +For that purpose, every profile defines a *profile marker*, an alphanumeric short-hand like :math:`\profilename{ABC}`. +A profile annotation of the form :math:`\exprofiles{\profile{ABC}~\profile{XYZ}}` on a rule indicates that this rule is *excluded* for either of the profiles whose marker is :math:`\profilename{ABC}` or :math:`\profilename{XYZ}`. + +There are two ways of subsetting the language in a profile: + +* *Syntactic*, by *omitting* a feature, in which case certain constructs are removed from the syntax altogether. + +* *Semantic*, by *restricting* a feature, in which case certain constructs are still present but some behaviours are ruled out. + + +Syntax Annotations +.................. + +To omit a construct from a profile syntactically, respective productions in the grammar of the :ref:`abstract syntax ` are annotated with an associated profile marker. +This is defined to have the following implications: + +1. Any production in the :ref:`binary ` or :ref:`textual ` syntax that produces abstract syntax with a marked construct is omitted by extension. + +2. Any :ref:`validation ` or :ref:`execution ` rule that handles a marked construct is omitted by extension. + +The overall effect is that the respective construct is no longer part of the language under a respective profile. + +.. note:: + For example, a "busy" profile marked :math:`\profilename{BUSY}` could rule out the |NOP| instruction by marking the production for it in the abstract syntax as follows: + + .. math:: + \begin{array}{llcl} + \production{instruction} & \instr &::=& + \dots \\ + & \exprofiles{\profile{BUSY}} &|& \NOP \\ + & &|& \UNREACHABLE \\ + \end{array} + + A rule may be annotated by multiple markers, which could be the case if a construct is in the intersection of multiple features. + + +Semantics Annotations +..................... + +To restrict certain behaviours in a profile, individual :ref:`validation ` or :ref:`reduction ` rules or auxiliary definitions are annotated with an associated marker. + +This has the consequence that the respective rule is no longer applicable under the given profile. + +.. note:: + For example, an "infinite" profile marked :math:`\profilename{INF}` could define that growing memory never fails: + + .. math:: + \begin{array}{llcl@{\qquad}l} + & S; F; (\I32.\CONST~n)~\MEMORYGROW~x &\stepto& S'; F; (\I32.\CONST~\X{sz}) + \\&&& + \begin{array}[t]{@{}r@{~}l@{}} + (\iff & F.\AMODULE.\MIMEMS[x] = a \\ + \wedge & \X{sz} = |S.\SMEMS[a].\MIDATAS|/64\,\F{Ki} \\ + \wedge & S' = S \with \SMEMS[a] = \growmem(S.\SMEMS[a], n)) \\[1ex] + \end{array} + \\[1ex] + \exprofiles{\profile{INF}} & S; F; (\I32.\CONST~n)~\MEMORYGROW~x &\stepto& S; F; (\I32.\CONST~\signed_{32}^{-1}(-1)) + \end{array} + + +Properties +.......... + +All profiles are defined such that the following properties are preserved: + +* All profiles represent syntactic and semantic subsets of the :ref:`full profile `, i.e., they do not *add* syntax or *alter* behaviour. + +* All profiles are mutually compatible, i.e., no two profiles subset semantic behaviour in inconsistent or ambiguous ways, and any intersection of profiles preserves the properties described here. + +* Profiles do not violate :ref:`soundness `, i.e., all :ref:`configurations ` valid under that profile still have well-defined execution behaviour. + +.. note:: + Tools are generally expected to handle and produce code for the full profile by default. + In particular, producers should not generate code that *depends* on specific profiles. Instead, all code should preserve correctness when executed under the full profile. + + Moreover, profiles should be considered static and fixed for a given platform or ecosystem. Runtime conditioning on the "current" profile is not intended and should be avoided. + + + +Defined Profiles +~~~~~~~~~~~~~~~~ + +.. note:: + The number of defined profiles is expected to remain small in the future. Profiles are intended for broad and permanent use cases only. In particular, profiles are not intended for language versioning. + + +.. index:: full profile + single: profile; full +.. _profile-full: + +Full Profile (:math:`{\small{\mathrm{FUL}}}`) +............................................. + +The *full* profile contains the complete language and all possible behaviours. +It imposes no restrictions, i.e., all rules and definitions are active. +All other profiles define sub-languages of this profile. + + +.. index:: determinism, non-determinism, deterministic profile + single: profile; deterministic +.. _profile-deterministic: + +Deterministic Profile (:math:`{\small{\mathrm{DET}}}`) +...................................................... + +The *deterministic* profile excludes all rules marked :math:`\exprofiles{\PROFDET}`. +It defines a sub-language that does not exhibit any incidental non-deterministic behaviour: + +* All :ref:`NaN ` values :ref:`generated ` by :ref:`floating-point instructions ` are canonical and positive. + +* All :ref:`relaxed vector instructions ` have a fixed behaviour that does not depend on the implementation. + +Even under this profile, the |MEMORYGROW| and |TABLEGROW| instructions technically remain :ref:`non-deterministic `, in order to be able to indicate resource exhaustion. + +.. note:: + In future versions of WebAssembly, new non-deterministic behaviour may be added to the language, such that the deterministic profile will induce additional restrictions. diff --git a/document/core/binary/instructions.rst b/document/core/binary/instructions.rst index 347565d79e..0b62cc6e65 100644 --- a/document/core/binary/instructions.rst +++ b/document/core/binary/instructions.rst @@ -258,6 +258,7 @@ The ${:CONST} instruction for vectors is followed by 16 immediate bytes, which a $${grammar: Binstr/vec-const} +.. _binary-vswizzlop: .. _binary-vshuffle: The ${:SHUFFLE} instruction is also followed by the encoding of 16 ${:laneidx} immediates. @@ -309,6 +310,10 @@ $${grammar: { .. _binary-vshiftop: .. _binary-viunop: .. _binary-vibinop: +.. _binary-viternop: +.. _binary-viextunop: +.. _binary-viextbinop: +.. _binary-viextternop: .. _binary-viminmaxop: .. _binary-vsatbinop: @@ -342,6 +347,7 @@ $${grammar: { Binstr/vec-shift-i32x4 Binstr/vec-bin-i32x4 Binstr/vec-extbin-i32x4 + Binstr/vec-exttern-i32x4 }} $${grammar: { @@ -356,19 +362,47 @@ $${grammar: { .. _binary-vfunop: .. _binary-vfbinop: +.. _binary-vfternop: $${grammar: { Binstr/vec-un-f32x4 Binstr/vec-bin-f32x4 + Binstr/vec-tern-f32x4 }} $${grammar: { Binstr/vec-un-f64x2 Binstr/vec-bin-f64x2 + Binstr/vec-tern-f64x2 }} $${grammar: {Binstr/vec-cvt}} +.. math:: + \begin{array}{llclll} + \phantom{\production{instruction}} & \phantom{\Binstr} &\phantom{::=}& \phantom{\dots} && \phantom{vechaslongerinstructionnames} \\[-2ex] &&|& + \hex{FD}~~256{:}\Bu32 &\Rightarrow& \I16X8.\VRELAXEDSWIZZLE \\ &&|& + \hex{FD}~~257{:}\Bu32 &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_s} \\ &&|& + \hex{FD}~~258{:}\Bu32 &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_u} \\ &&|& + \hex{FD}~~259{:}\Bu32 &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_s\_zero} \\ &&|& + \hex{FD}~~260{:}\Bu32 &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_u\_zero} \\ &&|& + \hex{FD}~~261{:}\Bu32 &\Rightarrow& \F32X4.\VRELAXEDMADD \\ &&|& + \hex{FD}~~262{:}\Bu32 &\Rightarrow& \F32X4.\VRELAXEDNMADD \\ &&|& + \hex{FD}~~263{:}\Bu32 &\Rightarrow& \F64X2.\VRELAXEDMADD \\ &&|& + \hex{FD}~~264{:}\Bu32 &\Rightarrow& \F64X2.\VRELAXEDNMADD \\ &&|& + \hex{FD}~~265{:}\Bu32 &\Rightarrow& \I8X16.\VRELAXEDLANESELECT \\ &&|& + \hex{FD}~~266{:}\Bu32 &\Rightarrow& \I16X8.\VRELAXEDLANESELECT \\ &&|& + \hex{FD}~~267{:}\Bu32 &\Rightarrow& \I32X4.\VRELAXEDLANESELECT \\ &&|& + \hex{FD}~~268{:}\Bu32 &\Rightarrow& \I64X2.\VRELAXEDLANESELECT \\ &&|& + \hex{FD}~~269{:}\Bu32 &\Rightarrow& \F32X4.\VRELAXEDMIN \\ &&|& + \hex{FD}~~270{:}\Bu32 &\Rightarrow& \F32X4.\VRELAXEDMAX \\ &&|& + \hex{FD}~~271{:}\Bu32 &\Rightarrow& \F64X2.\VRELAXEDMIN \\ &&|& + \hex{FD}~~272{:}\Bu32 &\Rightarrow& \F64X2.\VRELAXEDMAX \\ &&|& + \hex{FD}~~273{:}\Bu32 &\Rightarrow& \I16X8.\VRELAXEDQ15MULR\K{\_s} \\ &&|& + \hex{FD}~~274{:}\Bu32 &\Rightarrow& \I16X8.\VRELAXEDDOT\K{\_i8x16\_i7x16\_s} \\ &&|& + \hex{FD}~~275{:}\Bu32 &\Rightarrow& \I16X8.\VRELAXEDDOT\K{\_i8x16\_i7x16\_add\_s} \\ + \end{array} + .. index:: expression pair: binary format; expression diff --git a/document/core/exec/instructions.rst b/document/core/exec/instructions.rst index 03f6066e8e..de9dcc6dfc 100644 --- a/document/core/exec/instructions.rst +++ b/document/core/exec/instructions.rst @@ -48,7 +48,7 @@ $${rule: {Step_pure/select-*}} In future versions of WebAssembly, ${:SELECT} may allow more than one value per choice. -.. index:: numeric instruction, determinism, trap, NaN, value, value type +.. index:: numeric instruction, determinism, non-determinism, trap, NaN, value, value type pair: execution; instruction single: abstract syntax; instruction .. _exec-instr-numeric: @@ -994,14 +994,14 @@ $${rule: {Step_pure/extern.convert_any-*}} Vector Instructions ~~~~~~~~~~~~~~~~~~~ -Vector instructions that operate bitwise are handled as integer operations of respective width. +Vector instructions that operate bitwise are handled as integer operations of respective bit width. .. math:: \begin{array}{lll@{\qquad}l} \X{op}_{\VN}(i_1,\dots,i_k) &=& \xref{Step_pure/numerics}{int-ops}{\F{i}\X{op}}_N(i_1,\dots,i_k) \\ \end{array} -Most other vector instructions are defined in terms of numeric operators that are applied lane-wise according to the given :ref:`shape `. +Most other vector instructions are defined in terms of :ref:`numeric operators ` that are applied lane-wise according to the given :ref:`shape `. .. math:: \begin{array}{llll} @@ -1017,6 +1017,21 @@ Most other vector instructions are defined in terms of numeric operators that ar :math:`\lanes_{\K{i32x4}}(v_1)` and :math:`\lanes_{\K{i32x4}}(v_2)` respectively. +For non-deterministic operators this definition is generalized to sets: + +.. math:: + \begin{array}{lll} + \X{op}_{t\K{x}N}(n_1,\dots,n_k) &=& + \{ \lanes^{-1}_{t\K{x}N}(i^\ast) ~|~ i^\ast \in \Large\times\xref{Step_pure/instructions}{exec-instr-numeric}{\X{op}}_t(i_1,\dots,i_k)^\ast \land i_1^\ast = \lanes_{t\K{x}N}(n_1) \land \dots \land i_k^\ast = \lanes_{t\K{x}N}(n_k) \} \\ + \end{array} + +where :math:`\Large\times \{x^\ast\}^N` transforms a sequence of :math:`N` sets of values into a set of sequences of :math:`N` values by computing the set product: + +.. math:: + \begin{array}{lll} + \Large\times (S_1 \dots S_N) &=& \{ x_1 \dots x_N ~|~ x_1 \in S_1 \land \dots \land x_N \in S_N \} + \end{array} + .. _exec-vconst: @@ -1073,50 +1088,26 @@ $${rule-prose: Step_pure/vbinop} $${rule: {Step_pure/vbinop-*}} -.. _exec-vtestop: +.. _exec-vternop: -$${rule-prose: Step_pure/vtestop} +$${rule-prose: Step_pure/vternop} -$${rule: {Step_pure/vtestop-*}} +$${rule: {Step_pure/vternop-*}} -.. _exec-vrelop: - -$${rule-prose: Step_pure/vrelop} - -.. todo:: - Below is the actual prose. - -1. Assert: due to :ref:`validation `, two values of :ref:`value type ` |V128| are on the top of the stack. - -2. Pop the value :math:`\V128.\VCONST~c_2` from the stack. - -3. Pop the value :math:`\V128.\VCONST~c_1` from the stack. - -4. Let :math:`i_1^\ast` be the result of computing :math:`\lanes_{t\K{x}N}(c_1)`. +.. _exec-vtestop: -5. Let :math:`i_2^\ast` be the result of computing :math:`\lanes_{t\K{x}N}(c_2)`. +$${rule-prose: Step_pure/vtestop} -6. Let :math:`i^\ast` be the result of computing :math:`\vrelop_t(i_1^\ast, i_2^\ast)`. +$${rule: {Step_pure/vtestop}} -7. Let :math:`j^\ast` be the result of computing :math:`\extends_{1,|t|}(i^\ast)`. -8. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{t\K{x}N}(j^\ast)`. +.. _exec-vrelop: -9. Push the value :math:`\V128.\VCONST~c` to the stack. +$${rule-prose: Step_pure/vrelop} $${rule: {Step_pure/vrelop}} -.. math:: - \begin{array}{l} - \begin{array}{lcl@{\qquad}l} - (\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~t\K{x}N\K{.}\vrelop &\stepto& (\V128\K{.}\VCONST~c) - \end{array} - \\ \qquad - \begin{array}[t]{@{}r@{~}l@{}} - (\iff c = \lanes^{-1}_{t\K{x}N}(\extends_{1,|t|}(\vrelop_t(\lanes_{t\K{x}N}(c_1), \lanes_{t\K{x}N}(c_2))))) - \end{array} - \end{array} .. _exec-vshiftop: @@ -1189,9 +1180,9 @@ $${rule: {Step_pure/vbitmask}} \end{array} -.. _exec-vswizzle: +.. _exec-vswizzlop: -$${rule-prose: Step_pure/vswizzle} +$${rule-prose: Step_pure/vswizzlop} .. todo:: Below is the actual prose. @@ -1212,7 +1203,7 @@ $${rule-prose: Step_pure/vswizzle} 8. Push the value :math:`\V128.\VCONST~c'` onto the stack. -$${rule: {Step_pure/vswizzle}} +$${rule: {Step_pure/vswizzlop-*}} .. math:: \begin{array}{l} @@ -1564,6 +1555,81 @@ $${rule: {Step_pure/vnarrow}} \end{array} +.. _exec-vrelaxed_dot: + +.. todo:: move more of this to numerics + +1. Assert: due to :ref:`validation `, two values of :ref:`value type ` |V128| are on the top of the stack. + +2. Pop the value :math:`\V128.\VCONST~c_2` from the stack. + +3. Pop the value :math:`\V128.\VCONST~c_1` from the stack. + +4. Let :math:`(i_1~i_2)^8` be the result of computing :math:`\irelaxeddotmul_{8, 16}(\lanes_{\I8X16}(c_1), \lanes_{\I8X16}(c_2))` + +5. Let :math:`j^8` be the result of computing :math:`\iaddsats_{16}(i_1, i_2)^8`. + +6. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{\I16X8}(j^8)`. + +7. Push the value :math:`\V128.\VCONST~c` onto the stack. + +.. math:: + \begin{array}{l} + \begin{array}{llcl@{\qquad}l} + & (\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~\K{i16x8.}\VRELAXEDDOT\K{\_i8x16\_i7x16\_s} &\stepto& (\V128\K{.}\VCONST~c) \\ + \end{array} + \\ \qquad + \begin{array}[t]{@{}r@{~}l@{}} + (\iff & (i_1~i_2)^8 = \irelaxeddotmul_{8,16}(\lanes_{\I8X16}(c_1), \lanes_{\I8X16}(c_2)) \\ + \wedge & j^8 = \iaddsats_{16}(i_1, i_2)^8 \\ + \wedge & c = \lanes^{-1}_{\I16X8}(j^8)) + \end{array} + \end{array} + + +.. _exec-vrelaxed_dot_add: + +.. todo:: move more of this to numerics + +1. Assert: due to :ref:`validation `, three values of :ref:`value type ` |V128| are on the top of the stack. + +2. Pop the value :math:`\V128.\VCONST~c_3` from the stack. + +3. Pop the value :math:`\V128.\VCONST~c_2` from the stack. + +4. Pop the value :math:`\V128.\VCONST~c_1` from the stack. + +5. Let :math:`(i_1~i_2)^8` be the result of computing :math:`\irelaxeddotmul_{8, 16}(\lanes_{\I8X16}(c_1), \lanes_{\I8X16}(c_2))` + +6. Let :math:`(j_1~j_2)^4` be the result of computing :math:`\iaddsats_{16}(i_1, i_2)^8`. + +7. Let :math:`j^4` be the result of computing :math:`\iadd_{32}(\extend^{s}_{16, 32}(j_1), \extend^{s}_{16, 32}(j_2))^4`. + +8. Let :math:`k^4` be the result of computing :math:`\lanes_{\I32X4}(c_3)`. + +9. Let :math:`l^4` be the result of computing :math:`\iadd_{32}(j, k)^4`. + +10. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{\I32X4}(l^4)`. + +11. Push the value :math:`\V128.\VCONST~c` onto the stack. + +.. math:: + \begin{array}{l} + \begin{array}{llcl@{\qquad}l} + & (\V128\K{.}\VCONST~c_1)~(\V128\K{.}\VCONST~c_2)~(\V128\K{.}\VCONST~c_3)~\K{i32x4.}\VRELAXEDDOT\K{\_i8x16\_i7x16\_add\_s} &\stepto& (\V128\K{.}\VCONST~c) \\ + \end{array} + \\ \qquad + \begin{array}[t]{@{}r@{~}l@{}} + (\iff & (i_1~i_2)^8 = \irelaxeddotmul_{8,16}(\lanes_{\I8X16}(c_1), \lanes_{\I8X16}(c_2)) \\ + \wedge & (j_1~j_2)^4 = \iaddsats_{16}(i_1, i_2)^8 \\ + \wedge & j^4 = \iadd_{32}(\extends_{16,32}(j_1), \extends_{16,32}(j_2))^4 \\ + \wedge & k^4 = \lanes_{\I32X4}(c_3) \\ + \wedge & l^4 = \iadd_{32}(j, k)^4 \\ + \wedge & c = \lanes^{-1}_{\I32X4}(l^4)) + \end{array} + \end{array} + + .. _exec-vcvtop: :math:`t_2\K{x}N\K{.}\vcvtop\K{\_}t_1\K{x}M\K{\_}\sx` @@ -1755,6 +1821,7 @@ $${rule-prose: Step_read/table.size} $${rule: Step_read/table.size} +.. index:: determinism, non-determinism .. _exec-table.grow: $${rule-prose: Step/table.grow} @@ -2199,6 +2266,7 @@ $${rule-prose: Step_read/memory.size} $${rule: {Step_read/memory.size}} +.. index:: determinism, non-determinism .. _exec-memory.grow: $${rule-prose: Step/memory.grow} diff --git a/document/core/exec/numerics.rst b/document/core/exec/numerics.rst index 217e820c2a..9d8c5d8277 100644 --- a/document/core/exec/numerics.rst +++ b/document/core/exec/numerics.rst @@ -1,4 +1,4 @@ -.. index:: value, integer, floating-point, bit width, determinism, NaN +.. index:: value, integer, floating-point, bit width, determinism, non-determinism, NaN .. _exec-op-partial: .. _exec-numeric: @@ -87,8 +87,8 @@ Conventions: .. math:: \begin{array}{lll@{\qquad}l} - \satu_N(i) &=& 2^N-1 & (\iff i > 2^N-1)\\ \satu_N(i) &=& 0 & (\iff i < 0) \\ + \satu_N(i) &=& 2^N-1 & (\iff i > 2^N-1)\\ \satu_N(i) &=& i & (\otherwise) \\ \end{array} @@ -96,8 +96,8 @@ Conventions: .. math:: \begin{array}{lll@{\qquad}l} - \sats_N(i) &=& \signed_N^{-1}(-2^{N-1}) & (\iff i < -2^{N-1})\\ - \sats_N(i) &=& \signed_N^{-1}(2^{N-1}-1) & (\iff i > 2^{N-1}-1)\\ + \sats_N(i) &=& -2^{N-1} & (\iff i < -2^{N-1})\\ + \sats_N(i) &=& 2^{N-1}-1 & (\iff i > 2^{N-1}-1)\\ \sats_N(i) &=& i & (\otherwise) \end{array} @@ -565,6 +565,19 @@ The integer result of predicates -- i.e., :ref:`tests ` and :ref: \end{array} +.. _op-inez: + +:math:`\inez_N(i)` +.................. + +* Return :math:`0` if :math:`i` is zero, :math:`1` otherwise. + +.. math:: + \begin{array}{@{}lcll} + \inez_N(i) &=& \tobool(i =/= 0) + \end{array} + + .. _op-ieq: :math:`\ieq_N(i_1, i_2)` @@ -837,11 +850,11 @@ The integer result of predicates -- i.e., :ref:`tests ` and :ref: * Let :math:`j` be the result of adding :math:`j_1` and :math:`j_2`. -* Return :math:`\sats_N(j)`. +* Return the value whose signed interpretation is :math:`\sats_N(j)`. .. math:: \begin{array}{lll@{\qquad}l} - \iaddsats_N(i_1, i_2) &=& \sats_N(\signed_N(i_1) + \signed_N(i_2)) + \iaddsats_N(i_1, i_2) &=& \signed_N^{-1}(\sats_N(\signed_N(i_1) + \signed_N(i_2))) \end{array} @@ -868,11 +881,11 @@ The integer result of predicates -- i.e., :ref:`tests ` and :ref: * Let :math:`j` be the result of subtracting :math:`j_2` from :math:`j_1`. -* Return :math:`\sats_N(j)`. +* Return the value whose signed interpretation is :math:`\sats_N(j)`. .. math:: \begin{array}{lll@{\qquad}l} - \isubsats_N(i_1, i_2) &=& \sats_N(\signed_N(i_1) - \signed_N(i_2)) + \isubsats_N(i_1, i_2) &=& \signed_N^{-1}(\sats_N(\signed_N(i_1) - \signed_N(i_2))) \end{array} @@ -896,11 +909,11 @@ The integer result of predicates -- i.e., :ref:`tests ` and :ref: :math:`\iq15mulrsats_N(i_1, i_2)` ................................. -* Return the result of :math:`\sats_N(\ishrs_N(i_1 \cdot i_2 + 2^{14}, 15))`. +* Return the whose signed interpretation is the result of :math:`\sats_N(\ishrs_N(i_1 \cdot i_2 + 2^{14}, 15))`. .. math:: \begin{array}{lll@{\qquad}l} - \iq15mulrsats_N(i_1, i_2) &=& \sats_N(\ishrs_N(i_1 \cdot i_2 + 2^{14}, 15)) + \iq15mulrsats_N(i_1, i_2) &=& \signed_N^{-1}(\sats_N(\ishrs_N(i_1 \cdot i_2 + 2^{14}, 15))) \end{array} @@ -1007,7 +1020,7 @@ where: \end{array} -.. index:: NaN +.. index:: NaN, determinism, non-determinism .. _aux-nans: NaN Propagation @@ -1020,14 +1033,17 @@ then its sign is non-deterministic and the :ref:`payload ` is co * Otherwise the payload is picked non-deterministically among all :ref:`arithmetic NaNs `; that is, its most significant bit is :math:`1` and all others are unspecified. -This non-deterministic result is expressed by the following auxiliary function producing a set of allowed outputs from a set of inputs: +* In the :ref:`deterministic profile `, however, a positive canonical NaNs is reliably produced in the latter case. + +The non-deterministic result is expressed by the following auxiliary function producing a set of allowed outputs from a set of inputs: .. math:: - \begin{array}{lll@{\qquad}l} - \nans_N\{z^\ast\} &=& \{ + \NAN(n), - \NAN(n) ~|~ n = \canon_N \} - & (\iff \forall \NAN(n) \in z^\ast,~ n = \canon_N) \\ - \nans_N\{z^\ast\} &=& \{ + \NAN(n), - \NAN(n) ~|~ n \geq \canon_N \} - & (\otherwise) \\ + \begin{array}{llcl@{\qquad}l} + & \nans_N\{z^\ast\} &=& \{ + \NAN(\canon_N) \} \\ + \exprofiles{\PROFDET} & \nans_N\{z^\ast\} &=& \{ + \NAN(n), - \NAN(n) ~|~ n = \canon_N \} + & (\iff \{z^\ast\} \subseteq \{ + \NAN(\canon_N), - \NAN(\canon_N) \} \\ + \exprofiles{\PROFDET} & \nans_N\{z^\ast\} &=& \{ + \NAN(n), - \NAN(n) ~|~ n \geq \canon_N \} + & (\iff \{z^\ast\} \not\subseteq \{ + \NAN(\canon_N), - \NAN(\canon_N) \} \\ \end{array} @@ -1210,6 +1226,55 @@ This non-deterministic result is expressed by the following auxiliary function p \end{array} +.. _op-fma: + +:math:`\fma_N(z_1, z_2, z_3)` +............................. + +The function :math:`\fma` is the same as *fusedMultiplyAdd* defined by |IEEE754|_ (Section 5.4.1). +It computes :math:`(z_1 \cdot z_2) + z_3` as if with unbounded range and precision, rounding only once for the final result. + +* If either :math:`z_1` or :math:`z_2` or :math:`z_3` is a NaN, return an element of :math:`\nans_N{z_1, z_2, z_3}`. + +* Else if either :math:`z_1` or :math:`z_2` is a zero and the other is an infinity, then return an element of :math:`\nans_N\{\}`. + +* Else if both :math:`z_1` or :math:`z_2` are infinities of equal sign, and :math:`z_3` is a negative infinity, then return an element of :math:`\nans_N\{\}`. + +* Else if both :math:`z_1` or :math:`z_2` are infinities of opposite sign, and :math:`z_3` is a positive infinity, then return an element of :math:`\nans_N\{\}`. + +* Else if either :math:`z_1` or :math:`z_2` is an infinity and the other is a value of the same sign, and :math:`z_3` is a negative infinity, then return an element of :math:`\nans_N\{\}`. + +* Else if either :math:`z_1` or :math:`z_2` is an infinity and the other is a value of the opposite sign, and :math:`z_3` is a positive infinity, then return an element of :math:`\nans_N\{\}`. + +* Else if both :math:`z_1` and :math:`z_2` are zeroes of the same sign and :math:`z_3` is a zero, then return positive zero. + +* Else if both :math:`z_1` and :math:`z_2` are zeroes of the opposite sign and :math:`z_3` is a positive zero, then return positive zero. + +* Else if both :math:`z_1` and :math:`z_2` are zeroes of the opposite sign and :math:`z_3` is a negative zero, then return negative zero. + +* Else return the result of multiplying :math:`z_1` and :math:`z_2`, adding :math:`z_3` to the intermediate, and the final result ref:`rounded ` to the nearest representable value. + +.. math:: + \begin{array}{@{}llcll} + & \fma_N(\pm \NAN(n), z_2, z_3) &=& \nans_N\{\pm \NAN(n), z_2, z_3\} \\ + & \fma_N(z_1, \pm \NAN(n), z_3) &=& \nans_N\{\pm \NAN(n), z_1, z_3\} \\ + & \fma_N(z_1, z_2, \pm \NAN(n)) &=& \nans_N\{\pm \NAN(n), z_1, z_2\} \\ + & \fma_N(\pm \infty, \pm 0, z_3) &=& \nans_N\{\} \\ + & \fma_N(\pm \infty, \mp 0, z_3) &=& \nans_N\{\} \\ + & \fma_N(\pm \infty, \pm \infty, - \infty) &=& \nans_N\{\} \\ + & \fma_N(\pm \infty, \mp \infty, + \infty) &=& \nans_N\{\} \\ + & \fma_N(\pm q_1, \pm \infty, - \infty) &=& \nans_N\{\} \\ + & \fma_N(\pm q_1, \mp \infty, + \infty) &=& \nans_N\{\} \\ + & \fma_N(\pm \infty, \pm q_1, - \infty) &=& \nans_N\{\} \\ + & \fma_N(\mp \infty, \pm q_1, + \infty) &=& \nans_N\{\} \\ + & \fma_N(\pm 0, \pm 0, \mp 0) &=& + 0 \\ + & \fma_N(\pm 0, \pm 0, \pm 0) &=& + 0 \\ + & \fma_N(\pm 0, \mp 0, + 0) &=& + 0 \\ + & \fma_N(\pm 0, \mp 0, - 0) &=& - 0 \\ + & \fma_N(z_1, z_2, z_3) &=& \ieee_N(z_1 \cdot z_2 + z_3) \\ + \end{array} + + .. _op-fmin: :math:`\fmin_N(z_1, z_2)` @@ -1817,14 +1882,14 @@ Conversions * Else if :math:`z` is positive infinity, then return :math:`2^{N-1} - 1`. -* Else, return :math:`\sats_N(\truncz(z))`. +* Else, return the value whose signed interpretation is :math:`\sats_N(\trunc(z))`. .. math:: \begin{array}{lll@{\qquad}l} \truncsats_{M,N}(\pm \NAN(n)) &=& 0 \\ \truncsats_{M,N}(- \infty) &=& -2^{N-1} \\ \truncsats_{M,N}(+ \infty) &=& 2^{N-1}-1 \\ - \truncsats_{M,N}(z) &=& \sats_N(\truncz(z)) \\ + \truncsats_{M,N}(z) &=& \signed_N^{-1}(\sats_N(\trunc(z))) \\ \end{array} @@ -1919,11 +1984,11 @@ Conversions * Let :math:`j` be the :ref:`signed interpretation ` of :math:`i` of size :math:`M`. -* Return :math:`\sats_N(j)`. +* Return the value whose signed interpretation is :math:`\sats_N(j)`. .. math:: \begin{array}{lll@{\qquad}l} - \narrows_{M,N}(i) &=& \sats_N(\signed_M(i)) + \narrows_{M,N}(i) &=& \signed_N^{-1}(\sats_N(\signed_M(i))) \end{array} :math:`\narrowu_{M,N}(i)` @@ -1937,3 +2002,282 @@ Conversions \begin{array}{lll@{\qquad}l} \narrowu_{M,N}(i) &=& \satu_N(\signed_M(i)) \end{array} + + +.. _relaxed-ops: +.. _aux-relaxed: + +Relaxed Operations +~~~~~~~~~~~~~~~~~~ + +The result of *relaxed* operators are *implementation-dependent*, because the set of possible results may depend on properties of the host environment, such as its hardware. +Technically, their behaviour is controlled by a set of *global parameters* to the semantics that an implementation can instantiate in different ways. +These choices are fixed, that is, parameters are constant during the execution of any given program. + +Every such parameter is an index into a sequence of possible sets of results and must be instantiated to a defined index. +In the :ref:`deterministic profile `, every parameter is prescribed to be 0. +This behaviour is expressed by the following auxiliary function, +where :math:`R` is a global parameter selecting one of the allowed outcomes: + +.. math:: + \begin{array}{@{}lcll} + \EXPROFDET & \relaxed(R)[ A_0, \dots, A_n ] = A_R \\ + & \relaxed(R)[ A_0, \dots, A_n ] = A_0 \\ + \end{array} + +.. note:: + Each parameter can be thought of as inducing a family of operations + that is fixed to one particular choice by an implementation. + The fixed operation itself can still be non-deterministic or partial. + + Implementations are expexted to either choose the behaviour that is the most efficient on the underlying hardware, + or the behaviour of the deterministic profile. + + +.. _op-frelaxed_madd: + +:math:`\frelaxedmadd_N(z_1, z_2, z_3)` +...................................... + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{fmadd}} \in \{0, 1\}`. + +* Return :math:`\relaxed(R_{\F{fmadd}})[\fadd_N(\fmul_N(z_1, z_2), z_3)` or :math:`\fma_N(z_1, z_2, z_3)]`. + +.. math:: + \begin{array}{@{}lcll} + \frelaxedmadd_N(z_1, z_2, z_3) &=& \relaxed(R_{\F{fmadd}})[ \fadd_N(\fmul_N(z_1, z_2), z_3), \fma_N(z_1, z_2, z_3) ] \\ + \end{array} + +.. note:: + Relaxed multiply-add allows for fused or unfused results, + which leads to implementation-dependent rounding behaviour. + In the :ref:`deterministic profile `, + the unfused behaviour is used. + + +.. _op-frelaxed_nmadd: + +:math:`\frelaxednmadd_N(z_1, z_2, z_3)` +....................................... + +* Return :math:`\frelaxedmadd(-z_1, z_2, z_3)`. + +.. math:: + \begin{array}{@{}lcll} + \frelaxednmadd_N(z_1, z_2, z_3) &=& \frelaxedmadd_N(-z_1, z_2, z_3) \\ + \end{array} + +.. note:: + This operation is implementation-dependent because :math:`\frelaxedmadd` is implementation-dependent. + + +.. _op-frelaxed_min: + +:math:`\frelaxedmin_N(z_1, z_2)` +................................ + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{fmin}} \in \{0, 1, 2, 3\}`. + +* If :math:`z_1` is a NaN, then return :math:`\relaxed(R_{\F{fmin}})[ \fmin_N(z_1, z_2)`, \NAN(n), z_2, z_2 ]`. + +* If :math:`z_2` is a NaN, then return :math:`\relaxed(R_{\F{fmin}})[ \fmin_N(z_1, z_2)`, z_1, \NAN(n), z_1 ]`. + +* If both :math:`z_1` and :math:`z_2` are zeroes of opposite sign, then return :math:`\relaxed(R_{\F{fmin}})[ \fmin_N(z_1, z_2)`, \pm 0, \mp 0, -0 ]`. + +* Return :math:`\fmin_N(z_1, z_2)`. + +.. math:: + \begin{array}{@{}lcll} + \frelaxedmin_N(\pm \NAN(n), z_2) &=& \relaxed(R_{\F{fmin}})[ \fmin_N(\pm \NAN(n), z_2), \NAN(n), z_2, z_2 ] \\ + \frelaxedmin_N(z_1, \pm \NAN(n)) &=& \relaxed(R_{\F{fmin}})[ \fmin_N(z_1, \pm \NAN(n)), z_1, \NAN(n), z_1 ] \\ + \frelaxedmin_N(\pm 0, \mp 0) &=& \relaxed(R_{\F{fmin}})[ \fmin_N(\pm 0, \mp 0), \pm 0, \mp 0, -0 ] \\ + \frelaxedmin_N(z_1, z_2) &=& \fmin_N(z_1, z_2) & (\otherwise) \\ + \end{array} + +.. note:: + Relaxed minimum is implementation-dependent for NaNs and for zeroes with different signs. + In the :ref:`deterministic profile `, + it behaves like regular :math:`\fmin`. + + +.. _op-frelaxed_max: + +:math:`\frelaxedmax_N(z_1, z_2)` +................................ + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{fmax}} \in \{0, 1, 2, 3\}`. + +* If :math:`z_1` is a NaN, then return :math:`\relaxed(R_{\F{fmax}})[ \fmax_N(z_1, z_2)`, \NAN(n), z_2, z_2 ]`. + +* If :math:`z_2` is a NaN, then return :math:`\relaxed(R_{\F{fmax}})[ \fmax_N(z_1, z_2)`, z_1, \NAN(n), z_1 ]`. + +* If both :math:`z_1` and :math:`z_2` are zeroes of opposite sign, then return :math:`\relaxed(R_{\F{fmax}})[ \fmax_N(z_1, z_2)`, \pm 0, \mp 0, +0 ]`. + +* Return :math:`\fmax_N(z_1, z_2)`. + +.. math:: + \begin{array}{@{}lcll} + \frelaxedmax_N(\pm \NAN(n), z_2) &=& \relaxed(R_{\F{fmax}})[ \fmax_N(\pm \NAN(n), z_2), \NAN(n), z_2, z_2 ] \\ + \frelaxedmax_N(z_1, \pm \NAN(n)) &=& \relaxed(R_{\F{fmax}})[ \fmax_N(z_1, \pm \NAN(n)), z_1, \NAN(n), z_1 ] \\ + \frelaxedmax_N(\pm 0, \mp 0) &=& \relaxed(R_{\F{fmax}})[ \fmax_N(\pm 0, \mp 0), \pm 0, \mp 0, +0 ] \\ + \frelaxedmax_N(z_1, z_2) &=& \fmax_N(z_1, z_2) & (\otherwise) \\ + \end{array} + +.. note:: + Relaxed maximum is implementation-dependent for NaNs and for zeroes with different signs. + In the :ref:`deterministic profile `, + it behaves like regular :math:`\fmax`. + + +.. _op-irelaxed_dot_mul: +.. _op-irelaxed_dot: +.. _op-irelaxed_dot_add: + +:math:`\irelaxeddotmul_{M,N}(i_1, i_2)` +....................................... + +This is an auxiliary operator for the specification of |VRELAXEDDOT| and |VRELAXEDDOTADD|. + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{idot}} \in \{0, 1\}`. + +* Return :math:`\relaxed(R_{\F{idot}})[ \imul_N(\extends_{M,N}(i_1), \extends_{M,N}(i_2)), \imul_N(\extends_{M,N}(i_1), \extendu_{M,N}(i_2)) ]`. + +.. math:: + \begin{array}{@{}lcll} + \irelaxeddotmul_{M,N}(i_1, i_2) &=& \relaxed(R_{\F{idot}})[ \imul_N(\extends_{M,N}(i_1), \extends_{M,N}(i_2)), \imul_N(\extends_{M,N}(i_1), \extendu_{M,N}(i_2)) ] \\ + \end{array} + +.. note:: + Relaxed dot product is implementation-dependent when the second operand is negative in a signed intepretation. + In the :ref:`deterministic profile `, + it behaves like signed dot product. + + +.. _op-irelaxed_q15mulr_s: + +:math:`\irelaxedq15mulrs_N(i_1, i_2)` +..................................... + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{iq15mulr}} \in \{0, 1\}`. + +* If both :math:`i_1` and :math:`i_2` equal :math:`(\signed^{-1}_N(-2^{N-1})`, then return :math:`\relaxed(R_{\F{iq15mulr}})[ 2^{N-1}-1, \signed^{-1}_N(-2^{N-1}) ]`. + +* Return :math:`\iq15mulrsats(i_1, i_2)` + +.. math:: + \begin{array}{@{}lcll} + \irelaxedq15mulrs_N(\signed^{-1}_N(-2^{N-1}), \signed^{-1}_N(-2^{N-1})) &=& \relaxed(R_{\F{iq15mulr}})[ 2^{N-1}-1, \signed^{-1}_N(-2^{N-1}) ] & \\ + \irelaxedq15mulrs_N(i_1, i_2) &=& \iq15mulrsats(i_1, i_2) + \end{array} + +.. note:: + Relaxed Q15 multiplication is implementation-dependent when the result overflows. + In the :ref:`deterministic profile `, + it behaves like regular :math:`\iq15mulrsats`. + + +.. _op-relaxed_trunc: +.. _op-relaxed_trunc_u: + +:math:`\relaxedtrunc^u_{M,N}(z)` +................................ + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{trunc\_u}} \in \{0, 1, 2, 3\}`. + +* If :math:`z` is normal or subnormal and :math:`\trunc(z)` is non-negative and less than :math:`2^N`, then return :math:`\truncu_{M,N}(z)`. + +* Else, return :math:`\relaxed(R_{\F{trunc\_u}})[ \truncsatu_{M,N}(z), 2^N-1, 2^N-2, 2^(N-1) ]`. + +.. math:: + \begin{array}{@{}lcll} + \relaxedtrunc^u_{M,N}(\pm q) &=& \truncu_{M,N}(\pm q) & (\iff 0 \leq \trunc(\pm q) < 2^N) \\ + \relaxedtrunc^u_{M,N}(z) &=& \relaxed(R_{\F{trunc\_u}})[ \truncsatu_{M,N}(z), 2^{N}-1, 2^{N}-2, 2^{N-1}] & (\otherwise) \\ + \end{array} + +.. note:: + Relaxed unsigned truncation is implementation-dependent for NaNs and out-of-range values. + In the :ref:`deterministic profile `, + it behaves like regular :math:`\truncsatu`. + + +.. _op-relaxed_trunc_s: + +:math:`\relaxedtrunc^s_{M,N}(z)` +................................ + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{trunc\_s}} \in \{0, 1\}`. + +* If :math:`z` is normal or subnormal and :math:`\trunc(z)` is greater than or equal to :math:`-2^{N-1}` and less than :math:`2^{N-1}`, then return :math:`\truncs_{M,N}(z)`. + +* Else, return :math:`\relaxed(R_{\F{trunc\_s}})[ \truncsats_{M,N}(z), 2^N-1, 2^N-2, 2^(N-1) ]`. + +.. math:: + \begin{array}{@{}lcll} + \relaxedtrunc^s_{M,N}(\pm q) &=& \truncs_{M,N}(\pm q) & (\iff -2^{N-1} \leq \trunc(\pm q) < 2^{N-1}) \\ + \relaxedtrunc^s_{M,N}(z) &=& \relaxed(R_{\F{trunc\_s}})[ \truncsats_{M,N}(z), \signed^{-1}_N(-2^{N-1})] & (\otherwise) \\ + \end{array} + +.. note:: + Relaxed signed truncation is implementation-dependent for NaNs and out-of-range values. + In the :ref:`deterministic profile `, + it behaves like regular :math:`\truncsats`. + + +.. _op-ivrelaxed_swizzle: +.. _op-ivrelaxed_swizzle_lane: + +:math:`\ivrelaxedswizzle(i^n, j^n)` +................................... + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{swizzle}} \in \{0, 1\}`. + +* For each :math:`j_k` in :math:`j^n`, let :math:`r_k` be the value :math:`\ivrelaxedswizzlelane(i^n, j_k)`. + +* Let :math:`r^n` be the concatenation of all :math:`r_k`. + +* Return :math:`r^n`. + +.. math:: + \begin{array}{@{}lcl} + \ivrelaxedswizzle(i^n, j^n) &=& \ivrelaxedswizzlelane(i^n, j)^n \\ + \end{array} + +where: + +.. math:: + \begin{array}{@{}lcll} + \ivrelaxedswizzlelane(i^n, j) &=& i[j] & (\iff j < 16) \\ + \ivrelaxedswizzlelane(i^n, j) &=& 0 & (\iff \signed_8(j) < 0) \\ + \ivrelaxedswizzlelane(i^n, j) &=& \relaxed(R_{\F{swizzle}})[ 0, i[j \mod n] ] & (\otherwise) \\ + \end{array} + +.. note:: + Relaxed swizzle is implementation-dependent + if the signed interpretation of any of the 8-bit indices in :math:`j^n` is larger than or equal to 16. + In the :ref:`deterministic profile `, + it behaves like regular :math:`\VSWIZZLE`. + + +.. _op-irelaxed_laneselect: + +:math:`\irelaxedlaneselect_N(i_1, i_2, i_3)` +............................................ + +The implementation-specific behaviour of this operation is determined by the global parameter :math:`R_{\F{laneselect}} \in \{0, 1\}`. + +* If :math:`i_3` is smaller than :math:`2^{N-1}`, then let :math:`i'_3` be the value :math:`0`, otherwise :math:`2^N-1`. + +* Let :math:`i''_3` be :math:`\relaxed(R_{\F{laneselect}})[i_3, i'_3]`. + +* Return :math:`\ibitselect_N(i_1, i_2, i''_3)`. + +.. math:: + \begin{array}{@{}lcll} + \irelaxedlaneselect_N(i_1, i_2, i_3) &=& \ibitselect_N(i_1, i_2, \relaxed(R_{\F{laneselect}})[ i_3, \extends_{1,N}(\ishru_N(i_3, N-1)) ]) \\ + \end{array} + +.. note:: + Relaxed lane selection is non-deterministic when the mask mixes set and cleared bits, + since the value of the high bit may or may not be expanded to all bits. + In the :ref:`deterministic profile `, + it behaves like :math:`\ibitselect`. diff --git a/document/core/syntax/instructions.rst b/document/core/syntax/instructions.rst index 7617d080bd..ec5f8a9661 100644 --- a/document/core/syntax/instructions.rst +++ b/document/core/syntax/instructions.rst @@ -100,13 +100,17 @@ For the other integer instructions, the use of two's complement for the signed i .. _syntax-vvtestop: .. _syntax-vtestop: .. _syntax-vrelop: +.. _syntax-vswizzlop: .. _syntax-vshiftop: .. _syntax-vunop: .. _syntax-vbinop: +.. _syntax-vternop: .. _syntax-vextunop: .. _syntax-vextbinop: +.. _syntax-vextternop: .. _syntax-vcvtop: .. _syntax-instr-vec: +.. _syntax-instr-vec-relaxed: Vector Instructions ~~~~~~~~~~~~~~~~~~~ @@ -117,7 +121,7 @@ $${syntax: {lanetype dim shape ishape} half__ zero__ laneidx instr/vec} $${syntax: vvunop vvbinop vvternop vvtestop - vunop_ vbinop_ vtestop_ vrelop_ vshiftop_ vextunop__ vextbinop__ vcvtop__ + vunop_ vbinop_ vternop_ vtestop_ vrelop_ vswizzlop_ vshiftop_ vextunop__ vextbinop__ vextternop__ vcvtop__ } Vector instructions have a naming convention involving a *shape* prefix that diff --git a/document/core/text/instructions.rst b/document/core/text/instructions.rst index 37b675fa1f..cc104c282c 100644 --- a/document/core/text/instructions.rst +++ b/document/core/text/instructions.rst @@ -1053,6 +1053,31 @@ Vector constant instructions have a mandatory :ref:`shape ` descri \text{f64x2.promote\_low\_f32x4} &\Rightarrow& \F64X2.\VPROMOTE\K{\_low\_f32x4}\\ \end{array} +.. math:: + \begin{array}{llclll} + \phantom{\production{instruction}} & \phantom{\Tplaininstr_I} &\phantom{::=}& \phantom{averylonginstructionnameforvectext} && \phantom{vechasreallyreallyreallylonginstructionnames} \\[-2ex] &&|& + \text{i16x8.relaxed\_swizzle} &\Rightarrow& \I16X8.\VRELAXEDSWIZZLE \\ &&|& + \text{i32x4.relaxed\_trunc\_f32x4\_s} &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_s} \\ &&|& + \text{i32x4.relaxed\_trunc\_f32x4\_u} &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_u} \\ &&|& + \text{i32x4.relaxed\_trunc\_f32x4\_s\_zero} &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_s\_zero} \\ &&|& + \text{i32x4.relaxed\_trunc\_f32x4\_u\_zero} &\Rightarrow& \I32X4.\VRELAXEDTRUNC\K{\_f32x4\_u\_zero} \\ &&|& + \text{f32x4.relaxed\_madd} &\Rightarrow& \F32X4.\VRELAXEDMADD \\ &&|& + \text{f32x4.relaxed\_nmadd} &\Rightarrow& \F32X4.\VRELAXEDNMADD \\ &&|& + \text{f64x2.relaxed\_madd} &\Rightarrow& \F64X2.\VRELAXEDMADD \\ &&|& + \text{f64x2.relaxed\_nmadd} &\Rightarrow& \F64X2.\VRELAXEDNMADD \\ &&|& + \text{i8x16.relaxed\_laneselect} &\Rightarrow& \I8X16.\VRELAXEDLANESELECT \\ &&|& + \text{i16x8.relaxed\_laneselect} &\Rightarrow& \I16X8.\VRELAXEDLANESELECT \\ &&|& + \text{i32x4.relaxed\_laneselect} &\Rightarrow& \I32X4.\VRELAXEDLANESELECT \\ &&|& + \text{i64x2.relaxed\_laneselect} &\Rightarrow& \I64X2.\VRELAXEDLANESELECT \\ &&|& + \text{f32x4.relaxed\_min} &\Rightarrow& \F32X4.\VRELAXEDMIN \\ &&|& + \text{f32x4.relaxed\_max} &\Rightarrow& \F32X4.\VRELAXEDMAX \\ &&|& + \text{f64x2.relaxed\_min} &\Rightarrow& \F64X2.\VRELAXEDMIN \\ &&|& + \text{f64x2.relaxed\_max} &\Rightarrow& \F64X2.\VRELAXEDMAX \\ &&|& + \text{i16x8.relaxed\_q15mulr\_s} &\Rightarrow& \I16X8.\VRELAXEDQ15MULR\K{\_s} \\ &&|& + \text{i16x8.relaxed\_dot\_i8x16\_i7x16\_s} &\Rightarrow& \I16X8.\VRELAXEDDOT\K{\_i8x16\_i7x16\_s} \\ &&|& + \text{i16x8.relaxed\_dot\_i8x16\_i7x16\_add\_s} &\Rightarrow& \I16X8.\VRELAXEDDOT\K{\_i8x16\_i7x16\_add\_s} + \end{array} + .. index:: ! folded instruction, S-expression .. _text-foldedinstr: diff --git a/document/core/util/bikeshed_fixup.py b/document/core/util/bikeshed_fixup.py index 7041d875de..bcef6c1af1 100755 --- a/document/core/util/bikeshed_fixup.py +++ b/document/core/util/bikeshed_fixup.py @@ -29,10 +29,12 @@ def Main(): number = 1 for section in [ 'Embedding', + 'Profiles', 'Implementation Limitations', 'Validation Algorithm', 'Custom Sections', 'Soundness', + 'Changes', 'Index of Types', 'Index of Instructions', 'Index of Semantic Rules']: diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 934bd53978..9c897515a0 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -111,6 +111,18 @@ .. |bigcompose| mathdef:: \xref{syntax/conventions}{notation-compose}{\bigoplus} +.. Profile Annotations +.. ------------------- + +.. |exprofiles#1| mathdef:: {^{\small{[!#1]}}} +.. |profilename#1| mathdef:: {\small{\mathrm{#1}}} +.. |profile| mathdef:: \mathrm + +.. |PROFFULL| mathdef:: \xref{appendix/profiles}{profile-full}{\profile{FUL}} +.. |PROFDET| mathdef:: \xref{appendix/profiles}{profile-deterministic}{\profile{DET}} +.. |EXPROFDET| mathdef:: \exprofiles{\PROFDET} + + .. Abstract Syntax .. --------------- @@ -699,6 +711,16 @@ .. |VEXTADDPAIRWISE| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{extadd\_pairwise}} .. |VDEMOTE| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{demote}} .. |VPROMOTE| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{promote}} +.. |VRELAXEDMADD| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_madd}} +.. |VRELAXEDNMADD| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_nmadd}} +.. |VRELAXEDSWIZZLE| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_swizzle}} +.. |VRELAXEDLANESELECT| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_laneselect}} +.. |VRELAXEDMIN| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_min}} +.. |VRELAXEDMAX| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_max}} +.. |VRELAXEDQ15MULR| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_q15mulr}} +.. |VRELAXEDTRUNC| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_trunc}} +.. |VRELAXEDDOT| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_dot}} +.. |VRELAXEDDOTADD| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{relaxed\_dot\_add}} .. |LOW| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{low}} .. |HIGH| mathdef:: \xref{syntax/instructions}{syntax-instr-vec}{\K{high}} @@ -741,17 +763,21 @@ .. |vunop| mathdef:: \xref{syntax/instructions}{syntax-vunop}{\X{vunop}} .. |vbinop| mathdef:: \xref{syntax/instructions}{syntax-vbinop}{\X{vbinop}} +.. |vternop| mathdef:: \xref{syntax/instructions}{syntax-vternop}{\X{vternop}} .. |vtestop| mathdef:: \xref{syntax/instructions}{syntax-vrelop}{\X{vtestop}} .. |vrelop| mathdef:: \xref{syntax/instructions}{syntax-vrelop}{\X{vrelop}} .. |vcvtop| mathdef:: \xref{syntax/instructions}{syntax-vcvtop}{\X{vcvtop}} .. |vextunop| mathdef:: \xref{syntax/instructions}{syntax-vextunop}{\X{vextunop}} .. |vextbinop| mathdef:: \xref{syntax/instructions}{syntax-vextbinop}{\X{vextbinop}} +.. |vextternop| mathdef:: \xref{syntax/instructions}{syntax-vextternop}{\X{vextternop}} +.. |vswizzlop| mathdef:: \xref{syntax/instructions}{syntax-vswizzlop}{\X{vswizzlop}} .. |vshiftop| mathdef:: \xref{syntax/instructions}{syntax-vshiftop}{\X{vshiftop}} .. |viunop| mathdef:: \xref{syntax/instructions}{syntax-vunop}{\X{viunop}} .. |vibinop| mathdef:: \xref{syntax/instructions}{syntax-vbinop}{\X{vibinop}} .. |vitestop| mathdef:: \xref{syntax/instructions}{syntax-vtestop}{\X{vitestop}} .. |virelop| mathdef:: \xref{syntax/instructions}{syntax-vrelop}{\X{virelop}} +.. |viswizzlop| mathdef:: \xref{syntax/instructions}{syntax-vswizzlop}{\X{viswizzlop}} .. |vishiftop| mathdef:: \xref{syntax/instructions}{syntax-vshiftop}{\X{vishiftop}} .. |vfunop| mathdef:: \xref{syntax/instructions}{syntax-vunop}{\X{vfunop}} @@ -1616,6 +1642,7 @@ .. |ictz| mathdef:: \xref{exec/numerics}{op-ictz}{\F{ictz}} .. |ipopcnt| mathdef:: \xref{exec/numerics}{op-ipopcnt}{\F{ipopcnt}} .. |ieqz| mathdef:: \xref{exec/numerics}{op-ieqz}{\F{ieqz}} +.. |inez| mathdef:: \xref{exec/numerics}{op-inez}{\F{inez}} .. |ieq| mathdef:: \xref{exec/numerics}{op-ieq}{\F{ieq}} .. |ine| mathdef:: \xref{exec/numerics}{op-ine}{\F{ine}} .. |ilt| mathdef:: \xref{exec/numerics}{op-ilt}{\F{ilt}} @@ -1655,6 +1682,7 @@ .. |fsub| mathdef:: \xref{exec/numerics}{op-fsub}{\F{fsub}} .. |fmul| mathdef:: \xref{exec/numerics}{op-fmul}{\F{fmul}} .. |fdiv| mathdef:: \xref{exec/numerics}{op-fdiv}{\F{fdiv}} +.. |fma| mathdef:: \xref{exec/numerics}{op-fma}{\F{fma}} .. |fmin| mathdef:: \xref{exec/numerics}{op-fmin}{\F{fmin}} .. |fmax| mathdef:: \xref{exec/numerics}{op-fmax}{\F{fmax}} .. |fcopysign| mathdef:: \xref{exec/numerics}{op-fcopysign}{\F{fcopysign}} @@ -1694,6 +1722,19 @@ .. |narrowu| mathdef:: \xref{exec/numerics}{op-narrow}{\F{narrow}^{\K{u}}} .. |narrows| mathdef:: \xref{exec/numerics}{op-narrow}{\F{narrow}^{\K{s}}} +.. |frelaxedmadd| mathdef:: \xref{exec/numerics}{op-frelaxed_madd}{\F{frelaxed\_madd}} +.. |frelaxednmadd| mathdef:: \xref{exec/numerics}{op-frelaxed_nmadd}{\F{frelaxed\_nmadd}} +.. |ivrelaxedswizzlelane| mathdef:: \xref{exec/numerics}{op-ivrelaxed_swizzle_lane}{\F{ivrelaxed\_swizzle\_lane}} +.. |ivrelaxedswizzle| mathdef:: \xref{exec/numerics}{op-ivrelaxed_swizzle}{\F{ivrelaxed\_swizzle}} +.. |relaxedtrunc| mathdef:: \xref{exec/numerics}{op-relaxed_trunc}{\F{relaxed\_trunc}} +.. |irelaxedlaneselect| mathdef:: \xref{exec/numerics}{op-irelaxed_laneselect}{\F{irelaxed\_laneselect}} +.. |frelaxedmin| mathdef:: \xref{exec/numerics}{op-frelaxed_min}{\F{frelaxed\_min}} +.. |frelaxedmax| mathdef:: \xref{exec/numerics}{op-frelaxed_max}{\F{frelaxed\_max}} +.. |irelaxedq15mulrs| mathdef:: \xref{exec/numerics}{op-irelaxed_q15mulr_s}{\F{irelaxed\_q15mulr\_s}} +.. |irelaxeddot| mathdef:: \xref{exec/numerics}{op-irelaxed_dot}{\F{irelaxed\_dot}} +.. |irelaxeddotadd| mathdef:: \xref{exec/numerics}{op-irelaxed_dot_add}{\F{irelaxed\_dot\_add}} +.. |irelaxeddotmul| mathdef:: \xref{exec/numerics}{op-irelaxed_dot_mul}{\F{irelaxed\_dot\_mul}} + .. Numerics, meta functions @@ -1716,6 +1757,8 @@ .. |lanes| mathdef:: \xref{exec/numerics}{aux-lanes}{\F{lanes}} +.. |relaxed| mathdef:: \xref{exec/numerics}{aux-relaxed}{\F{relaxed}} + .. Other meta functions diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index f94a00d8ca..2326f846f0 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -773,6 +773,20 @@ $${rule: Instr_ok/vunop} $${rule: Instr_ok/vbinop} +.. _valid-vternop: + +:math:`\shape\K{.}\vternop` +........................... + +* The instruction is valid with type :math:`[\V128~\V128~\V128] \to [\V128]`. + +.. math:: + \frac{ + }{ + C \vdashinstr \shape\K{.}\vternop : [\V128~\V128~\V128] \to [\V128] + } + + .. _valid-vtestop: :math:`\shape\K{.}\vtestop` @@ -813,14 +827,14 @@ $${rule: Instr_ok/vshiftop} $${rule: Instr_ok/vbitmask} -.. _valid-vswizzle: +.. _valid-vswizzlop: -:math:`\K{i8x16.}\VSWIZZLE` -........................... +:math:`\K{i8x16.}\viswizzlop` +............................. * The instruction is valid with type :math:`[\V128~\V128] \to [\V128]`. -$${rule: Instr_ok/vswizzle} +$${rule: Instr_ok/vswizzlop} .. _valid-vshuffle: @@ -895,6 +909,16 @@ $${rule: Instr_ok/vextunop} $${rule: Instr_ok/vextbinop} +.. _valid-vextternop: + +:math:`\ishape_1\K{.}\VRELAXEDDOTADD\K{\_}\ishape_2\K{\_}\ishape_3` +................................................................... + +* The instruction is valid with type :math:`[\V128~\V128~\V128] \to [\V128]`. + +$${rule: Instr_ok/vextternop} + + .. _valid-vnarrow: :math:`\ishape_1\K{.}\VNARROW\K{\_}\ishape_2\K{\_}\sx` diff --git a/interpreter/README.md b/interpreter/README.md index fc37dc14fc..f95f4b6bb7 100644 --- a/interpreter/README.md +++ b/interpreter/README.md @@ -471,6 +471,7 @@ result_pat: ( ref.func ) ( ref.extern ) ( ref. ) + ( either + ) ;; alternative results num_pat: ;; literal result @@ -574,6 +575,7 @@ result_pat: ( ref.func ) ( ref.extern ) ( ref. ) + ( either + ) ;; alternative results num_pat: ;; literal result diff --git a/interpreter/binary/decode.ml b/interpreter/binary/decode.ml index 8411881762..165e575641 100644 --- a/interpreter/binary/decode.ml +++ b/interpreter/binary/decode.ml @@ -963,6 +963,26 @@ let rec instr s = | 0xfdl -> i32x4_trunc_sat_f64x2_u_zero | 0xfel -> f64x2_convert_low_i32x4_s | 0xffl -> f64x2_convert_low_i32x4_u + | 0x100l -> i8x16_relaxed_swizzle + | 0x101l -> i32x4_relaxed_trunc_f32x4_s + | 0x102l -> i32x4_relaxed_trunc_f32x4_u + | 0x103l -> i32x4_relaxed_trunc_f64x2_s_zero + | 0x104l -> i32x4_relaxed_trunc_f64x2_u_zero + | 0x105l -> f32x4_relaxed_madd + | 0x106l -> f32x4_relaxed_nmadd + | 0x107l -> f64x2_relaxed_madd + | 0x108l -> f64x2_relaxed_nmadd + | 0x109l -> i8x16_relaxed_laneselect + | 0x10al -> i16x8_relaxed_laneselect + | 0x10bl -> i32x4_relaxed_laneselect + | 0x10cl -> i64x2_relaxed_laneselect + | 0x10dl -> f32x4_relaxed_min + | 0x10el -> f32x4_relaxed_max + | 0x10fl -> f64x2_relaxed_min + | 0x110l -> f64x2_relaxed_max + | 0x111l -> i16x8_relaxed_q15mulr_s + | 0x112l -> i16x8_relaxed_dot_i8x16_i7x16_s + | 0x113l -> i32x4_relaxed_dot_i8x16_i7x16_add_s | n -> illegal s pos (I32.to_int_u n) ) diff --git a/interpreter/binary/encode.ml b/interpreter/binary/encode.ml index 072c351210..a6d2387a30 100644 --- a/interpreter/binary/encode.ml +++ b/interpreter/binary/encode.ml @@ -741,6 +741,7 @@ struct | VecBinary (V128 (I8x16 V128Op.MaxS)) -> vecop 0x78l | VecBinary (V128 (I8x16 V128Op.MaxU)) -> vecop 0x79l | VecBinary (V128 (I8x16 V128Op.AvgrU)) -> vecop 0x7bl + | VecBinary (V128 (I8x16 V128Op.RelaxedSwizzle)) -> vecop 0x100l | VecBinary (V128 (I16x8 V128Op.NarrowS)) -> vecop 0x85l | VecBinary (V128 (I16x8 V128Op.NarrowU)) -> vecop 0x86l | VecBinary (V128 (I16x8 V128Op.Add)) -> vecop 0x8el @@ -760,6 +761,8 @@ struct | VecBinary (V128 (I16x8 V128Op.ExtMulLowU)) -> vecop 0x9el | VecBinary (V128 (I16x8 V128Op.ExtMulHighU)) -> vecop 0x9fl | VecBinary (V128 (I16x8 V128Op.Q15MulRSatS)) -> vecop 0x82l + | VecBinary (V128 (I16x8 V128Op.RelaxedQ15MulRS)) -> vecop 0x111l + | VecBinary (V128 (I16x8 V128Op.RelaxedDot)) -> vecop 0x112l | VecBinary (V128 (I32x4 V128Op.Add)) -> vecop 0xael | VecBinary (V128 (I32x4 V128Op.Sub)) -> vecop 0xb1l | VecBinary (V128 (I32x4 V128Op.MinS)) -> vecop 0xb6l @@ -787,6 +790,8 @@ struct | VecBinary (V128 (F32x4 V128Op.Max)) -> vecop 0xe9l | VecBinary (V128 (F32x4 V128Op.Pmin)) -> vecop 0xeal | VecBinary (V128 (F32x4 V128Op.Pmax)) -> vecop 0xebl + | VecBinary (V128 (F32x4 V128Op.RelaxedMin)) -> vecop 0x10dl + | VecBinary (V128 (F32x4 V128Op.RelaxedMax)) -> vecop 0x10el | VecBinary (V128 (F64x2 V128Op.Add)) -> vecop 0xf0l | VecBinary (V128 (F64x2 V128Op.Sub)) -> vecop 0xf1l | VecBinary (V128 (F64x2 V128Op.Mul)) -> vecop 0xf2l @@ -795,9 +800,23 @@ struct | VecBinary (V128 (F64x2 V128Op.Max)) -> vecop 0xf5l | VecBinary (V128 (F64x2 V128Op.Pmin)) -> vecop 0xf6l | VecBinary (V128 (F64x2 V128Op.Pmax)) -> vecop 0xf7l + | VecBinary (V128 (F64x2 V128Op.RelaxedMin)) -> vecop 0x10fl + | VecBinary (V128 (F64x2 V128Op.RelaxedMax)) -> vecop 0x110l | VecBinary (V128 _) -> error e.at "illegal binary vector instruction" + | VecTernary (V128 (F32x4 V128Op.RelaxedMadd)) -> vecop 0x105l + | VecTernary (V128 (F32x4 V128Op.RelaxedNmadd)) -> vecop 0x106l + | VecTernary (V128 (F64x2 V128Op.RelaxedMadd)) -> vecop 0x107l + | VecTernary (V128 (F64x2 V128Op.RelaxedNmadd)) -> vecop 0x108l + | VecTernary (V128 (I8x16 V128Op.RelaxedLaneselect)) -> vecop 0x109l + | VecTernary (V128 (I16x8 V128Op.RelaxedLaneselect)) -> vecop 0x10al + | VecTernary (V128 (I32x4 V128Op.RelaxedLaneselect)) -> vecop 0x10bl + | VecTernary (V128 (I64x2 V128Op.RelaxedLaneselect)) -> vecop 0x10cl + | VecTernary (V128 (I32x4 V128Op.RelaxedDotAdd)) -> vecop 0x113l + | VecTernary (V128 _) -> + error e.at "illegal ternary vector instruction" + | VecConvert (V128 (I8x16 _)) -> error e.at "illegal i8x16 conversion instruction" | VecConvert (V128 (I16x8 V128Op.ExtendLowS)) -> vecop 0x87l @@ -818,6 +837,10 @@ struct | VecConvert (V128 (I32x4 V128Op.TruncSatUF32x4)) -> vecop 0xf9l | VecConvert (V128 (I32x4 V128Op.TruncSatSZeroF64x2)) -> vecop 0xfcl | VecConvert (V128 (I32x4 V128Op.TruncSatUZeroF64x2)) -> vecop 0xfdl + | VecConvert (V128 (I32x4 V128Op.RelaxedTruncSF32x4)) -> vecop 0x101l + | VecConvert (V128 (I32x4 V128Op.RelaxedTruncUF32x4)) -> vecop 0x102l + | VecConvert (V128 (I32x4 V128Op.RelaxedTruncSZeroF64x2)) -> vecop 0x103l + | VecConvert (V128 (I32x4 V128Op.RelaxedTruncUZeroF64x2)) -> vecop 0x104l | VecConvert (V128 (I64x2 V128Op.ExtendLowS)) -> vecop 0xc7l | VecConvert (V128 (I64x2 V128Op.ExtendHighS)) -> vecop 0xc8l | VecConvert (V128 (I64x2 V128Op.ExtendLowU)) -> vecop 0xc9l diff --git a/interpreter/exec/eval.ml b/interpreter/exec/eval.ml index b04cb5db2a..dddc8cc75e 100644 --- a/interpreter/exec/eval.ml +++ b/interpreter/exec/eval.ml @@ -944,6 +944,10 @@ let rec step (c : config) : config = (try Vec (Eval_vec.eval_binop binop n1 n2) :: vs', [] with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at]) + | VecTernary ternop, Vec v3 :: Vec v2 :: Vec v1 :: vs' -> + (try Vec (Eval_vec.eval_ternop ternop v1 v2 v3) :: vs', [] + with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at]) + | VecCompare relop, Vec n2 :: Vec n1 :: vs' -> (try Vec (Eval_vec.eval_relop relop n1 n2) :: vs', [] with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at]) diff --git a/interpreter/exec/eval_vec.ml b/interpreter/exec/eval_vec.ml index a3b9986ff8..bfc0f6d641 100644 --- a/interpreter/exec/eval_vec.ml +++ b/interpreter/exec/eval_vec.ml @@ -61,6 +61,7 @@ struct | I8x16 MaxS -> V128.I8x16.max_s | I8x16 MaxU -> V128.I8x16.max_u | I8x16 AvgrU -> V128.I8x16.avgr_u + | I8x16 RelaxedSwizzle -> V128.V8x16.swizzle | I16x8 NarrowS -> V128.I16x8_convert.narrow_s | I16x8 NarrowU -> V128.I16x8_convert.narrow_u | I16x8 Add -> V128.I16x8.add @@ -80,6 +81,8 @@ struct | I16x8 ExtMulLowU -> V128.I16x8_convert.extmul_low_u | I16x8 ExtMulHighU -> V128.I16x8_convert.extmul_high_u | I16x8 Q15MulRSatS -> V128.I16x8.q15mulr_sat_s + | I16x8 RelaxedQ15MulRS -> V128.I16x8.q15mulr_sat_s + | I16x8 RelaxedDot -> V128.I16x8_convert.dot_s | I32x4 Add -> V128.I32x4.add | I32x4 Sub -> V128.I32x4.sub | I32x4 MinS -> V128.I32x4.min_s @@ -107,6 +110,8 @@ struct | F32x4 Max -> V128.F32x4.max | F32x4 Pmin -> V128.F32x4.pmin | F32x4 Pmax -> V128.F32x4.pmax + | F32x4 RelaxedMin -> V128.F32x4.min + | F32x4 RelaxedMax -> V128.F32x4.max | F64x2 Add -> V128.F64x2.add | F64x2 Sub -> V128.F64x2.sub | F64x2 Mul -> V128.F64x2.mul @@ -115,9 +120,25 @@ struct | F64x2 Max -> V128.F64x2.max | F64x2 Pmin -> V128.F64x2.pmin | F64x2 Pmax -> V128.F64x2.pmax + | F64x2 RelaxedMin -> V128.F64x2.min + | F64x2 RelaxedMax -> V128.F64x2.max | _ -> assert false in fun v1 v2 -> to_vec (f (of_vec 1 v1) (of_vec 2 v2)) + let ternop (op : ternop) = + let f = match op with + | F32x4 RelaxedMadd -> V128.F32x4.fma + | F32x4 RelaxedNmadd -> V128.F32x4.fnma + | F64x2 RelaxedMadd -> V128.F64x2.fma + | F64x2 RelaxedNmadd -> V128.F64x2.fnma + | I8x16 RelaxedLaneselect -> V128.V1x128.bitselect + | I16x8 RelaxedLaneselect -> V128.V1x128.bitselect + | I32x4 RelaxedLaneselect -> V128.V1x128.bitselect + | I64x2 RelaxedLaneselect -> V128.V1x128.bitselect + | I32x4 RelaxedDotAdd -> V128.I32x4_convert.dot_s_add + | _ -> assert false + in fun v1 v2 v3 -> to_vec (f (of_vec 1 v1) (of_vec 2 v2) (of_vec 3 v3)) + let relop (op : relop) = let f = match op with | I8x16 Eq -> V128.I8x16.eq @@ -187,6 +208,10 @@ struct | I32x4 TruncSatUF32x4 -> V128.I32x4_convert.trunc_sat_f32x4_u | I32x4 TruncSatSZeroF64x2 -> V128.I32x4_convert.trunc_sat_f64x2_s_zero | I32x4 TruncSatUZeroF64x2 -> V128.I32x4_convert.trunc_sat_f64x2_u_zero + | I32x4 RelaxedTruncSF32x4 -> V128.I32x4_convert.trunc_sat_f32x4_s + | I32x4 RelaxedTruncUF32x4 -> V128.I32x4_convert.trunc_sat_f32x4_u + | I32x4 RelaxedTruncSZeroF64x2 -> V128.I32x4_convert.trunc_sat_f64x2_s_zero + | I32x4 RelaxedTruncUZeroF64x2 -> V128.I32x4_convert.trunc_sat_f64x2_u_zero | I32x4 ExtAddPairwiseS -> V128.I32x4_convert.extadd_pairwise_s | I32x4 ExtAddPairwiseU -> V128.I32x4_convert.extadd_pairwise_u | I64x2 ExtendLowS -> V128.I64x2_convert.extend_low_s @@ -301,6 +326,7 @@ let op v128 = function let eval_testop = op V128Op.testop let eval_unop = op V128Op.unop let eval_binop = op V128Op.binop +let eval_ternop = op V128Op.ternop let eval_relop = op V128Op.relop let eval_cvtop = op V128Op.cvtop let eval_shiftop = op V128Op.shiftop diff --git a/interpreter/exec/eval_vec.mli b/interpreter/exec/eval_vec.mli index 45b59033e5..f4601bd016 100644 --- a/interpreter/exec/eval_vec.mli +++ b/interpreter/exec/eval_vec.mli @@ -3,6 +3,7 @@ open Value val eval_testop : Ast.vec_testop -> vec -> bool val eval_unop : Ast.vec_unop -> vec -> vec val eval_binop : Ast.vec_binop -> vec -> vec -> vec +val eval_ternop : Ast.vec_ternop -> vec -> vec -> vec -> vec val eval_relop : Ast.vec_relop -> vec -> vec -> vec val eval_cvtop : Ast.vec_cvtop -> vec -> vec val eval_shiftop : Ast.vec_shiftop -> vec -> num -> vec diff --git a/interpreter/exec/fxx.ml b/interpreter/exec/fxx.ml index 23259a7d68..8f349706be 100644 --- a/interpreter/exec/fxx.ml +++ b/interpreter/exec/fxx.ml @@ -50,6 +50,7 @@ sig val sub : t -> t -> t val mul : t -> t -> t val div : t -> t -> t + val fma : t -> t -> t -> t val sqrt : t -> t val min : t -> t -> t val max : t -> t -> t @@ -148,6 +149,13 @@ struct let mul x y = binary x ( *.) y let div x y = binary x (/.) y + let fma x y z = + let xf = to_float x in + let yf = to_float y in + let zf = to_float z in + let t = Float.fma xf yf zf in + if t = t then of_float t else determine_binary_nan x y + let sqrt x = unary Stdlib.sqrt x let ceil x = unary Stdlib.ceil x diff --git a/interpreter/exec/v128.ml b/interpreter/exec/v128.ml index 4e9ca89276..19d2024ebf 100644 --- a/interpreter/exec/v128.ml +++ b/interpreter/exec/v128.ml @@ -191,6 +191,8 @@ sig val sub : t -> t -> t val mul : t -> t -> t val div : t -> t -> t + val fma : t -> t -> t -> t + val fnma : t -> t -> t -> t val min : t -> t -> t val max : t -> t -> t val pmin : t -> t -> t @@ -233,6 +235,9 @@ struct let sub = binop FXX.sub let mul = binop FXX.mul let div = binop FXX.div + let fma x y z = + of_lanes (Lib.List.map3 FXX.fma (to_lanes x) (to_lanes y) (to_lanes z)) + let fnma x y z = fma (unop FXX.neg x) y z let min = binop FXX.min let max = binop FXX.max let pmin = binop (fun x y -> if FXX.lt y x then y else x) @@ -381,9 +386,20 @@ struct let extadd ext x y = Int32.add (ext x) (ext y) let extadd_pairwise_s x = - I16x8.of_lanes (Lib.List.pairwise (extadd ext_s) (I8x16.to_lanes x)) + I16x8.of_lanes (Lib.List.map_pairwise (extadd ext_s) (I8x16.to_lanes x)) let extadd_pairwise_u x = - I16x8.of_lanes (Lib.List.pairwise (extadd ext_u) (I8x16.to_lanes x)) + I16x8.of_lanes (Lib.List.map_pairwise (extadd ext_u) (I8x16.to_lanes x)) + + let dot_s x y = + let xs = I8x16.to_lanes x in + let ys = I8x16.to_lanes y in + let rec dot xs ys = + match xs, ys with + | x1::x2::xs', y1::y2::ys' -> + Int32.(add (mul x1 y1) (mul x2 y2)) :: dot xs' ys' + | [], [] -> [] + | _, _ -> assert false + in I16x8.of_lanes (dot xs ys) end module I32x4_convert = @@ -418,6 +434,20 @@ struct | _, _ -> assert false in I32x4.of_lanes (dot xs ys) + let dot_s_add x y z = + let xs = I8x16.to_lanes x in + let ys = I8x16.to_lanes y in + let rec dot xs ys = + match xs, ys with + | x1::x2::x3::x4::xs', y1::y2::y3::y4::ys' -> + Int32.(add + (add (mul x1 y1) (mul x2 y2)) + (add (mul x3 y3) (mul x4 y4))) + :: dot xs' ys' + | [], [] -> [] + | _, _ -> assert false + in I32x4.add (I32x4.of_lanes (dot xs ys)) z + let extmul_low_s x y = I32x4.mul (extend_low_s x) (extend_low_s y) let extmul_high_s x y = I32x4.mul (extend_high_s x) (extend_high_s y) let extmul_low_u x y = I32x4.mul (extend_low_u x) (extend_low_u y) @@ -425,9 +455,9 @@ struct let extadd ext x y = Int32.add (ext x) (ext y) let extadd_pairwise_s x = - I32x4.of_lanes (Lib.List.pairwise (extadd ext_s) (I16x8.to_lanes x)) + I32x4.of_lanes (Lib.List.map_pairwise (extadd ext_s) (I16x8.to_lanes x)) let extadd_pairwise_u x = - I32x4.of_lanes (Lib.List.pairwise (extadd ext_u) (I16x8.to_lanes x)) + I32x4.of_lanes (Lib.List.map_pairwise (extadd ext_u) (I16x8.to_lanes x)) end module I64x2_convert = diff --git a/interpreter/exec/v128.mli b/interpreter/exec/v128.mli index f9535c1589..c4375f5f14 100644 --- a/interpreter/exec/v128.mli +++ b/interpreter/exec/v128.mli @@ -108,6 +108,8 @@ sig val sub : t -> t -> t val mul : t -> t -> t val div : t -> t -> t + val fma : t -> t -> t -> t + val fnma : t -> t -> t -> t val min : t -> t -> t val max : t -> t -> t val pmin : t -> t -> t @@ -163,6 +165,7 @@ sig val extmul_high_u : t -> t -> t val extadd_pairwise_s : t -> t val extadd_pairwise_u : t -> t + val dot_s : t -> t -> t end module I32x4_convert : @@ -176,6 +179,7 @@ sig val extend_low_u : t -> t val extend_high_u : t -> t val dot_s : t -> t -> t + val dot_s_add : t -> t -> t -> t val extmul_low_s : t -> t -> t val extmul_high_s : t -> t -> t val extmul_low_u : t -> t -> t diff --git a/interpreter/script/js.ml b/interpreter/script/js.ml index 7bacb51824..ca25ac3eb4 100644 --- a/interpreter/script/js.ml +++ b/interpreter/script/js.ml @@ -340,14 +340,24 @@ let type_of_ref_pat = function | RefTypePat ht -> (NoNull, ht) | NullPat -> (Null, BotHT) -let type_of_result res = +let rec type_of_result res = match res.it with | NumResult pat -> NumT (type_of_num_pat pat) | VecResult pat -> VecT (type_of_vec_pat pat) | RefResult pat -> RefT (type_of_ref_pat pat) + | EitherResult rs -> + let ts = List.map type_of_result rs in + List.fold_left (fun t1 t2 -> + if Match.match_val_type [] t1 t2 then t2 else + if Match.match_val_type [] t2 t1 then t1 else + if Match.(top_of_val_type [] t1 = top_of_val_type [] t2) then + Match.top_of_val_type [] t1 + else + BotT (* should really be Top, but we don't have that :) *) + ) (List.hd ts) ts let assert_return ress ts at = - let test (res, t) = + let rec test (res, t) = if not (Match.match_val_type [] t (type_of_result res)) then [ Br (0l @@ at) @@ at ] else @@ -439,6 +449,17 @@ let assert_return ress ts at = [ RefIsNull @@ at; Test (I32 I32Op.Eqz) @@ at; BrIf (0l @@ at) @@ at ] + | EitherResult ress -> + [ Block (ValBlockType None, + List.map (fun resI -> + Block (ValBlockType None, + test (resI, t) @ + [Br (1l @@ resI.at) @@ resI.at] + ) @@ resI.at + ) ress @ + [Br (1l @@ at) @@ at] + ) @@ at + ] in [], List.flatten (List.rev_map test (List.combine ress ts)) let i32 = NumT I32T @@ -585,11 +606,13 @@ let of_ref_pat = function | RefTypePat t -> "\"ref." ^ string_of_heap_type t ^ "\"" | NullPat -> "\"ref.null\"" -let of_result res = +let rec of_result res = match res.it with | NumResult np -> of_num_pat np | VecResult vp -> of_vec_pat vp | RefResult rp -> of_ref_pat rp + | EitherResult ress -> + "[" ^ String.concat ", " (List.map of_result ress) ^ "]" let rec of_definition def = match def.it with diff --git a/interpreter/script/run.ml b/interpreter/script/run.ml index b7ad1aa1e4..93bbca6eda 100644 --- a/interpreter/script/run.ml +++ b/interpreter/script/run.ml @@ -234,16 +234,6 @@ let string_of_nan = function | CanonicalNan -> "nan:canonical" | ArithmeticNan -> "nan:arithmetic" -let type_of_result r = - let open Types in - match r.it with - | NumResult (NumPat n) -> NumT (Value.type_of_num n.it) - | NumResult (NanPat n) -> NumT (Value.type_of_num n.it) - | VecResult (VecPat v) -> VecT (Value.type_of_vec v) - | RefResult (RefPat r) -> RefT (Value.type_of_ref r.it) - | RefResult (RefTypePat t) -> RefT (NoNull, t) (* assume closed *) - | RefResult (NullPat) -> RefT (Null, ExternHT) - let string_of_num_pat (p : num_pat) = match p with | NumPat n -> Value.string_of_num n.it @@ -263,16 +253,38 @@ let string_of_ref_pat (p : ref_pat) = | RefTypePat t -> Types.string_of_heap_type t | NullPat -> "null" -let string_of_result r = +let rec string_of_result r = match r.it with | NumResult np -> string_of_num_pat np | VecResult vp -> string_of_vec_pat vp | RefResult rp -> string_of_ref_pat rp + | EitherResult rs -> + "(" ^ String.concat " | " (List.map string_of_result rs) ^ ")" let string_of_results = function | [r] -> string_of_result r | rs -> "[" ^ String.concat " " (List.map string_of_result rs) ^ "]" +let rec type_of_result r = + let open Types in + match r.it with + | NumResult (NumPat n) -> NumT (Value.type_of_num n.it) + | NumResult (NanPat n) -> NumT (Value.type_of_num n.it) + | VecResult (VecPat v) -> VecT (Value.type_of_vec v) + | RefResult (RefPat r) -> RefT (Value.type_of_ref r.it) + | RefResult (RefTypePat t) -> RefT (NoNull, t) (* assume closed *) + | RefResult (NullPat) -> RefT (Null, ExternHT) + | EitherResult rs -> + let ts = List.map type_of_result rs in + List.fold_left (fun t1 t2 -> + if Match.match_val_type [] t1 t2 then t2 else + if Match.match_val_type [] t2 t1 then t1 else + if Match.(top_of_val_type [] t1 = top_of_val_type [] t2) then + Match.top_of_val_type [] t1 + else + BotT (* should really be Top, but we don't have that :) *) + ) (List.hd ts) ts + let print_results rs = let ts = List.map type_of_result rs in Printf.printf "%s : %s\n%!" @@ -406,18 +418,19 @@ let assert_ref_pat r p = | NullPat, Value.NullRef _ -> true | _ -> false -let assert_pat v r = +let rec assert_result v r = let open Value in - match v, r with + match v, r.it with | Num n, NumResult np -> assert_num_pat n np | Vec v, VecResult vp -> assert_vec_pat v vp | Ref r, RefResult rp -> assert_ref_pat r rp + | _, EitherResult rs -> List.exists (assert_result v) rs | _, _ -> false -let assert_result at got expect = +let assert_results at got expect = if List.length got <> List.length expect || - List.exists2 (fun v r -> not (assert_pat v r.it)) got expect + not (List.for_all2 assert_result got expect) then begin print_string "Result: "; print_values got; print_string "Expect: "; print_results expect; @@ -503,7 +516,7 @@ let run_assertion ass = | AssertReturn (act, rs) -> trace ("Asserting return..."); let vs = run_action act in - assert_result ass.at vs rs + assert_results ass.at vs rs | AssertException act -> trace ("Asserting exception..."); diff --git a/interpreter/script/run.mli b/interpreter/script/run.mli index e9f6e5272f..3f6cca535c 100644 --- a/interpreter/script/run.mli +++ b/interpreter/script/run.mli @@ -8,7 +8,7 @@ val run_string : string -> bool val run_file : string -> bool val run_stdin : unit -> unit -val assert_result : Source.region -> +val assert_results : Source.region -> Value.value list -> Script.result list -> unit (* raises Assert *) val assert_message : Source.region -> string -> string -> string -> unit (* raises Assert *) diff --git a/interpreter/script/script.ml b/interpreter/script/script.ml index 315905e31f..cf7366ea5f 100644 --- a/interpreter/script/script.ml +++ b/interpreter/script/script.ml @@ -37,6 +37,7 @@ and result' = | NumResult of num_pat | VecResult of vec_pat | RefResult of ref_pat + | EitherResult of result list type assertion = assertion' Source.phrase and assertion' = diff --git a/interpreter/syntax/ast.ml b/interpreter/syntax/ast.ml index 5d5ac6dc6c..e768665956 100644 --- a/interpreter/syntax/ast.ml +++ b/interpreter/syntax/ast.ml @@ -64,13 +64,19 @@ struct | AddSatS | AddSatU | SubSatS | SubSatU | DotS | Q15MulRSatS | ExtMulLowS | ExtMulHighS | ExtMulLowU | ExtMulHighU | Swizzle | Shuffle of int list | NarrowS | NarrowU + | RelaxedSwizzle | RelaxedQ15MulRS | RelaxedDot type fbinop = Add | Sub | Mul | Div | Min | Max | Pmin | Pmax + | RelaxedMin | RelaxedMax + type iternop = RelaxedLaneselect | RelaxedDotAdd + type fternop = RelaxedMadd | RelaxedNmadd type irelop = Eq | Ne | LtS | LtU | LeS | LeU | GtS | GtU | GeS | GeU type frelop = Eq | Ne | Lt | Le | Gt | Ge type icvtop = ExtendLowS | ExtendLowU | ExtendHighS | ExtendHighU | ExtAddPairwiseS | ExtAddPairwiseU | TruncSatSF32x4 | TruncSatUF32x4 | TruncSatSZeroF64x2 | TruncSatUZeroF64x2 + | RelaxedTruncSF32x4 | RelaxedTruncUF32x4 + | RelaxedTruncSZeroF64x2 | RelaxedTruncUZeroF64x2 type fcvtop = DemoteZeroF64x2 | PromoteLowF32x4 | ConvertSI32x4 | ConvertUI32x4 type ishiftop = Shl | ShrS | ShrU @@ -84,6 +90,7 @@ struct type testop = (itestop, itestop, itestop, itestop, void, void) V128.laneop type unop = (iunop, iunop, iunop, iunop, funop, funop) V128.laneop type binop = (ibinop, ibinop, ibinop, ibinop, fbinop, fbinop) V128.laneop + type ternop = (iternop, iternop, iternop, iternop, fternop, fternop) V128.laneop type relop = (irelop, irelop, irelop, irelop, frelop, frelop) V128.laneop type cvtop = (icvtop, icvtop, icvtop, icvtop, fcvtop, fcvtop) V128.laneop type shiftop = (ishiftop, ishiftop, ishiftop, ishiftop, void, void) V128.laneop @@ -108,6 +115,7 @@ type vec_testop = (V128Op.testop) Value.vecop type vec_relop = (V128Op.relop) Value.vecop type vec_unop = (V128Op.unop) Value.vecop type vec_binop = (V128Op.binop) Value.vecop +type vec_ternop = (V128Op.ternop) Value.vecop type vec_cvtop = (V128Op.cvtop) Value.vecop type vec_shiftop = (V128Op.shiftop) Value.vecop type vec_bitmaskop = (V128Op.bitmaskop) Value.vecop @@ -226,6 +234,7 @@ and instr' = | VecCompare of vec_relop (* vector comparison *) | VecUnary of vec_unop (* unary vector operator *) | VecBinary of vec_binop (* binary vector operator *) + | VecTernary of vec_ternop (* ternary vector operator *) | VecConvert of vec_cvtop (* vector conversion *) | VecShift of vec_shiftop (* vector shifts *) | VecBitmask of vec_bitmaskop (* vector masking *) diff --git a/interpreter/syntax/free.ml b/interpreter/syntax/free.ml index 082c9d397e..d4a1aad4f5 100644 --- a/interpreter/syntax/free.ml +++ b/interpreter/syntax/free.ml @@ -187,7 +187,8 @@ let rec instr (e : instr) = | MemoryCopy (x, y) -> memories (idx x) ++ memories (idx y) | MemoryInit (x, y) -> memories (idx x) ++ datas (idx y) | DataDrop x -> datas (idx x) - | VecConst _ | VecTest _ | VecUnary _ | VecBinary _ | VecCompare _ + | VecConst _ | VecTest _ + | VecUnary _ | VecBinary _ | VecTernary _ | VecCompare _ | VecConvert _ | VecShift _ | VecBitmask _ | VecTestBits _ | VecUnaryBits _ | VecBinaryBits _ | VecTernaryBits _ | VecSplat _ | VecExtract _ | VecReplace _ -> diff --git a/interpreter/syntax/operators.ml b/interpreter/syntax/operators.ml index 9a467b1cb1..f630bc724c 100644 --- a/interpreter/syntax/operators.ml +++ b/interpreter/syntax/operators.ml @@ -560,3 +560,24 @@ let f64x2_pmax = VecBinary (V128 (F64x2 V128Op.Pmax)) let f64x2_promote_low_f32x4 = VecConvert (V128 (F64x2 V128Op.PromoteLowF32x4)) let f64x2_convert_low_i32x4_s = VecConvert (V128 (F64x2 V128Op.ConvertSI32x4)) let f64x2_convert_low_i32x4_u = VecConvert (V128 (F64x2 V128Op.ConvertUI32x4)) + +let i8x16_relaxed_swizzle = VecBinary (V128 (I8x16 V128Op.RelaxedSwizzle)) +let i8x16_relaxed_laneselect = VecTernary (V128 (I8x16 V128Op.RelaxedLaneselect)) +let i16x8_relaxed_q15mulr_s = VecBinary (V128 (I16x8 V128Op.RelaxedQ15MulRS)) +let i16x8_relaxed_laneselect = VecTernary (V128 (I16x8 V128Op.RelaxedLaneselect)) +let i32x4_relaxed_trunc_f32x4_s = VecConvert (V128 (I32x4 V128Op.RelaxedTruncSF32x4)) +let i32x4_relaxed_trunc_f32x4_u = VecConvert (V128 (I32x4 V128Op.RelaxedTruncUF32x4)) +let i32x4_relaxed_trunc_f64x2_s_zero = VecConvert (V128 (I32x4 V128Op.RelaxedTruncSZeroF64x2)) +let i32x4_relaxed_trunc_f64x2_u_zero = VecConvert (V128 (I32x4 V128Op.RelaxedTruncUZeroF64x2)) +let i32x4_relaxed_laneselect = VecTernary (V128 (I32x4 V128Op.RelaxedLaneselect)) +let i64x2_relaxed_laneselect = VecTernary (V128 (I64x2 V128Op.RelaxedLaneselect)) +let f32x4_relaxed_madd = VecTernary (V128 (F32x4 V128Op.RelaxedMadd)) +let f32x4_relaxed_nmadd = VecTernary (V128 (F32x4 V128Op.RelaxedNmadd)) +let f32x4_relaxed_min = VecBinary (V128 (F32x4 V128Op.RelaxedMin)) +let f32x4_relaxed_max = VecBinary (V128 (F32x4 V128Op.RelaxedMax)) +let f64x2_relaxed_madd = VecTernary (V128 (F64x2 V128Op.RelaxedMadd)) +let f64x2_relaxed_nmadd = VecTernary (V128 (F64x2 V128Op.RelaxedNmadd)) +let f64x2_relaxed_min = VecBinary (V128 (F64x2 V128Op.RelaxedMin)) +let f64x2_relaxed_max = VecBinary (V128 (F64x2 V128Op.RelaxedMax)) +let i16x8_relaxed_dot_i8x16_i7x16_s = VecBinary (V128 (I16x8 V128Op.RelaxedDot)) +let i32x4_relaxed_dot_i8x16_i7x16_add_s = VecTernary (V128 (I32x4 V128Op.RelaxedDotAdd)) diff --git a/interpreter/text/arrange.ml b/interpreter/text/arrange.ml index fa5416f106..bf61523830 100644 --- a/interpreter/text/arrange.ml +++ b/interpreter/text/arrange.ml @@ -258,6 +258,10 @@ struct | "32x4" -> "64x2" | _ -> assert false + let without_high_bit = function + | "8x16" -> "7x16" + | _ -> assert false + let voidop xxxx = function (_ : void) -> . let itestop xxxx (op : itestop) = match op with @@ -300,6 +304,13 @@ struct | NarrowU -> "narrow_i" ^ double xxxx ^ "_u" | Shuffle is -> "shuffle " ^ String.concat " " (List.map nat is) | Swizzle -> "swizzle" + | RelaxedSwizzle -> "relaxed_swizzle" + | RelaxedQ15MulRS -> "relaxed_q15mulr_s" + | RelaxedDot -> "relaxed_dot_i" ^ half xxxx ^ "_i" ^ without_high_bit (half xxxx) ^ "_s" + + let iternop xxxx (op : iternop) = match op with + | RelaxedLaneselect -> "relaxed_laneselect" + | RelaxedDotAdd -> "relaxed_dot_i" ^ half (half xxxx) ^ "_i" ^ without_high_bit (half (half xxxx)) ^ "_add_s" let fbinop xxxx (op : fbinop) = match op with | Add -> "add" @@ -310,6 +321,12 @@ struct | Max -> "max" | Pmin -> "pmin" | Pmax -> "pmax" + | RelaxedMin -> "relaxed_min" + | RelaxedMax -> "relaxed_max" + + let fternop xxxx (op : fternop) = match op with + | RelaxedMadd -> "relaxed_madd" + | RelaxedNmadd-> "relaxed_nmadd" let irelop xxxx (op : irelop) = match op with | Eq -> "eq" @@ -342,6 +359,10 @@ struct | TruncSatUF32x4 -> "trunc_sat_f32x4_u" | TruncSatSZeroF64x2 -> "trunc_sat_f64x2_s_zero" | TruncSatUZeroF64x2 -> "trunc_sat_f64x2_u_zero" + | RelaxedTruncSF32x4 -> "relaxed_trunc_f32x4_s" + | RelaxedTruncUF32x4 -> "relaxed_trunc_f32x4_u" + | RelaxedTruncSZeroF64x2 -> "relaxed_trunc_f64x2_s_zero" + | RelaxedTruncUZeroF64x2 -> "relaxed_trunc_f64x2_u_zero" let fcvtop xxxx (op : fcvtop) = match op with | DemoteZeroF64x2 -> "demote_f64x2_zero" @@ -421,6 +442,7 @@ let cvtop = oper (IntOp.cvtop, FloatOp.cvtop) let vec_unop = vec_shape_oper (V128Op.iunop, V128Op.iunop, V128Op.funop) let vec_binop = vec_shape_oper (V128Op.ibinop, V128Op.ibinop, V128Op.fbinop) +let vec_ternop = vec_shape_oper (V128Op.iternop, V128Op.iternop, V128Op.fternop) let vec_testop = vec_shape_oper (V128Op.itestop, V128Op.itestop, V128Op.voidop) let vec_relop = vec_shape_oper (V128Op.irelop, V128Op.irelop, V128Op.frelop) let vec_cvtop = vec_shape_oper (V128Op.icvtop, V128Op.icvtop, V128Op.fcvtop) @@ -583,6 +605,7 @@ let rec instr e = | VecTest op -> vec_testop op, [] | VecUnary op -> vec_unop op, [] | VecBinary op -> vec_binop op, [] + | VecTernary op -> vec_ternop op, [] | VecCompare op -> vec_relop op, [] | VecConvert op -> vec_cvtop op, [] | VecShift op -> vec_shiftop op, [] @@ -869,11 +892,12 @@ let ref_pat = function | RefTypePat t -> Node ("ref." ^ heap_type t, []) | NullPat -> Node ("ref.null", []) -let result mode res = +let rec result mode res = match res.it with | NumResult np -> num_pat mode np | VecResult vp -> vec_pat mode vp | RefResult rp -> ref_pat rp + | EitherResult ress -> Node ("either", List.map (result mode) ress) let instance (x1_opt, x2_opt) = Node ("module instance" ^ var_opt x1_opt ^ var_opt x2_opt, []) diff --git a/interpreter/text/lexer.mll b/interpreter/text/lexer.mll index 5b95a1249e..02430dea70 100644 --- a/interpreter/text/lexer.mll +++ b/interpreter/text/lexer.mll @@ -742,6 +742,27 @@ rule token = parse | "f32x4.replace_lane" -> VEC_REPLACE f32x4_replace_lane | "f64x2.replace_lane" -> VEC_REPLACE f64x2_replace_lane + | "i8x16.relaxed_swizzle" -> VEC_BINARY i8x16_relaxed_swizzle + | "i32x4.relaxed_trunc_f32x4_u" -> VEC_UNARY i32x4_relaxed_trunc_f32x4_u + | "i32x4.relaxed_trunc_f32x4_s" -> VEC_UNARY i32x4_relaxed_trunc_f32x4_s + | "i32x4.relaxed_trunc_f64x2_u_zero" -> VEC_UNARY i32x4_relaxed_trunc_f64x2_u_zero + | "i32x4.relaxed_trunc_f64x2_s_zero" -> VEC_UNARY i32x4_relaxed_trunc_f64x2_s_zero + | "f32x4.relaxed_madd" -> VEC_UNARY f32x4_relaxed_madd + | "f64x2.relaxed_madd" -> VEC_UNARY f64x2_relaxed_madd + | "f32x4.relaxed_nmadd" -> VEC_UNARY f32x4_relaxed_nmadd + | "f64x2.relaxed_nmadd" -> VEC_UNARY f64x2_relaxed_nmadd + | "i8x16.relaxed_laneselect" -> VEC_TERNARY i8x16_relaxed_laneselect + | "i16x8.relaxed_laneselect" -> VEC_TERNARY i16x8_relaxed_laneselect + | "i32x4.relaxed_laneselect" -> VEC_TERNARY i32x4_relaxed_laneselect + | "i64x2.relaxed_laneselect" -> VEC_TERNARY i64x2_relaxed_laneselect + | "f32x4.relaxed_min" -> VEC_UNARY f32x4_relaxed_min + | "f64x2.relaxed_min" -> VEC_UNARY f64x2_relaxed_min + | "f32x4.relaxed_max" -> VEC_UNARY f32x4_relaxed_max + | "f64x2.relaxed_max" -> VEC_UNARY f64x2_relaxed_max + | "i16x8.relaxed_q15mulr_s" -> VEC_BINARY i16x8_relaxed_q15mulr_s + | "i16x8.relaxed_dot_i8x16_i7x16_s" -> VEC_BINARY i16x8_relaxed_dot_i8x16_i7x16_s + | "i32x4.relaxed_dot_i8x16_i7x16_add_s" -> VEC_BINARY i32x4_relaxed_dot_i8x16_i7x16_add_s + | "type" -> TYPE | "func" -> FUNC | "param" -> PARAM @@ -781,6 +802,7 @@ rule token = parse | "assert_exhaustion" -> ASSERT_EXHAUSTION | "nan:canonical" -> NAN Script.CanonicalNan | "nan:arithmetic" -> NAN Script.ArithmeticNan + | "either" -> EITHER | "input" -> INPUT | "output" -> OUTPUT diff --git a/interpreter/text/parser.mly b/interpreter/text/parser.mly index 2eebddd030..80d9480489 100644 --- a/interpreter/text/parser.mly +++ b/interpreter/text/parser.mly @@ -341,6 +341,7 @@ let parse_annots (m : module_) : Custom.section list = %token ASSERT_RETURN ASSERT_TRAP ASSERT_EXCEPTION ASSERT_EXHAUSTION %token ASSERT_MALFORMED_CUSTOM ASSERT_INVALID_CUSTOM %token NAN +%token EITHER %token INPUT OUTPUT %token EOF @@ -1535,6 +1536,7 @@ result : error (at $sloc) "wrong number of lane literals"; VecResult (VecPat (Value.V128 ($3, List.map (fun lit -> lit $3) $4))) @@ $sloc } + | LPAR EITHER result list(result) RPAR { EitherResult ($3 :: $4) @@ $sloc } script : | list(cmd) EOF { List.concat $1 } diff --git a/interpreter/util/lib.ml b/interpreter/util/lib.ml index 0f1c3121fd..079c825344 100644 --- a/interpreter/util/lib.ml +++ b/interpreter/util/lib.ml @@ -104,9 +104,15 @@ struct let index_of x = index_where ((=) x) - let rec pairwise f = function + let rec map3 f xs ys zs = + match xs, ys, zs with + | [], [], [] -> [] + | x::xs', y::ys', z::zs' -> f x y z :: map3 f xs' ys' zs' + | _ -> raise (Invalid_argument "Lib.List.map3") + + let rec map_pairwise f = function | [] -> [] - | x1::x2::xs -> f x1 x2 :: pairwise f xs + | x1::x2::xs -> f x1 x2 :: map_pairwise f xs | _ -> failwith "pairwise" end diff --git a/interpreter/util/lib.mli b/interpreter/util/lib.mli index c11767eacb..bfb490015d 100644 --- a/interpreter/util/lib.mli +++ b/interpreter/util/lib.mli @@ -25,7 +25,9 @@ sig val index_of : 'a -> 'a list -> int option val index_where : ('a -> bool) -> 'a list -> int option - val pairwise : ('a -> 'a -> 'b) -> 'a list -> 'b list + + val map3 : ('a -> 'b -> 'c -> 'd) -> 'a list -> 'b list -> 'c list -> 'd list + val map_pairwise : ('a -> 'a -> 'b) -> 'a list -> 'b list end module List32 : diff --git a/interpreter/valid/match.ml b/interpreter/valid/match.ml index 70f8136c9a..bce04c8d35 100644 --- a/interpreter/valid/match.ml +++ b/interpreter/valid/match.ml @@ -26,6 +26,12 @@ and top_of_heap_type c = function | VarHT (StatX x) -> top_of_str_type c (expand_def_type (lookup c x)) | VarHT (RecX _) | BotHT -> assert false +let top_of_val_type c = function + | NumT _ as t -> t + | VecT _ as t -> t + | RefT (_, ht) -> RefT (Null, top_of_heap_type c ht) + | BotT -> BotT (* well.. *) + let rec bot_of_str_type c st = bot_of_heap_type c (abs_of_str_type c st) diff --git a/interpreter/valid/match.mli b/interpreter/valid/match.mli index 5f0c96398f..c9b3a06a08 100644 --- a/interpreter/valid/match.mli +++ b/interpreter/valid/match.mli @@ -8,6 +8,7 @@ type context = def_type list (* Extremas *) +val top_of_val_type : context -> val_type -> val_type val top_of_heap_type : context -> heap_type -> heap_type val bot_of_heap_type : context -> heap_type -> heap_type val top_of_str_type : context -> str_type -> heap_type diff --git a/interpreter/valid/valid.ml b/interpreter/valid/valid.ml index fa9df084b1..433831a9df 100644 --- a/interpreter/valid/valid.ml +++ b/interpreter/valid/valid.ml @@ -860,6 +860,10 @@ let rec check_instr (c : context) (e : instr) (s : infer_result_type) : infer_in let t = VecT (type_vec binop) in [t; t] --> [t], [] + | VecTernary ternop -> + let t = VecT (type_vec ternop) in + [t; t; t] --> [t], [] + | VecCompare relop -> let t = VecT (type_vec relop) in [t; t] --> [t], [] diff --git a/proposals/relaxed-simd/Entropy.md b/proposals/relaxed-simd/Entropy.md new file mode 100644 index 0000000000..52898e233e --- /dev/null +++ b/proposals/relaxed-simd/Entropy.md @@ -0,0 +1,57 @@ +# Entropy, Compat and Usage patterns + +The Relaxed SIMD proposal adds new operations that take advantage of the underlying hardware for accelerated performance by loosening the portability constraints of fixed-width SIMD, or adding new instructions that introduce local non-determinisim. This introduces a few potential risks specifically for browser engine implementations, though it’s possible that one or more of these might be applicable to other environments: +* Identifying underlying characteristics of the device (processor information if the engine that implements this proposal used the most optimal lowerings) +* Possibly identifying information about the browser currently in use (i.e. if a sufficiently motivated user writes a hand tuned Wasm function when engines use different lowerings for instructions) +* Compatibility risks, i.e. if code compiled for one browser works differently on a different browser (This is specific to observable behavior changes, and not performance differences) + +This document is an attempt to collate information that is already available in the issues filed for each of the operations on fingerprinting risk, quantify the risk for fingerprinting/compat issues and provide some information about usage patterns. + +## Instruction summary + +* **relaxed i8x16.swizzle**
+ *Entropy exposed:* Differences between x86/ARM
+ *Deterministic lowering:* Available
+ *Compat risk:* Low, as the differences exposed are for out of range indices
+ [*Issue link*](https://github.com/WebAssembly/relaxed-simd/issues/22) +* **relaxed i32x4.trunc_{f32x4, f64x2} operations**
+ *Entropy exposed:* Differences between x86/ARM
+ *Deterministic lowering:* Available
+ *Compat risk:* Low, as the differing behavior is for out of range values, and NaNs
+ [*Issue link*](https://github.com/WebAssembly/relaxed-simd/issues/21)
+* **qfma, qfmns**
+ *Entropy exposed:* Differences between hardware that has native FMA support, and hardware that does not.
+ *Deterministic lowering:* Not available, but depending on underlying hardware, the results can only be fused, or unfused.
+ *Compat risk:* Potentially divergent behavior based on hardware FMA support
+ *Mitigating reasons to include:* Most modern hardware do have native FMA support, performance wins are significant, operations are difficult to emulate
+ [*Issue link*](https://github.com/WebAssembly/simd/pull/79)
+* **{i8x16, i16x8, i32x4, i64x2}.laneselect**
+ *Entropy exposed:* x86/ARM
+ *Deterministic lowering:* Available
+ *Compat risk:* Medium, architectures vary on which bit is used for lane selection
+ [*Issue link*](https://github.com/WebAssembly/relaxed-simd/issues/17)
+* **{f32x4, f64x2}.{min,max}**
+ *Entropy exposed:* x86/ARM
+ *Deterministic lowering:* Available
+ *Compat risk:* Low, varying outputs when one of the inputs is NaN, or +0, -0
+ [*Issue link*](https://github.com/WebAssembly/relaxed-simd/issues/33)
+* **I16x8.relaxed_q15mulr_s**
+ *Entropy exposed:* x86/ARM
+ *Deterministic lowering:* Available
+ *Compat risk:* Low, different behaviors only in the overflow case
+ [*Issue link*](https://github.com/WebAssembly/relaxed-simd/issues/40)
+* **Dot product instructions**
+ *Entropy exposed:* x86/ARM, and whether the Dot product extension is supported in the most optimal codegen
+ *Deterministic lowering:* Available, but only when not using the most optimal codegen
+ *Compat risk:* Medium for architectures that support the Dot product extensions as they vary in saturating/wrapping behavior of intermediate results
*Mitigating reasons to include:* [Performance](https://docs.google.com/presentation/d/1xlyO1ly2Fbo2Up5ZuV_BTSwiNpCwPygag09XQRjclSA/edit#slide=id.g1fee95a4c4f_0_0)
+ [*Issue link*](https://github.com/WebAssembly/relaxed-simd/issues/52) + +## Usage patterns + +One of the things to note here, for compat especially, is to lay out the usage patterns, or specifically when these instructions are generated. As the proposal is still in the experimental state, the only way to currently experiment with these instructions are to call the clang built-ins directly, and experiment with them on an engine that has these instructions available as a prototype. + +In the future, these can be invoked using: + * Wasm Intrinsic header files + * Possibly in the autovectorizer, but only when flags like `-ffast-math` are used, that assume inputs and/or results are not NaNs or +-Infs. + +The thing to note here is that by either explicitly calling the intrinsics, or using specific compiler flags is a high enough threshold that this type of local non-determinism is not something a user would encounter by default, i.e. these instructions can only be used deliberately, and the proposal assumes a specialized usage. diff --git a/proposals/relaxed-simd/Overview.md b/proposals/relaxed-simd/Overview.md new file mode 100644 index 0000000000..8fe79bfec2 --- /dev/null +++ b/proposals/relaxed-simd/Overview.md @@ -0,0 +1,357 @@ +# Relaxed SIMD proposal + +## Summary + +This proposal adds a set of useful SIMD instructions that introduce local +non-determinism (where the results of the instructions may vary based on +hardware support). + +## Motivation + +Applications running on Wasm SIMD cannot take full advantage of hardware +capabilities. There are 3 reasons: + +1. Instruction depends on hardware support +2. Approximate instructions that are underspecified in hardware +3. Some SIMD instructions penalize particular architecture + +See [these +slides](https://docs.google.com/presentation/d/1Qnx0nbNTRYhMONLuKyygEduCXNOv3xtWODfXfYokx1Y/edit?usp=sharing) +for more details. + +## Overview + +Broadly, there are three categories of instructions that fit into the Relaxed SIMD proposal: + +1. Integer instructions where the inputs are interpreted differently (e.g. + swizzle, 4-D dot-product) +2. Floating-point instructions whose behavior for out-of-range and NaNs differ + (e.g. float-to-int conversions, float min/max) +3. Floating-point instructions where the precision or order of operations + differ (e.g. FMA, reciprocal instructions, sum reduction) + +Example of some instructions we would like to add: + +- Fused Multiply Add (single rounding if hardware supports it, double rounding if not) +- Approximate reciprocal/reciprocal sqrt +- Relaxed Swizzle (implementation defined out of bounds behavior) +- Relaxed Rounding Q-format Multiplication (optional saturation) + +### Consistency + +This proposal introduces non-deterministic instructions - given the same +inputs, two calls to the same instruction can return different results. For +example: + +```wast +(module + (func (param v128 v128 v128) + (f32x4.qfma (local.get 0) (local.get 1) (local.get 2)) ;; (1) + ;; some other computation + (f32x4.qfma (local.get 0) (local.get 1) (local.get 2)))) ;; (2) +``` + +The same instruction at `(1)` and `(2)`, when given the same inputs, can return +two different results. This is compliant as the instruction is +non-deterministic, though unlikely on certain embeddings like the Web (where +the same implementation for `f32x4.qfma` is likely to be used for all calls to +that instruction). One can imagine splitting an application's module and +running them on multiple runtimes, where the runtimes produce +different results - this can be surprising to the application. + +The specification is updated with the idea of "Relaxed operations": + +> Some operators are host-dependent, because the set of possible results may +> depend on properties of the host environment (such as hardware). Technically, +> each such operator produces a fixed-size list of sets of allowed values. For +> each execution of the operator in the same environment, only values from the +> set at the same position in the list are returned, i.e., each environment +> globally chooses a fixed projection for each operator. + +## Instructions + +`IMPLEMENTATION_DEFINED_ONE_OF(...)` returns any one of the results in the argument list, depending on the implementation. + +### Relaxed swizzle + +- `relaxed i8x16.swizzle(a : v128, s : v128) -> v128` + +`relaxed i8x16.swizzle(a, s)` selects lanes from `a` using indices in `s`, +indices in the range `[0,15]` will select the `i`-th element of `a`, the result +for any out of range indices is implementation-defined (i.e. if the index is +`[16-255]`. + +```python +def relaxed_i8x16_swizzle(a : i8x16, s : i8x16): + result = [] + for i in range(16): + if s[i] < 16: + result[i] = a[s[i]] + else if s[i] < 128: + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(0, a[s[i]%16]) + else: + result[i] = 0 + return result +``` + +### Float/Double to int conversions + +- `relaxed i32x4.trunc_f32x4_s` (relaxed version of `i32x4.trunc_sat_f32x4_s`) +- `relaxed i32x4.trunc_f32x4_u` (relaxed version of `i32x4.trunc_sat_f32x4_u`) +- `relaxed i32x4.trunc_f64x2_s_zero` (relaxed version of `i32x4.trunc_sat_f64x2_s_zero`) +- `relaxed i32x4.trunc_f64x2_u_zero` (relaxed version of `i32x4.trunc_sat_f64x2_u_zero`) + +These instructions have the same behavior as the non-relaxed instructions for +lanes that are in the range of an `i32` (signed or unsigned depending on the +instruction). The result of lanes which contain NaN is implementation defined, +either 0 or `INT32_MAX` for signed and `UINT32_MAX` for unsigned. The result of +lanes which are out of bounds of `INT32` or `UINT32` is implementation defined, +it can be either the saturated result or `INT32_MAX` for signed and `UINT32_MAX` +for unsigned. + +```python +def relaxed_i32x4_trunc_f32x4_s(a : f32x4) -> i32x4: + result = [0, 0, 0, 0] + for i in range(4): + if isnan(a[i]): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(0, INT32_MIN) + continue + r = truncate(a[i]) + if r < INT32_MIN: + result[i] = INT32_MIN + elif r > INT32_MAX + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(INT32_MIN, INT32_MAX) + else: + result[i] = r + +def relaxed_i32x4_trunc_f32x4_u(a : f32x4) -> i32x4: + result = [0, 0, 0, 0] + for i in range(4): + if isnan(a[i]): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(0, UINT32_MAX) + continue + r = truncate(a[i]) + if r < UINT32_MIN: + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(UINT32_MIN, UINT32_MAX) + elif r > UINT32_MAX: + result[i] = UINT32_MAX + else: + result[i] = r + +def relaxed_i32x4_trunc_f64x2_zero_s(a : f64x2) -> i32x4: + result = [0, 0, 0, 0] + for i in range(2): + if isnan(a[i]): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(0, INT32_MIN) + continue + r = truncate(a[i]) + if r < INT32_MIN: + result[i] = INT32_MIN + elif r > INT32_MAX + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(INT32_MIN, INT32_MAX) + else: + result[i] = r + +def relaxed_i32x4_trunc_f64x2_zero_u(a : f64x2) -> i32x4: + result = [0, 0, 0, 0] + for i in range(2): + if isnan(a[i]): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(0, UINT32_MAX) + continue + r = truncate(a[i]) + if r < UINT32_MIN: + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(UINT32_MIN, UINT32_MAX) + elif r > UINT32_MAX: + result[i] = UINT32_MAX + else: + result[i] = r +``` + +### Relaxed fused multiply-add and fused negative multiply-add + +- `relaxed f32x4.madd` +- `relaxed f32x4.nmadd` +- `relaxed f64x2.madd` +- `relaxed f64x2.nmadd` + +All the instructions take 3 operands, `a`, `b`, `c`, perform `a * b + c` or `-(a * b) + c`: + +- `relaxed f32x4.madd(a, b, c) = a * b + c` +- `relaxed f32x4.nmadd(a, b, c) = -(a * b) + c` +- `relaxed f64x2.madd(a, b, c) = a * b + c` +- `relaxed f64x2.nmadd(a, b, c) = -(a * b) + c` + +where: + +- the intermediate `a * b` is be rounded first, and the final result rounded again (for a total of 2 roundings), or +- the entire expression evaluated with higher precision and then only rounded once (if supported by hardware). + +### Relaxed laneselect + +- `i8x16.laneselect(a: v128, b: v128, m: v128) -> v128` +- `i16x8.laneselect(a: v128, b: v128, m: v128) -> v128` +- `i32x4.laneselect(a: v128, b: v128, m: v128) -> v128` +- `i64x2.laneselect(a: v128, b: v128, m: v128) -> v128` + +Select lanes from `a` or `b` based on masks in `m`. If each lane-sized mask in `m` has all bits set or all bits unset, these instructions behave the same as `v128.bitselect`. Otherwise, the result is implementation defined. + +```python +def laneselect(a : v128, b : v128, m: v128, lanes : int): + result = [0] * lanes + for i in range(lanes): + mask = m[i] + if mask == ~0: + result[i] = a[i] + elif mask == 0: + result[i] = b[i] + else topbit(mask) == 1: + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(bitselect(a[i], b[i], mask), a[i]) + else: + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(bitselect(a[i], b[i], mask), b[i]) + return result +``` + +### Relaxed min and max + +- `f32x4.min(a: v128, b: v128) -> v128` +- `f32x4.max(a: v128, b: v128) -> v128` +- `f64x2.min(a: v128, b: v128) -> v128` +- `f64x2.max(a: v128, b: v128) -> v128` + +Return the lane-wise minimum or maximum of two values. If either values is NaN, or the values are -0.0 and +0.0, the return value is implementation-defined. + +```python +def min_or_max(a : v128, b : v128, lanes : int, is_min : bool): + result = [] + for i in range(lanes): + if isNaN(a[i]) or isNaN(b[i]): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(a[i], b[i]) + elif (a[i] == -0.0 && b[i] == +0.0) or (a[i] == +0.0 && b[i] == -0.0): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(a[i], b[i]) + else: + result[i] = is_min ? min(a, b) : max(a, b) + return result +``` + +### Relaxed Rounding Q-format Multiplication + +- `i16x8.q15mulr_s(a: v128, b: v128) -> v128` + +Returns the multiplication of 2 fixed-point numbers in Q15 format. If both +inputs are `INT16_MIN`, the result overflows, and the return value is +implementation defined (either `INT16_MIN` or `INT16_MAX`). + +```python +def q15mulr(a, b): + result = [] + for i in range(lanes): + if (a[i] == INT16_MIN && b[i] == INT16_MIN): + result[i] = IMPLEMENTATION_DEFINED_ONE_OF(INT16_MIN, INT16_MAX) + else: + result[i] = (a[i] * b[i] + 0x4000) >> 15 + return result +``` + +### Relaxed integer dot product + +- `i16x8.dot_i8x16_i7x16_s(a: v128, b: v128) -> v128` +- `i32x4.dot_i8x16_i7x16_add_s(a: v128, b:v128, c:v128) -> v128` + +Returns the multiplication of 8-bit elements (signed or unsigned) by 7-bit +elements (unsigned) with accumulation of adjacent products. The `i32x4` versions +allows for accumulation into another vector. + +When the second operand of the product has the high bit set in a lane, that +lane's result is implementation defined. + +```python +def i16x8_dot_i8x16_i7x16_s(a, b): + intermediate = [] + result = [] + for i in range(16): + if (b[i] & 0x80): + lhs = as_signed(a[i]) + rhs = IMPLEMENTATION_DEFINED_ONE_OF(as_signed(b[i]), as_unsigned(b[i])) + intermediate[i] = lhs * rhs + else: + intermediate[i] = as_signed(a[i]) * b[i] + for i in range(0, 16, 2): + result[i/2] = IMPLEMENTATION_DEFINED_ONE_OF( + intermediate[i] + intermediate[i+1], + saturate(intermediate[i] + intermediate[i+1])) + +def i32x4.dot_i8x16_i7x16_add_s(a, b, c): + intermediate = [] + tmp = [] + result = [] + for i in range(16): + if (b[i] & 0x80): + lhs = as_signed(a[i]) + rhs = IMPLEMENTATION_DEFINED_ONE_OF(as_signed(b[i]), as_unsigned(b[i])) + intermediate[i] = lhs * rhs + else: + intermediate[i] = as_signed(a[i]) * b[i] + + for i in range(0, 16, 2): + tmp[i/2] = IMPLEMENTATION_DEFINED_ONE_OF( + intermediate[i] + intermediate[i+1], + saturate(intermediate[i] + intermediate[i+1])) + + for i in range(0, 8, 2): + dst[i/4] = tmp[i] + tmp[i+1] + + for i in range(0, 4): + dst[i] += c[i] + +saturate(x) = min(INT16_MAX, max(INT16_MIN, x)) +``` + +## Binary format + +All opcodes have the `0xfd` prefix (same as SIMD proposal), which are omitted in the table below. +Opcodes `0x100` to `0x12F` (32 opcodes) are reserved for this proposal. + +Note: "prototype opcode" refers to the opcodes that were used in prototyping, which +where chosen to fit into the holes in the opcode space of SIMD proposal. Going +forward, the opcodes for relaxed-simd specification will be the ones in the +"opcode" column, and it will take some time for tools and engines to update. + +| instruction | opcode | prototype opcode | +| ------------------------------------- | -------------- | ---------------- | +| `i8x16.relaxed_swizzle` | 0x100 | 0xa2 | +| `i32x4.relaxed_trunc_f32x4_s` | 0x101 | 0xa5 | +| `i32x4.relaxed_trunc_f32x4_u` | 0x102 | 0xa6 | +| `i32x4.relaxed_trunc_f64x2_s_zero` | 0x103 | 0xc5 | +| `i32x4.relaxed_trunc_f64x2_u_zero` | 0x104 | 0xc6 | +| `f32x4.relaxed_madd` | 0x105 | 0xaf | +| `f32x4.relaxed_nmadd` | 0x106 | 0xb0 | +| `f64x2.relaxed_madd` | 0x107 | 0xcf | +| `f64x2.relaxed_nmadd` | 0x108 | 0xd0 | +| `i8x16.relaxed_laneselect` | 0x109 | 0xb2 | +| `i16x8.relaxed_laneselect` | 0x10a | 0xb3 | +| `i32x4.relaxed_laneselect` | 0x10b | 0xd2 | +| `i64x2.relaxed_laneselect` | 0x10c | 0xd3 | +| `f32x4.relaxed_min` | 0x10d | 0xb4 | +| `f32x4.relaxed_max` | 0x10e | 0xe2 | +| `f64x2.relaxed_min` | 0x10f | 0xd4 | +| `f64x2.relaxed_max` | 0x110 | 0xee | +| `i16x8.relaxed_q15mulr_s` | 0x111 | 0x111 | +| `i16x8.relaxed_dot_i8x16_i7x16_s` | 0x112 | 0x112 | +| `i32x4.relaxed_dot_i8x16_i7x16_add_s` | 0x113 | 0x113 | +| Reserved | 0x114 - 0x12F | | + +## References + +- Poll for phase 1 + [presentation](https://docs.google.com/presentation/d/1Qnx0nbNTRYhMONLuKyygEduCXNOv3xtWODfXfYokx1Y/edit?usp=sharing) + and [meeting + notes](https://github.com/WebAssembly/meetings/blob/master/main/2021/CG-03-16.md) +- Poll for phase 2 + [slides](https://docs.google.com/presentation/d/1zyRqfgGU7HdoVw9QiKaVYifozbytPhNLHUW9jQjPzLk/edit?usp=sharing) + and [meeting + notes](https://github.com/WebAssembly/meetings/blob/main/main/2021/CG-11-09.md#update-on-relaxed-simd-fpenv-discussions-and-poll-for-phase-2-zhi-an-ng-15-min) +- Poll for phase 3 + [slides](https://docs.google.com/presentation/d/1ofBkgbW2AjYM4oayjTPTH3PCbyEn6W-q3GN67qSEigQ/edit?usp=sharing) + and [meeting + notes](https://github.com/WebAssembly/meetings/blob/main/main/2022/CG-04-12.md) +- [SIMD proposal](https://github.com/WebAssembly/simd) diff --git a/spectec/spec/wasm-3.0/0-aux.watsup b/spectec/spec/wasm-3.0/0-aux.watsup index 2d1148258b..42bbf7d41d 100644 --- a/spectec/spec/wasm-3.0/0-aux.watsup +++ b/spectec/spec/wasm-3.0/0-aux.watsup @@ -34,6 +34,10 @@ def $sum(nat*) : nat hint(show (+) %) hint(macro none) def $sum(eps) = 0 def $sum(n n'*) = $(n + $sum(n'*)) +def $prod(nat*) : nat hint(show (*) %) hint(macro none) +def $prod(eps) = 1 +def $prod(n n'*) = $(n * $prod(n'*)) + ;; General sequence functions diff --git a/spectec/spec/wasm-3.0/1-syntax.watsup b/spectec/spec/wasm-3.0/1-syntax.watsup index 113d5d62bc..a0522efb69 100644 --- a/spectec/spec/wasm-3.0/1-syntax.watsup +++ b/spectec/spec/wasm-3.0/1-syntax.watsup @@ -1,3 +1,10 @@ +;; +;; Profiles +;; + +def $ND : bool ;; non-determinism + + ;; ;; Lists ;; @@ -388,6 +395,7 @@ syntax cvtop__(Fnn_1, Fnn_2) = ;; Vector operators +;; TODO(1, rossberg): restrict size to 128 syntax dim hint(desc "dimension") = `1 | `2 | `4 | `8 | `16 syntax shape hint(desc "shape") = lanetype X dim hint(show %0#X#%2) hint(macro "%shape") syntax ishape hint(desc "shape") = Jnn X dim hint(show %0#X#%2) hint(macro "%shape") @@ -397,6 +405,13 @@ syntax pshape hint(desc "shape") = Pnn X dim hint(show %0#X#%2) hint(macro def $dim(shape) : dim hint(macro "shdim") def $shsize(shape) : nat hint(show |%|) +syntax half__(shape_1, shape_2) +syntax half__(Jnn_1 X M_1, Jnn_2 X M_2) = LOW | HIGH -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn1(Jnn_2) +syntax half__(Lnn_1 X M_1, Fnn_2 X M_2) = LOW -- if $(2 * $lsizenn1(Lnn_1)) = $sizenn1(Fnn_2) = `64 + +syntax zero__(shape_1, shape_2) +syntax zero__(Fnn_1 X M_1, Lnn_2 X M_2) = ZERO -- if $(2 * $lsizenn2(Lnn_2)) = $sizenn1(Fnn_1) = `64 + syntax vvunop hint(macro "%" "V%") = NOT syntax vvbinop hint(macro "%" "V%") = AND | ANDNOT | OR | XOR syntax vvternop hint(macro "%" "V%") = BITSELECT @@ -416,9 +431,14 @@ syntax vbinop_(Jnn X M) = | MUL -- if $lsizenn(Jnn) >= `16 | AVGR U hint(show AVGR#_#%) -- if $lsizenn(Jnn) <= `16 | Q15MULR_SAT S hint(show Q15MULR_SAT#_#%) -- if $lsizenn(Jnn) = `16 + | RELAXED_Q15MULR S hint(show RELAXED_Q15MULR#_#%) -- if $lsizenn(Jnn) = `16 | MIN sx hint(show MIN#_#%) -- if $lsizenn(Jnn) <= `32 | MAX sx hint(show MAX#_#%) -- if $lsizenn(Jnn) <= `32 -syntax vbinop_(Fnn X M) = ADD | SUB | MUL | DIV | MIN | MAX | PMIN | PMAX +syntax vbinop_(Fnn X M) = ADD | SUB | MUL | DIV | MIN | MAX | PMIN | PMAX | RELAXED_MIN | RELAXED_MAX + +syntax vternop_(shape) hint(macro "%" "V%") +syntax vternop_(Jnn X M) = RELAXED_LANESELECT +syntax vternop_(Fnn X M) = RELAXED_MADD | RELAXED_NMADD syntax vtestop_(shape) hint(macro "%" "V%") syntax vtestop_(Jnn X M) = ALL_TRUE @@ -443,16 +463,14 @@ syntax vcvtop__(Jnn_1 X M_1, Fnn_2 X M_2) = syntax vcvtop__(Fnn_1 X M_1, Jnn_2 X M_2) = | TRUNC_SAT sx hint(show TRUNC_SAT#_#%) -- if $sizenn1(Fnn_1) >= $lsizenn2(Jnn_2) = `32 + | RELAXED_TRUNC sx hint(show RELAXED_TRUNC#_#%) + -- if $sizenn1(Fnn_1) >= $lsizenn2(Jnn_2) = `32 syntax vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2) = | DEMOTE -- if $sizenn1(Fnn_1) > $sizenn2(Fnn_2) | PROMOTE -- if $sizenn1(Fnn_1) < $sizenn2(Fnn_2) -syntax half__(shape_1, shape_2) -syntax half__(Jnn_1 X M_1, Jnn_2 X M_2) = LOW | HIGH -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn1(Jnn_2) -syntax half__(Lnn_1 X M_1, Fnn_2 X M_2) = LOW -- if $(2 * $lsizenn1(Lnn_1)) = $sizenn1(Fnn_2) = `64 - -syntax zero__(shape_1, shape_2) -syntax zero__(Fnn_1 X M_1, Lnn_2 X M_2) = ZERO -- if $(2 * $lsizenn2(Lnn_2)) = $sizenn1(Fnn_1) = `64 +syntax vswizzlop_(ishape) hint(macro "%" "V%") +syntax vswizzlop_(I8 X M) = SWIZZLE | RELAXED_SWIZZLE syntax vshiftop_(ishape) hint(macro "%" "V%") syntax vshiftop_(Jnn X M) = SHL | SHR sx hint(show SHR#_#%) @@ -468,6 +486,13 @@ syntax vextbinop__(Jnn_1 X M_1, Jnn_2 X M_2) = -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) >= `16 | DOT S hint(show DOT#_#%) -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) = `32 + | RELAXED_DOT S hint(show RELAXED_DOT#_#%) + -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) = `16 + +syntax vextternop__(ishape_1, ishape_2) hint(macro "%" "V%") +syntax vextternop__(Jnn_1 X M_1, Jnn_2 X M_2) = + | RELAXED_DOT_ADD S hint(show RELAXED_DOT_ADD#_#%) + -- if $(4 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) = `32 ;; Memory operators @@ -560,12 +585,12 @@ syntax instr/vec hint(desc "vector instruction") = ... | VVTESTOP vectype vvtestop hint(show %.##%) | VUNOP shape vunop_(shape) hint(show ##%.##%) | VBINOP shape vbinop_(shape) hint(show ##%.##%) + | VTERNOP shape vternop_(shape) hint(show ##%.##%) | VTESTOP shape vtestop_(shape) hint(show ##%.##%) | VRELOP shape vrelop_(shape) hint(show ##%.##%) | VSHIFTOP ishape vshiftop_(ishape) hint(show ##%.##%) | VBITMASK ishape hint(show ##%.BITMASK) hint(macro "VBITMASK") - | VSWIZZLE ishape hint(show ##%.SWIZZLE) hint(macro "VSWIZZLE") - -- if ishape = I8 X `16 + | VSWIZZLOP ishape vswizzlop_(ishape) hint(show ##%.##%) | VSHUFFLE ishape laneidx* hint(show ##%.SHUFFLE %) hint(macro "VSHUFFLE") -- if ishape = I8 X `16 /\ |laneidx*| = `16 ;; TODO(3, rossberg): enable ^16 in type @@ -573,13 +598,14 @@ syntax instr/vec hint(desc "vector instruction") = ... hint(show ##%1.##%3#_# ##%2) | VEXTBINOP ishape_1 ishape_2 vextbinop__(ishape_2, ishape_1) hint(show ##%1.##%3#_# ##%2) + | VEXTTERNOP ishape_1 ishape_2 vextternop__(ishape_2, ishape_1) + hint(show ##%1.##%3#_# ##%2) | VNARROW ishape_1 ishape_2 sx hint(show ##%.NARROW#_# ##%#_#%) hint(macro "VNARROW") -- if $($lsize($lanetype(ishape_2)) = 2*$lsize($lanetype(ishape_1)) <= `32) | VCVTOP shape_1 shape_2 vcvtop__(shape_2, shape_1) half__(shape_2, shape_1)? zero__(shape_2, shape_1)? hint(show ##%1.%3#_# ##%2) hint(show ##%1.%3#_# ##%2#_#%4) ;; TODO(2, rossberg): this is wrong when half is absent hint(show ##%1.%3#_#%5#_# ##%2#_#%4) ;; TODO(2, rossberg): this is wrong when half is present - -- if $lanetype(shape_1) =/= $lanetype(shape_2) | VSPLAT shape hint(show ##%.SPLAT) hint(macro "VSPLAT") | VEXTRACT_LANE shape sx? laneidx hint(show ##%.EXTRACT_LANE %) hint(show ##%.EXTRACT_LANE#_#% %) hint(macro "VEXTRACT_LANE") -- if sx? = eps <=> $lanetype(shape) = numtype diff --git a/spectec/spec/wasm-3.0/2-syntax-aux.watsup b/spectec/spec/wasm-3.0/2-syntax-aux.watsup index 8a75a5240c..4cd8ab69fb 100644 --- a/spectec/spec/wasm-3.0/2-syntax-aux.watsup +++ b/spectec/spec/wasm-3.0/2-syntax-aux.watsup @@ -345,11 +345,12 @@ def $free_instr(VVTERNOP vectype vvternop) = $free_vectype(vectype) def $free_instr(VVTESTOP vectype vvtestop) = $free_vectype(vectype) def $free_instr(VUNOP shape vunop) = $free_shape(shape) def $free_instr(VBINOP shape vbinop) = $free_shape(shape) +def $free_instr(VTERNOP shape vternop) = $free_shape(shape) def $free_instr(VTESTOP shape vtestop) = $free_shape(shape) def $free_instr(VRELOP shape vrelop) = $free_shape(shape) def $free_instr(VSHIFTOP ishape vshiftop) = $free_shape(ishape) def $free_instr(VBITMASK ishape) = $free_shape(ishape) -def $free_instr(VSWIZZLE ishape) = $free_shape(ishape) +def $free_instr(VSWIZZLOP ishape vswizzlop) = $free_shape(ishape) def $free_instr(VSHUFFLE ishape laneidx*) = $free_shape(ishape) def $free_instr(VEXTUNOP ishape_1 ishape_2 vextunop) = $free_shape(ishape_1) ++ $free_shape(ishape_2) diff --git a/spectec/spec/wasm-3.0/3-numerics.watsup b/spectec/spec/wasm-3.0/3-numerics.watsup index b56c6d64f7..cb385dea99 100644 --- a/spectec/spec/wasm-3.0/3-numerics.watsup +++ b/spectec/spec/wasm-3.0/3-numerics.watsup @@ -2,6 +2,32 @@ ;; Numerics ;; +;; Relaxed behaviour + +syntax relaxed2 = 0 | 1 +syntax relaxed4 = 0 | 1 | 2 | 3 + +def $relaxed2(relaxed2, syntax X, X, X) : X hint(show $relaxed(%1)#`[%3,%4]) +def $relaxed4(relaxed4, syntax X, X, X, X, X) : X hint(show $relaxed(%1)#`[%3,%4,%5,%6]) + +def $relaxed2(i, syntax X, X_1, X_2) = (X_1 X_2)[i] -- if $ND +def $relaxed2(i, syntax X, X_1, X_2) = (X_1 X_2)[0] -- otherwise + +def $relaxed4(i, syntax X, X_1, X_2, X_3, X_4) = (X_1 X_2 X_3 X_4)[i] -- if $ND +def $relaxed4(i, syntax X, X_1, X_2, X_3, X_4) = (X_1 X_2 X_3 X_4)[0] -- otherwise + + +def $R_fmadd : relaxed2 +def $R_fmin : relaxed4 +def $R_fmax : relaxed4 +def $R_idot : relaxed2 +def $R_iq15mulr : relaxed2 +def $R_trunc_u : relaxed4 +def $R_trunc_s : relaxed2 +def $R_swizzle : relaxed2 +def $R_laneselect : relaxed2 + + ;; Conversions def $s33_to_u32(s33) : u32 hint(show %) @@ -17,23 +43,26 @@ def $invsigned_(N, int) : nat hint(show $signed_(%)^(-1)#((%))) def $invsigned_(N, i) = j -- if $signed_(N, j) = i -;; TODO(3, all): implement numerics internally +;; Saturation -def $unop_(numtype, unop_(numtype), num_(numtype)) : num_(numtype)* - hint(show %2#$_(%1,%3)) -def $binop_(numtype, binop_(numtype), num_(numtype), num_(numtype)) : num_(numtype)* - hint(show %2#$_(%1,%3, %4)) -def $testop_(numtype, testop_(numtype), num_(numtype)) : num_(I32) - hint(show %2#$_(%1,%3)) -def $relop_(numtype, relop_(numtype), num_(numtype), num_(numtype)) : num_(I32) - hint(show %2#$_(%1,%3, %4)) -def $cvtop__(numtype_1, numtype_2, cvtop__(numtype_1, numtype_2), num_(numtype_1)) : num_(numtype_2)* - hint(show %3#$__(%1,%2,%4)) +def $sat_u_(N, nat) : nat hint(show $sat__u_(%,%)) +def $sat_u_(N, i) = 0 -- if i < 0 +def $sat_u_(N, i) = $(2^N - 1) -- if i > $(2^N - 1) +def $sat_u_(N, i) = i -- otherwise + +def $sat_s_(N, int) : int hint(show $sat__s_(%,%)) +def $sat_s_(N, i) = $(-2^(N-1)) -- if i < $(-2^(N-1)) +def $sat_s_(N, i) = $(2^(N-1) - 1) -- if i > $(2^(N-1) - 1) +def $sat_s_(N, i) = i -- otherwise + + +;; TODO(3, all): implement numerics internally def $wrap__(M, N, iN(M)) : iN(N) def $extend__(M, N, sx, iN(M)) : iN(N) hint(show $extend_((%,%))^(%)#((%))) def $trunc__(M, N, sx, fN(M)) : iN(N)? hint(show $trunc_((%,%))^(%)#((%))) def $trunc_sat__(M, N, sx, fN(M)) : iN(N)? hint(show $trunc__sat_((%,%))^(%)#((%))) +def $relaxed_trunc__(M, N, sx, fN(M)) : iN(N)? hint(show $relaxed__trunc_((%,%))^(%)#((%))) def $demote__(M, N, fN(M)) : fN(N)* def $promote__(M, N, fN(M)) : fN(N)* def $convert__(M, N, sx, iN(M)) : fN(N) hint(show $convert_((%,%))^(%)#((%))) @@ -75,6 +104,7 @@ def $iclz_(N, iN(N)) : iN(N) def $ictz_(N, iN(N)) : iN(N) def $ipopcnt_(N, iN(N)) : iN(N) def $ieqz_(N, iN(N)) : u32 +def $inez_(N, iN(N)) : u32 def $ieq_(N, iN(N), iN(N)) : u32 def $ine_(N, iN(N), iN(N)) : u32 def $ilt_(N, sx, iN(N), iN(N)) : u32 hint(show $ilt_(%)^(%)#((%,%))) @@ -82,6 +112,7 @@ def $igt_(N, sx, iN(N), iN(N)) : u32 hint(show $igt_(%)^(%)#((%,%))) def $ile_(N, sx, iN(N), iN(N)) : u32 hint(show $ile_(%)^(%)#((%,%))) def $ige_(N, sx, iN(N), iN(N)) : u32 hint(show $ige_(%)^(%)#((%,%))) def $ibitselect_(N, iN(N), iN(N), iN(N)) : iN(N) +def $irelaxed_laneselect_(N, iN(N), iN(N), iN(N)) : iN(N)* def $iabs_(N, iN(N)) : iN(N) def $ineg_(N, iN(N)) : iN(N) def $imin_(N, sx, iN(N), iN(N)) : iN(N) hint(show $imin_(%)^(%)%((%,%))) @@ -90,6 +121,7 @@ def $iadd_sat_(N, sx, iN(N), iN(N)) : iN(N) hint(show $iadd__sat_(%)^(%)#((% def $isub_sat_(N, sx, iN(N), iN(N)) : iN(N) hint(show $isub__sat_(%)^(%)#((%,%))) def $iavgr_(N, sx, iN(N), iN(N)) : iN(N) hint(show $iavgr_(%)^(%)#((%,%))) def $iq15mulr_sat_(N, sx, iN(N), iN(N)) : iN(N) hint(show $iq15mulr__sat_(%)^(%)#((%,%))) +def $irelaxed_q15mulr_(N, sx, iN(N), iN(N)) : iN(N)* hint(show $relaxed__iq15mulr_(%)^(%)#((%,%))) def $fadd_(N, fN(N), fN(N)) : fN(N)* def $fsub_(N, fN(N), fN(N)) : fN(N)* @@ -99,6 +131,8 @@ def $fmin_(N, fN(N), fN(N)) : fN(N)* def $fmax_(N, fN(N), fN(N)) : fN(N)* def $fpmin_(N, fN(N), fN(N)) : fN(N)* def $fpmax_(N, fN(N), fN(N)) : fN(N)* +def $frelaxed_min_(N, fN(N), fN(N)) : fN(N)* hint(show $frelaxed__min_(%,%,%)) +def $frelaxed_max_(N, fN(N), fN(N)) : fN(N)* hint(show $frelaxed__max_(%,%,%)) def $fcopysign_(N, fN(N), fN(N)) : fN(N)* def $fabs_(N, fN(N)) : fN(N)* def $fneg_(N, fN(N)) : fN(N)* @@ -113,6 +147,75 @@ def $flt_(N, fN(N), fN(N)) : u32 def $fgt_(N, fN(N), fN(N)) : u32 def $fle_(N, fN(N), fN(N)) : u32 def $fge_(N, fN(N), fN(N)) : u32 +def $frelaxed_madd_(N, fN(N), fN(N), fN(N)) : fN(N)* hint(show $frelaxed__madd_(%,%,%)) +def $frelaxed_nmadd_(N, fN(N), fN(N), fN(N)) : fN(N)* hint(show $frelaxed__nmadd_(%,%,%)) + + +;; Packed numbers + +def $lpacknum_(lanetype, num_($lunpack(lanetype))) : lane_(lanetype) + hint(show $pack_(%,%)) hint(macro "packnum") +def $lpacknum_(numtype, c) = c +def $lpacknum_(packtype, c) = $wrap__($size($lunpack(packtype)), $psize(packtype), c) + +def $lunpacknum_(lanetype, lane_(lanetype)) : num_($lunpack(lanetype)) + hint(show $unpack_(%,%)) hint(macro "unpacknum") +def $lunpacknum_(numtype, c) = c +def $lunpacknum_(packtype, c) = $extend__($psize(packtype), $size($lunpack(packtype)), U, c) + +def $cpacknum_(storagetype, lit_($cunpack(storagetype))) : lit_(storagetype) + hint(show $pack_(%,%)) hint(macro "packnum") +def $cpacknum_(consttype, c) = c +def $cpacknum_(packtype, c) = $wrap__($size($lunpack(packtype)), $psize(packtype), c) + +def $cunpacknum_(storagetype, lit_(storagetype)) : lit_($cunpack(storagetype)) + hint(show $unpack_(%,%)) hint(macro "unpacknum") +def $cunpacknum_(consttype, c) = c +def $cunpacknum_(packtype, c) = $extend__($psize(packtype), $size($lunpack(packtype)), U, c) + + +;; Vectors + +;; TODO(rossberg, 4): avoid hardcoding v128 + +def $lanes_(shape, vec_(V128)) : lane_($lanetype(shape))* + +def $invlanes_(shape, lane_($lanetype(shape))*) : vec_(V128) + hint(show $lanes_(%)^(-1)#((%))) +def $invlanes_(sh, c*) = vc -- if c* = $lanes_(sh, vc) + +;; TODO(3, rossberg): somehow enable merging cases +def $half__(shape_1, shape_2, half__(shape_1, shape_2), nat, nat) : nat hint(show $half(%3,%4,%5)) +def $half__(Jnn_1 X M_1, Jnn_2 X M_2, LOW, i, j) = i +def $half__(Jnn_1 X M_1, Jnn_2 X M_2, HIGH, i, j) = j +def $half__(Lnn_1 X M_1, Fnn_2 X M_2, LOW, i, j) = i + + +;; Dispatch for numerics + +def $unop_(numtype, unop_(numtype), num_(numtype)) : num_(numtype)* + hint(show %2#$_(%1,%3)) +def $binop_(numtype, binop_(numtype), num_(numtype), num_(numtype)) : num_(numtype)* + hint(show %2#$_(%1,%3, %4)) +def $testop_(numtype, testop_(numtype), num_(numtype)) : u32 + hint(show %2#$_(%1,%3)) +def $relop_(numtype, relop_(numtype), num_(numtype), num_(numtype)) : u32 + hint(show %2#$_(%1,%3, %4)) +def $cvtop__(numtype_1, numtype_2, cvtop__(numtype_1, numtype_2), num_(numtype_1)) : num_(numtype_2)* + hint(show %3#$__(%1,%2,%4)) + +def $unop_(Inn, CLZ, iN) = $iclz_($sizenn(Inn), iN) +def $unop_(Inn, CTZ, iN) = $ictz_($sizenn(Inn), iN) +def $unop_(Inn, POPCNT, iN) = $ipopcnt_($sizenn(Inn), iN) +def $unop_(Inn, EXTEND M, iN) = $extend__(M, $sizenn(Inn), S, $wrap__($sizenn(Inn), M, iN)) + +def $unop_(Fnn, ABS, fN) = $fabs_($sizenn(Fnn), fN) +def $unop_(Fnn, NEG, fN) = $fneg_($sizenn(Fnn), fN) +def $unop_(Fnn, SQRT, fN) = $fsqrt_($sizenn(Fnn), fN) +def $unop_(Fnn, CEIL, fN) = $fceil_($sizenn(Fnn), fN) +def $unop_(Fnn, FLOOR, fN) = $ffloor_($sizenn(Fnn), fN) +def $unop_(Fnn, TRUNC, fN) = $ftrunc_($sizenn(Fnn), fN) +def $unop_(Fnn, NEAREST, fN) = $fnearest_($sizenn(Fnn), fN) def $binop_(Inn, ADD, iN_1, iN_2) = $iadd_($sizenn(Inn), iN_1, iN_2) def $binop_(Inn, SUB, iN_1, iN_2) = $isub_($sizenn(Inn), iN_1, iN_2) @@ -126,17 +229,6 @@ def $binop_(Inn, SHL, iN_1, iN_2) = $ishl_($sizenn(Inn), iN_1, iN_2) def $binop_(Inn, SHR sx, iN_1, iN_2) = $ishr_($sizenn(Inn), sx, iN_1, iN_2) def $binop_(Inn, ROTL, iN_1, iN_2) = $irotl_($sizenn(Inn), iN_1, iN_2) def $binop_(Inn, ROTR, iN_1, iN_2) = $irotr_($sizenn(Inn), iN_1, iN_2) -def $unop_(Inn, CLZ, iN) = $iclz_($sizenn(Inn), iN) -def $unop_(Inn, CTZ, iN) = $ictz_($sizenn(Inn), iN) -def $unop_(Inn, POPCNT, iN) = $ipopcnt_($sizenn(Inn), iN) -def $unop_(Inn, EXTEND M, iN) = $extend__(M, $sizenn(Inn), S, $wrap__($sizenn(Inn), M, iN)) -def $testop_(Inn, EQZ, iN) = $ieqz_($sizenn(Inn), iN) -def $relop_(Inn, EQ, iN_1, iN_2) = $ieq_($sizenn(Inn), iN_1, iN_2) -def $relop_(Inn, NE, iN_1, iN_2) = $ine_($sizenn(Inn), iN_1, iN_2) -def $relop_(Inn, LT sx, iN_1, iN_2) = $ilt_($sizenn(Inn), sx, iN_1, iN_2) -def $relop_(Inn, GT sx, iN_1, iN_2) = $igt_($sizenn(Inn), sx, iN_1, iN_2) -def $relop_(Inn, LE sx, iN_1, iN_2) = $ile_($sizenn(Inn), sx, iN_1, iN_2) -def $relop_(Inn, GE sx, iN_1, iN_2) = $ige_($sizenn(Inn), sx, iN_1, iN_2) def $binop_(Fnn, ADD, fN_1, fN_2) = $fadd_($sizenn(Fnn), fN_1, fN_2) def $binop_(Fnn, SUB, fN_1, fN_2) = $fsub_($sizenn(Fnn), fN_1, fN_2) @@ -146,13 +238,14 @@ def $binop_(Fnn, MIN, fN_1, fN_2) = $fmin_($sizenn(Fnn), fN_1, fN_2) def $binop_(Fnn, MAX, fN_1, fN_2) = $fmax_($sizenn(Fnn), fN_1, fN_2) def $binop_(Fnn, COPYSIGN, fN_1, fN_2) = $fcopysign_($sizenn(Fnn), fN_1, fN_2) -def $unop_(Fnn, ABS, fN) = $fabs_($sizenn(Fnn), fN) -def $unop_(Fnn, NEG, fN) = $fneg_($sizenn(Fnn), fN) -def $unop_(Fnn, SQRT, fN) = $fsqrt_($sizenn(Fnn), fN) -def $unop_(Fnn, CEIL, fN) = $fceil_($sizenn(Fnn), fN) -def $unop_(Fnn, FLOOR, fN) = $ffloor_($sizenn(Fnn), fN) -def $unop_(Fnn, TRUNC, fN) = $ftrunc_($sizenn(Fnn), fN) -def $unop_(Fnn, NEAREST, fN) = $fnearest_($sizenn(Fnn), fN) +def $testop_(Inn, EQZ, iN) = $ieqz_($sizenn(Inn), iN) + +def $relop_(Inn, EQ, iN_1, iN_2) = $ieq_($sizenn(Inn), iN_1, iN_2) +def $relop_(Inn, NE, iN_1, iN_2) = $ine_($sizenn(Inn), iN_1, iN_2) +def $relop_(Inn, LT sx, iN_1, iN_2) = $ilt_($sizenn(Inn), sx, iN_1, iN_2) +def $relop_(Inn, GT sx, iN_1, iN_2) = $igt_($sizenn(Inn), sx, iN_1, iN_2) +def $relop_(Inn, LE sx, iN_1, iN_2) = $ile_($sizenn(Inn), sx, iN_1, iN_2) +def $relop_(Inn, GE sx, iN_1, iN_2) = $ige_($sizenn(Inn), sx, iN_1, iN_2) def $relop_(Fnn, EQ, fN_1, fN_2) = $feq_($sizenn(Fnn), fN_1, fN_2) def $relop_(Fnn, NE, fN_1, fN_2) = $fne_($sizenn(Fnn), fN_1, fN_2) @@ -172,44 +265,7 @@ def $cvtop__(Inn_1, Fnn_2, REINTERPRET, iN_1) = $reinterpret__(Inn_1, Fnn_2, iN_ def $cvtop__(Fnn_1, Inn_2, REINTERPRET, fN_1) = $reinterpret__(Fnn_1, Inn_2, fN_1) -- if $size(Fnn_1) = $size(Inn_2) ;; TODO(rossberg, 3): make implicit -;; Packed numbers - -def $lpacknum_(lanetype, num_($lunpack(lanetype))) : lane_(lanetype) - hint(show $pack_(%,%)) hint(macro "packnum") -def $lpacknum_(numtype, c) = c -def $lpacknum_(packtype, c) = $wrap__($size($lunpack(packtype)), $psize(packtype), c) - -def $lunpacknum_(lanetype, lane_(lanetype)) : num_($lunpack(lanetype)) - hint(show $unpack_(%,%)) hint(macro "unpacknum") -def $lunpacknum_(numtype, c) = c -def $lunpacknum_(packtype, c) = $extend__($psize(packtype), $size($lunpack(packtype)), U, c) - -def $cpacknum_(storagetype, lit_($cunpack(storagetype))) : lit_(storagetype) - hint(show $pack_(%,%)) hint(macro "packnum") -def $cpacknum_(consttype, c) = c -def $cpacknum_(packtype, c) = $wrap__($size($lunpack(packtype)), $psize(packtype), c) - -def $cunpacknum_(storagetype, lit_(storagetype)) : lit_($cunpack(storagetype)) - hint(show $unpack_(%,%)) hint(macro "unpacknum") -def $cunpacknum_(consttype, c) = c -def $cunpacknum_(packtype, c) = $extend__($psize(packtype), $size($lunpack(packtype)), U, c) - - -;; Vectors - -;; TODO(rossberg, 4): avoid hardcoding v128 - -def $lanes_(shape, vec_(V128)) : lane_($lanetype(shape))* - -def $invlanes_(shape, lane_($lanetype(shape))*) : vec_(V128) - hint(show $lanes_(%)^(-1)#((%))) -def $invlanes_(sh, c*) = vc -- if c* = $lanes_(sh, vc) - -;; TODO(3, rossberg): somehow enable merging cases -def $half__(shape_1, shape_2, half__(shape_1, shape_2), nat, nat) : nat hint(show $half(%3,%4,%5)) -def $half__(Jnn_1 X M_1, Jnn_2 X M_2, LOW, i, j) = i -def $half__(Jnn_1 X M_1, Jnn_2 X M_2, HIGH, i, j) = j -def $half__(Lnn_1 X M_1, Fnn_2 X M_2, LOW, i, j) = i +;; Dispatch for vectors def $vvunop_(vectype, vvunop, vec_(vectype)) : vec_(vectype)* hint(show %2#$_(%1,%3)) @@ -218,32 +274,64 @@ def $vvbinop_(vectype, vvbinop, vec_(vectype), vec_(vectype)) : vec_(vectype)* def $vvternop_(vectype, vvternop, vec_(vectype), vec_(vectype), vec_(vectype)) : vec_(vectype)* hint(show %2#$_(%1,%3,%4,%5)) -def $vvunop_(V128, NOT, v128) = $inot_($vsize(V128), v128) -def $vvbinop_(V128, AND, v128_1, v128_2) = $iand_($vsize(V128), v128_1, v128_2) -def $vvbinop_(V128, ANDNOT, v128_1, v128_2) = $iandnot_($vsize(V128), v128_1, v128_2) -def $vvbinop_(V128, OR, v128_1, v128_2) = $ior_($vsize(V128), v128_1, v128_2) -def $vvbinop_(V128, XOR, v128_1, v128_2) = $ixor_($vsize(V128), v128_1, v128_2) -def $vvternop_(V128, BITSELECT, v128_1, v128_2, v128_3) = $ibitselect_($vsize(V128), v128_1, v128_2, v128_3) - -;; TODO(2, rossberg): rename these to mapunop etc? def $vunop_(shape, vunop_(shape), vec_(V128)) : vec_(V128)* hint(show %2#$_(%1,%3)) def $vbinop_(shape, vbinop_(shape), vec_(V128), vec_(V128)) : vec_(V128)* hint(show %2#$_(%1,%3,%4)) +def $vternop_(shape, vternop_(shape), vec_(V128), vec_(V128), vec_(V128)) : vec_(V128)* + hint(show %2#$_(%1,%3,%4,%5)) +def $vtestop_(shape, vtestop_(shape), vec_(V128)) : u32 + hint(show %2#$_(%1,%3)) def $vrelop_(shape, vrelop_(shape), vec_(V128), vec_(V128)) : vec_(V128) hint(show %2#$_(%1,%3,%4)) + def $vcvtop__(shape_1, shape_2, vcvtop__(shape_1, shape_2), lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* hint(show %3#$__(%1,%2)^(%4)#((%5))) +def $vextunop__(ishape_1, ishape_2, vextunop__(ishape_1, ishape_2), vec_(V128)) : vec_(V128) + hint(show %3#$__(%1,%2,%4)) +def $vextbinop__(ishape_1, ishape_2, vextbinop__(ishape_1, ishape_2), vec_(V128), vec_(V128)) : vec_(V128) + hint(show %3#$__(%1,%2,%4,%5)) +def $vextternop__(ishape_1, ishape_2, vextternop__(ishape_1, ishape_2), vec_(V128), vec_(V128), vec_(V128)) : vec_(V128) + hint(show %3#$__(%1,%2,%4,%5,%6)) + +def $vshiftop_(ishape, vshiftop_(ishape), lane_($lanetype(ishape)), u32) : lane_($lanetype(ishape)) + hint(show %2#$_(%1)#(%3, %4)) + + +def $vvunop_(V128, NOT, v128) = $inot_($vsize(V128), v128) + +def $vvbinop_(V128, AND, v128_1, v128_2) = $iand_($vsize(V128), v128_1, v128_2) +def $vvbinop_(V128, ANDNOT, v128_1, v128_2) = $iandnot_($vsize(V128), v128_1, v128_2) +def $vvbinop_(V128, OR, v128_1, v128_2) = $ior_($vsize(V128), v128_1, v128_2) +def $vvbinop_(V128, XOR, v128_1, v128_2) = $ixor_($vsize(V128), v128_1, v128_2) + +def $vvternop_(V128, BITSELECT, v128_1, v128_2, v128_3) = $ibitselect_($vsize(V128), v128_1, v128_2, v128_3) + + def $ivunop_(shape, def $f_(N, iN(N)) : iN(N), vec_(V128)) : vec_(V128)* def $ivunop_(Jnn X M, def $f_, vN_1) = $invlanes_(Jnn X M, c*) -- if c_1* = $lanes_(Jnn X M, vN_1) -- if c* = $f_($lsizenn(Jnn), c_1)* +def $fvunop_(shape, def $f_(N, fN(N)) : fN(N)*, vec_(V128)) : vec_(V128)* +def $fvunop_(Fnn X M, def $f_, vN_1) = $invlanes_(Fnn X M, c*)* + -- if c_1* = $lanes_(Fnn X M, vN_1) + -- if c** = $setproduct_(lane_(Fnn), $f_($sizenn(Fnn), c_1)*) + +def $vunop_(Fnn X M, ABS, vN_1) = $fvunop_(Fnn X M, $fabs_, vN_1) +def $vunop_(Fnn X M, NEG, vN_1) = $fvunop_(Fnn X M, $fneg_, vN_1) +def $vunop_(Fnn X M, SQRT, vN_1) = $fvunop_(Fnn X M, $fsqrt_, vN_1) +def $vunop_(Fnn X M, CEIL, vN_1) = $fvunop_(Fnn X M, $fceil_, vN_1) +def $vunop_(Fnn X M, FLOOR, vN_1) = $fvunop_(Fnn X M, $ffloor_, vN_1) +def $vunop_(Fnn X M, TRUNC, vN_1) = $fvunop_(Fnn X M, $ftrunc_, vN_1) +def $vunop_(Fnn X M, NEAREST, vN_1) = $fvunop_(Fnn X M, $fnearest_, vN_1) + def $vunop_(Jnn X M, ABS, vN_1) = $ivunop_(Jnn X M, $iabs_, vN_1) def $vunop_(Jnn X M, NEG, vN_1) = $ivunop_(Jnn X M, $ineg_, vN_1) def $vunop_(Jnn X M, POPCNT, vN_1) = $ivunop_(Jnn X M, $ipopcnt_, vN_1) + def $ivbinop_(shape, def $f_(N, iN(N), iN(N)) : iN(N), vec_(V128), vec_(V128)) : vec_(V128)* def $ivbinop_(Jnn X M, def $f_, vN_1, vN_2) = $invlanes_(Jnn X M, c*) -- if c_1* = $lanes_(Jnn X M, vN_1) @@ -256,6 +344,18 @@ def $ivbinopsx_(Jnn X M, def $f_, sx, vN_1, vN_2) = $invlanes_(Jnn X M, c*) -- if c_2* = $lanes_(Jnn X M, vN_2) -- if c* = $f_($lsizenn(Jnn), sx, c_1, c_2)* +def $ivbinopsxnd_(shape, def $f_(N, sx, iN(N), iN(N)) : iN(N)*, sx, vec_(V128), vec_(V128)) : vec_(V128)* +def $ivbinopsxnd_(Jnn X M, def $f_, sx, vN_1, vN_2) = $invlanes_(Jnn X M, c*)* + -- if c_1* = $lanes_(Jnn X M, vN_1) + -- if c_2* = $lanes_(Jnn X M, vN_2) + -- if c** = $setproduct_(lane_(Jnn), $f_($lsizenn(Jnn), sx, c_1, c_2)*) + +def $fvbinop_(shape, def $f_(N, fN(N), fN(N)) : fN(N)*, vec_(V128), vec_(V128)) : vec_(V128)* +def $fvbinop_(Fnn X M, def $f_, vN_1, vN_2) = $invlanes_(Fnn X M, c*)* + -- if c_1* = $lanes_(Fnn X M, vN_1) + -- if c_2* = $lanes_(Fnn X M, vN_2) + -- if c** = $setproduct_(lane_(Fnn), $f_($sizenn(Fnn), c_1, c_2)*) + def $vbinop_(Jnn X M, ADD, vN_1, vN_2) = $ivbinop_(Jnn X M, $iadd_, vN_1, vN_2) def $vbinop_(Jnn X M, SUB, vN_1, vN_2) = $ivbinop_(Jnn X M, $isub_, vN_1, vN_2) def $vbinop_(Jnn X M, MUL, vN_1, vN_2) = $ivbinop_(Jnn X M, $imul_, vN_1, vN_2) @@ -265,6 +365,53 @@ def $vbinop_(Jnn X M, MIN sx, vN_1, vN_2) = $ivbinopsx_(Jnn X M, $imin_, sx, vN_ def $vbinop_(Jnn X M, MAX sx, vN_1, vN_2) = $ivbinopsx_(Jnn X M, $imax_, sx, vN_1, vN_2) def $vbinop_(Jnn X M, AVGR U, vN_1, vN_2) = $ivbinopsx_(Jnn X M, $iavgr_, U, vN_1, vN_2) def $vbinop_(Jnn X M, Q15MULR_SAT S, vN_1, vN_2) = $ivbinopsx_(Jnn X M, $iq15mulr_sat_, S, vN_1, vN_2) +def $vbinop_(Jnn X M, RELAXED_Q15MULR S, vN_1, vN_2) = $ivbinopsxnd_(Jnn X M, $irelaxed_q15mulr_, S, vN_1, vN_2) + +def $vbinop_(Fnn X M, ADD, vN_1, vN_2) = $fvbinop_(Fnn X M, $fadd_, vN_1, vN_2) +def $vbinop_(Fnn X M, SUB, vN_1, vN_2) = $fvbinop_(Fnn X M, $fsub_, vN_1, vN_2) +def $vbinop_(Fnn X M, MUL, vN_1, vN_2) = $fvbinop_(Fnn X M, $fmul_, vN_1, vN_2) +def $vbinop_(Fnn X M, DIV, vN_1, vN_2) = $fvbinop_(Fnn X M, $fdiv_, vN_1, vN_2) +def $vbinop_(Fnn X M, MIN, vN_1, vN_2) = $fvbinop_(Fnn X M, $fmin_, vN_1, vN_2) +def $vbinop_(Fnn X M, MAX, vN_1, vN_2) = $fvbinop_(Fnn X M, $fmax_, vN_1, vN_2) +def $vbinop_(Fnn X M, PMIN, vN_1, vN_2) = $fvbinop_(Fnn X M, $fpmin_, vN_1, vN_2) +def $vbinop_(Fnn X M, PMAX, vN_1, vN_2) = $fvbinop_(Fnn X M, $fpmax_, vN_1, vN_2) +def $vbinop_(Fnn X M, RELAXED_MIN, vN_1, vN_2) = $fvbinop_(Fnn X M, $frelaxed_min_, vN_1, vN_2) +def $vbinop_(Fnn X M, RELAXED_MAX, vN_1, vN_2) = $fvbinop_(Fnn X M, $frelaxed_max_, vN_1, vN_2) + + +def $ivternopnd_(shape, def $f_(N, iN(N), iN(N), iN(N)) : iN(N)*, vec_(V128), vec_(V128), vec_(V128)) : vec_(V128)* +def $ivternopnd_(Jnn X M, def $f_, vN_1, vN_2, vN_3) = $invlanes_(Jnn X M, c*)* + -- if c_1* = $lanes_(Jnn X M, vN_1) + -- if c_2* = $lanes_(Jnn X M, vN_2) + -- if c_3* = $lanes_(Jnn X M, vN_3) + -- if c** = $setproduct_(lane_(Jnn), $f_($lsizenn(Jnn), c_1, c_2, c_3)*) + +def $fvternop_(shape, def $f_(N, fN(N), fN(N), fN(N)) : fN(N)*, vec_(V128), vec_(V128), vec_(V128)) : vec_(V128)* +def $fvternop_(Fnn X M, def $f_, vN_1, vN_2, vN_3) = $invlanes_(Fnn X M, c*)* + -- if c_1* = $lanes_(Fnn X M, vN_1) + -- if c_2* = $lanes_(Fnn X M, vN_2) + -- if c_3* = $lanes_(Fnn X M, vN_3) + -- if c** = $setproduct_(lane_(Fnn), $f_($sizenn(Fnn), c_1, c_2, c_3)*) + +def $vternop_(Jnn X M, RELAXED_LANESELECT, vN_1, vN_2, vN_3) = $ivternopnd_(Jnn X M, $irelaxed_laneselect_, vN_1, vN_2, vN_3) + +def $vternop_(Fnn X M, RELAXED_MADD, vN_1, vN_2, vN_3) = $fvternop_(Fnn X M, $frelaxed_madd_, vN_1, vN_2, vN_3) +def $vternop_(Fnn X M, RELAXED_NMADD, vN_1, vN_2, vN_3) = $fvternop_(Fnn X M, $frelaxed_nmadd_, vN_1, vN_2, vN_3) + + +;; TODO(1, rossberg): this is not lane-wise, lump with shape shifters +def $ivtestop_(shape, def $f_(N, iN(N)) : u32, vec_(V128)) : u32 +def $ivtestop_(Jnn X M, def $f_, vN_1) = $prod(c*) + -- if c_1* = $lanes_(Jnn X M, vN_1) + -- if c* = $f_($lsizenn(Jnn), c_1)* + +def $fvtestop_(shape, def $f_(N, fN(N)) : u32, vec_(V128)) : u32 +def $fvtestop_(Fnn X M, def $f_, vN_1) = $prod(c*) + -- if c_1* = $lanes_(Fnn X M, vN_1) + -- if c* = $f_($sizenn(Fnn), c_1)* + +def $vtestop_(Jnn X M, ALL_TRUE, vN_1) = $ivtestop_(Jnn X M, $inez_, vN_1) + def $ivrelop_(shape, def $f_(N, iN(N), iN(N)) : u32, vec_(V128), vec_(V128)) : vec_(V128) def $ivrelop_(Jnn X M, def $f_, vN_1, vN_2) = $invlanes_(Jnn X M, c*) @@ -278,41 +425,6 @@ def $ivrelopsx_(Jnn X M, def $f_, sx, vN_1, vN_2) = $invlanes_(Jnn X M, c*) -- if c_2* = $lanes_(Jnn X M, vN_2) -- if c* = $extend__(1, $lsizenn(Jnn), S, $f_($lsizenn(Jnn), sx, c_1, c_2))* -def $vrelop_(Jnn X M, EQ, vN_1, vN_2) = $ivrelop_(Jnn X M, $ieq_, vN_1, vN_2) -def $vrelop_(Jnn X M, NE, vN_1, vN_2) = $ivrelop_(Jnn X M, $ine_, vN_1, vN_2) -def $vrelop_(Jnn X M, LT sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $ilt_, sx, vN_1, vN_2) -def $vrelop_(Jnn X M, GT sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $igt_, sx, vN_1, vN_2) -def $vrelop_(Jnn X M, LE sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $ile_, sx, vN_1, vN_2) -def $vrelop_(Jnn X M, GE sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $ige_, sx, vN_1, vN_2) - -def $fvunop_(shape, def $f_(N, fN(N)) : fN(N)*, vec_(V128)) : vec_(V128)* -def $fvunop_(Fnn X M, def $f_, vN_1) = $invlanes_(Fnn X M, c*)* - -- if c_1* = $lanes_(Fnn X M, vN_1) - -- if c** = $setproduct_(lane_(Fnn), $f_($sizenn(Fnn), c_1)*) - -def $vunop_(Fnn X M, ABS, vN_1) = $fvunop_(Fnn X M, $fabs_, vN_1) -def $vunop_(Fnn X M, NEG, vN_1) = $fvunop_(Fnn X M, $fneg_, vN_1) -def $vunop_(Fnn X M, SQRT, vN_1) = $fvunop_(Fnn X M, $fsqrt_, vN_1) -def $vunop_(Fnn X M, CEIL, vN_1) = $fvunop_(Fnn X M, $fceil_, vN_1) -def $vunop_(Fnn X M, FLOOR, vN_1) = $fvunop_(Fnn X M, $ffloor_, vN_1) -def $vunop_(Fnn X M, TRUNC, vN_1) = $fvunop_(Fnn X M, $ftrunc_, vN_1) -def $vunop_(Fnn X M, NEAREST, vN_1) = $fvunop_(Fnn X M, $fnearest_, vN_1) - -def $fvbinop_(shape, def $f_(N, fN(N), fN(N)) : fN(N)*, vec_(V128), vec_(V128)) : vec_(V128)* -def $fvbinop_(Fnn X M, def $f_, vN_1, vN_2) = $invlanes_(Fnn X M, c*)* - -- if c_1* = $lanes_(Fnn X M, vN_1) - -- if c_2* = $lanes_(Fnn X M, vN_2) - -- if c** = $setproduct_(lane_(Fnn), $f_($sizenn(Fnn), c_1, c_2)*) - -def $vbinop_(Fnn X M, ADD, vN_1, vN_2) = $fvbinop_(Fnn X M, $fadd_, vN_1, vN_2) -def $vbinop_(Fnn X M, SUB, vN_1, vN_2) = $fvbinop_(Fnn X M, $fsub_, vN_1, vN_2) -def $vbinop_(Fnn X M, MUL, vN_1, vN_2) = $fvbinop_(Fnn X M, $fmul_, vN_1, vN_2) -def $vbinop_(Fnn X M, DIV, vN_1, vN_2) = $fvbinop_(Fnn X M, $fdiv_, vN_1, vN_2) -def $vbinop_(Fnn X M, MIN, vN_1, vN_2) = $fvbinop_(Fnn X M, $fmin_, vN_1, vN_2) -def $vbinop_(Fnn X M, MAX, vN_1, vN_2) = $fvbinop_(Fnn X M, $fmax_, vN_1, vN_2) -def $vbinop_(Fnn X M, PMIN, vN_1, vN_2) = $fvbinop_(Fnn X M, $fpmin_, vN_1, vN_2) -def $vbinop_(Fnn X M, PMAX, vN_1, vN_2) = $fvbinop_(Fnn X M, $fpmax_, vN_1, vN_2) - def $fvrelop_(shape, def $f_(N, fN(N), fN(N)) : u32, vec_(V128), vec_(V128)) : vec_(V128) def $fvrelop_(Fnn X M, def $f_, vN_1, vN_2) = $invlanes_(Inn X M, c*) -- if c_1* = $lanes_(Fnn X M, vN_1) @@ -320,6 +432,13 @@ def $fvrelop_(Fnn X M, def $f_, vN_1, vN_2) = $invlanes_(Inn X M, c*) -- if c* = $extend__(1, $sizenn(Fnn), S, $f_($sizenn(Fnn), c_1, c_2))* -- if $size(Inn) = $size(Fnn) ;; TODO(rossberg, 3): make implicit +def $vrelop_(Jnn X M, EQ, vN_1, vN_2) = $ivrelop_(Jnn X M, $ieq_, vN_1, vN_2) +def $vrelop_(Jnn X M, NE, vN_1, vN_2) = $ivrelop_(Jnn X M, $ine_, vN_1, vN_2) +def $vrelop_(Jnn X M, LT sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $ilt_, sx, vN_1, vN_2) +def $vrelop_(Jnn X M, GT sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $igt_, sx, vN_1, vN_2) +def $vrelop_(Jnn X M, LE sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $ile_, sx, vN_1, vN_2) +def $vrelop_(Jnn X M, GE sx, vN_1, vN_2) = $ivrelopsx_(Jnn X M, $ige_, sx, vN_1, vN_2) + def $vrelop_(Fnn X M, EQ, vN_1, vN_2) = $fvrelop_(Fnn X M, $feq_, vN_1, vN_2) def $vrelop_(Fnn X M, NE, vN_1, vN_2) = $fvrelop_(Fnn X M, $fne_, vN_1, vN_2) def $vrelop_(Fnn X M, LT, vN_1, vN_2) = $fvrelop_(Fnn X M, $flt_, vN_1, vN_2) @@ -327,22 +446,23 @@ def $vrelop_(Fnn X M, GT, vN_1, vN_2) = $fvrelop_(Fnn X M, $fgt_, vN_1, vN_2) def $vrelop_(Fnn X M, LE, vN_1, vN_2) = $fvrelop_(Fnn X M, $fle_, vN_1, vN_2) def $vrelop_(Fnn X M, GE, vN_1, vN_2) = $fvrelop_(Fnn X M, $fge_, vN_1, vN_2) + +;; TODO(1, rossberg): these don't need the shape, should be part of cvtop def $vcvtop__(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND sx, iN_1) = iN_2 -- if iN_2 = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, iN_1) def $vcvtop__(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT sx, iN_1) = fN_2 -- if fN_2 = $convert__($lsizenn1(Jnn_1), $lsizenn2(Fnn_2), sx, iN_1) def $vcvtop__(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx, fN_1) = $list_(lane_(Inn_2), iN_2?) -- if iN_2? = $trunc_sat__($lsizenn1(Fnn_1), $lsizenn2(Inn_2), sx, fN_1) +def $vcvtop__(Fnn_1 X M_1, Inn_2 X M_2, RELAXED_TRUNC sx, fN_1) = $list_(lane_(Inn_2), iN_2?) + -- if iN_2? = $relaxed_trunc__($lsizenn1(Fnn_1), $lsizenn2(Inn_2), sx, fN_1) def $vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE, fN_1) = fN_2* -- if fN_2* = $demote__($lsizenn1(Fnn_1), $lsizenn2(Fnn_2), fN_1) def $vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE, fN_1) = fN_2* -- if fN_2* = $promote__($lsizenn1(Fnn_1), $lsizenn2(Fnn_2), fN_1) -def $vextunop__(ishape_1, ishape_2, vextunop__(ishape_1, ishape_2), vec_(V128)) : vec_(V128) - hint(show %3#$__(%1,%2,%4)) -def $vextbinop__(ishape_1, ishape_2, vextbinop__(ishape_1, ishape_2), vec_(V128), vec_(V128)) : vec_(V128) - hint(show %3#$__(%1,%2,%4,%5)) +;; TODO(1, rossberg): use higher-order dispatch like above def $vextunop__(Jnn_1 X M_1, Jnn_2 X M_2, EXTADD_PAIRWISE sx, c_1) = c -- var cj_1 : iN($lsize(Jnn_2)) -- var cj_2 : iN($lsize(Jnn_2)) @@ -359,12 +479,38 @@ def $vextbinop__(Jnn_1 X M_1, Jnn_2 X M_2, DOT S, c_1, c_2) = c -- var cj_2 : iN($lsize(Jnn_2)) -- if ci_1* = $lanes_(Jnn_1 X M_1, c_1) -- if ci_2* = $lanes_(Jnn_1 X M_1, c_2) - -- if $concat_(iN($lsizenn2(Jnn_2)), (cj_1 cj_2)*) = $imul_($lsizenn2(Jnn_2), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_2))* + -- if ci'_1* = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1)* + -- if ci'_2* = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_2)* + -- if $concat_(iN($lsizenn2(Jnn_2)), (cj_1 cj_2)*) = $imul_($lsizenn2(Jnn_2), ci'_1, ci'_2)* -- if c = $invlanes_(Jnn_2 X M_2, $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*) +def $vextbinop__(Jnn_1 X M_1, Jnn_2 X M_2, RELAXED_DOT S, c_1, c_2) = c + -- var cj_1 : iN($lsize(Jnn_2)) + -- var cj_2 : iN($lsize(Jnn_2)) + -- if ci_1* = $lanes_(Jnn_1 X M_1, c_1) + -- if ci_2* = $lanes_(Jnn_1 X M_1, c_2) + -- if ci'_1* = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1)* + -- if ci'_2* = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), $relaxed2($R_idot, sx, S, U), ci_2)* + -- if $concat_(iN($lsizenn2(Jnn_2)), (cj_1 cj_2)*) = $imul_($lsizenn2(Jnn_2), ci'_1, ci'_2)* + -- if c = $invlanes_(Jnn_2 X M_2, $iadd_sat_($lsizenn2(Jnn_2), S, cj_1, cj_2)*) -;; TODO(3, rossberg): refactor for consistency? -def $vshiftop_(ishape, vshiftop_(ishape), lane_($lanetype(ishape)), u32) : lane_($lanetype(ishape)) - hint(show %2#$_(%1)#(%3, %4)) - +;; TODO(1, rossberg): refactor DOT operators +def $vextternop__(Jnn_1 X M_1, Jnn_2 X M_2, RELAXED_DOT_ADD S, c_1, c_2, c_3) = c + -- var cj_1 : iN($lsize(Jnn_2)) + -- var cj_2 : iN($lsize(Jnn_2)) + -- if ci_1* = $lanes_(Jnn_1 X M_1, c_1) + -- if ci_2* = $lanes_(Jnn_1 X M_1, c_2) + -- if ci_3* = $lanes_(Jnn_2 X M_2, c_3) + -- if $lsizenn(Jnn) = $(2*$lsizenn1(Jnn_1)) + -- if ci'_1* = $extend__($lsizenn1(Jnn_1), $lsizenn(Jnn), S, ci_1)* + -- if ci'_2* = $extend__($lsizenn1(Jnn_1), $lsizenn(Jnn), $relaxed2($R_idot, sx, S, U), ci_2)* + -- if $concat_(iN($lsizenn(Jnn)), (cj_1 cj_2)*) = $imul_($lsizenn(Jnn), ci'_1, ci'_2)* + -- if $concat_(iN($lsizenn(Jnn)), (ck_1 ck_2)*) = $iadd_sat_($lsizenn(Jnn), S, cj_1, cj_2)* + -- if ck'_1* = $extend__($lsizenn(Jnn), $lsizenn2(Jnn_2), S, ck_1)* + -- if ck'_2* = $extend__($lsizenn(Jnn), $lsizenn2(Jnn_2), S, ck_2)* + -- if ck* = $iadd_($lsizenn2(Jnn_2), ck'_1, ck'_2)* + -- if c = $invlanes_(Jnn_2 X M_2, $iadd_($lsizenn2(Jnn_2), ck, ci_3)*) + + +;; TODO(1, rossberg): refactor for consistency def $vshiftop_(Jnn X M, SHL, lane, n) = $ishl_($lsizenn(Jnn), lane, n) def $vshiftop_(Jnn X M, SHR sx, lane, n) = $ishr_($lsizenn(Jnn), sx, lane, n) diff --git a/spectec/spec/wasm-3.0/6-typing.watsup b/spectec/spec/wasm-3.0/6-typing.watsup index 50cc2aaf9d..3bcf77370e 100644 --- a/spectec/spec/wasm-3.0/6-typing.watsup +++ b/spectec/spec/wasm-3.0/6-typing.watsup @@ -945,6 +945,9 @@ rule Instr_ok/vunop: rule Instr_ok/vbinop: C |- VBINOP sh vbinop : V128 V128 -> V128 +rule Instr_ok/vternop: + C |- VTERNOP sh vternop : V128 V128 V128 -> V128 + rule Instr_ok/vtestop: C |- VTESTOP sh vtestop : V128 -> I32 @@ -957,8 +960,8 @@ rule Instr_ok/vshiftop: rule Instr_ok/vbitmask: C |- VBITMASK sh : V128 -> I32 -rule Instr_ok/vswizzle: - C |- VSWIZZLE sh : V128 V128 -> V128 +rule Instr_ok/vswizzlop: + C |- VSWIZZLOP sh vswizzlop : V128 V128 -> V128 rule Instr_ok/vshuffle: C |- VSHUFFLE sh i* : V128 V128 -> V128 @@ -981,6 +984,9 @@ rule Instr_ok/vextunop: rule Instr_ok/vextbinop: C |- VEXTBINOP sh_1 sh_2 vextbinop : V128 V128 -> V128 +rule Instr_ok/vextternop: + C |- VEXTTERNOP sh_1 sh_2 vextternop : V128 V128 V128 -> V128 + rule Instr_ok/vnarrow: C |- VNARROW sh_1 sh_2 sx : V128 V128 -> V128 diff --git a/spectec/spec/wasm-3.0/8-reduction.watsup b/spectec/spec/wasm-3.0/8-reduction.watsup index eef8a5f344..1784aa99dc 100644 --- a/spectec/spec/wasm-3.0/8-reduction.watsup +++ b/spectec/spec/wasm-3.0/8-reduction.watsup @@ -692,47 +692,57 @@ rule Step_pure/vbinop-trap: -- if $vbinop_(sh, vbinop, c_1, c_2) = eps -;; TODO(2, rossberg): introduce $vitestop for uniformity -rule Step_pure/vtestop-true: - (VCONST V128 c) (VTESTOP (Jnn X M) ALL_TRUE) ~> (CONST I32 1) - -- if ci_1* = $lanes_(Jnn X M, c) - -- (if $(ci_1 =/= 0))* ;; TODO(3, rossberg): enable same line +rule Step_pure/vternop-val: + (VCONST V128 c_1) (VCONST V128 c_2) (VCONST V128 c_3) (VTERNOP sh vternop) ~> (VCONST V128 c) + -- if c <- $vternop_(sh, vternop, c_1, c_2, c_3) -rule Step_pure/vtestop-false: - (VCONST V128 c) (VTESTOP (Jnn X M) ALL_TRUE) ~> (CONST I32 0) - -- otherwise +rule Step_pure/vternop-trap: + (VCONST V128 c_1) (VCONST V128 c_2) (VCONST V128 c_3) (VTERNOP sh vternop) ~> TRAP + -- if $vternop_(sh, vternop, c_1, c_2, c_3) = eps + + +rule Step_pure/vtestop: + (VCONST V128 c_1) (VTESTOP sh vtestop) ~> (CONST I32 i) + -- if $vtestop_(sh, vtestop, c_1) = i rule Step_pure/vrelop: (VCONST V128 c_1) (VCONST V128 c_2) (VRELOP sh vrelop) ~> (VCONST V128 c) -- if $vrelop_(sh, vrelop, c_1, c_2) = c -(; TODO(3, rossberg): this should be implemented at the same level as other pointwise ops - -- if c'_1* = $lanes_(Lnn X M, c_1) - -- if c'_2* = $lanes_(Lnn X M, c_2) - -- if c = $invlanes_($IN($lsize(Lnn)) X M, $extend__(1, $lsize(Lnn), S, $vrelop_(Lnn X M, vrelop, c'_1, c'_2))*) -;) +;; TODO(1, rossberg): abstract to numerics rule Step_pure/vshiftop: (VCONST V128 c_1) (CONST I32 n) (VSHIFTOP (Jnn X M) vshiftop) ~> (VCONST V128 c) -- if c'* = $lanes_(Jnn X M, c_1) -- if c = $invlanes_(Jnn X M, $vshiftop_(Jnn X M, vshiftop, c', n)*) +;; TODO(1, rossberg): abstract to numerics rule Step_pure/vbitmask: (VCONST V128 c) (VBITMASK (Jnn X M)) ~> (CONST I32 ci) -- if ci_1* = $lanes_(Jnn X M, c) -- if $ibits_(32, ci) = $ilt_($lsize(Jnn), S, ci_1, 0)* -rule Step_pure/vswizzle: - (VCONST V128 c_1) (VCONST V128 c_2) (VSWIZZLE (Pnn X M)) ~> (VCONST V128 c) - -- var c' : iN($lsize(Pnn)) - -- if ci* = $lanes_(Pnn X M, c_2) - -- if c'* = $lanes_(Pnn X M, c_1) 0^(256 - M) - -- if c = $invlanes_(Pnn X M, c'*[$(ci*[k])]^(k (VCONST V128 c) + -- var c' : iN(8) + -- if ci* = $lanes_(I8 X M, c_2) + -- if c'* = $lanes_(I8 X M, c_1) 0^(256 - M) + -- if c = $invlanes_(I8 X M, c'*[$(ci*[k])]^(k (VCONST V128 c) + -- var c' : iN(8) + -- if ci* = $lanes_(I8 X M, c_2) + -- if c'* = $lanes_(I8 X M, c_1) 0^(256 - M) + -- if c = $invlanes_(I8 X M, c'*[$(ci*[k])]^(k (VCONST V128 c) -- var c' : iN($lsize(Pnn)) @@ -769,6 +779,12 @@ rule Step_pure/vextbinop: -- if $vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c +rule Step_pure/vextternop: + (VCONST V128 c_1) (VCONST V128 c_2) (VCONST V128 c_3) (VEXTTERNOP sh_2 sh_1 vextternop) ~> (VCONST V128 c) + -- if $vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c + + +;; TODO(1, rossberg): abstract to numerics rule Step_pure/vnarrow: (VCONST V128 c_1) (VCONST V128 c_2) (VNARROW (Jnn_2 X M_2) (Jnn_1 X M_1) sx) ~> (VCONST V128 c) -- if ci_1* = $lanes_(Jnn_1 X M_1, c_1) @@ -778,6 +794,7 @@ rule Step_pure/vnarrow: -- if c = $invlanes_(Jnn_2 X M_2, cj_1* cj_2*) +;; TODO(1, rossberg): abstract to numerics rule Step_pure/vcvtop-full: (VCONST V128 c_1) (VCVTOP (Lnn_2 X M) (Lnn_1 X M) vcvtop) ~> (VCONST V128 c) -- if ci* = $lanes_(Lnn_1 X M, c_1) diff --git a/spectec/spec/wasm-3.0/A-binary.watsup b/spectec/spec/wasm-3.0/A-binary.watsup index 315db0e69b..f475fa73c5 100644 --- a/spectec/spec/wasm-3.0/A-binary.watsup +++ b/spectec/spec/wasm-3.0/A-binary.watsup @@ -623,7 +623,8 @@ grammar Binstr/vec-const : instr = ... grammar Binstr/vec-shuffle : instr = ... | 0xFD 13:Bu32 (l:Blaneidx)^16 => VSHUFFLE (I8 X `16) l - | 0xFD 14:Bu32 => VSWIZZLE (I8 X `16) + | 0xFD 14:Bu32 => VSWIZZLOP (I8 X `16) SWIZZLE + | 0xFD 256:Bu32 => VSWIZZLOP (I8 X `16) RELAXED_SWIZZLE | ... grammar Binstr/vec-splat : instr = ... @@ -779,6 +780,7 @@ grammar Binstr/vec-un-i16x8 : instr = ... grammar Binstr/vec-bin-i16x8 : instr = ... | 0xFD 130:Bu32 => VBINOP (I16 X `8) (Q15MULR_SAT S) + | 0xFD 273:Bu32 => VBINOP (I16 X `8) (RELAXED_Q15MULR S) | ... grammar Binstr/vec-test-i16x8 : instr = ... @@ -827,6 +829,7 @@ grammar Binstr/vec-extbin-i16x8 : instr = ... | 0xFD 157:Bu32 => VEXTBINOP (I16 X `8) (I8 X `16) (EXTMUL S HIGH) | 0xFD 158:Bu32 => VEXTBINOP (I16 X `8) (I8 X `16) (EXTMUL U LOW) | 0xFD 159:Bu32 => VEXTBINOP (I16 X `8) (I8 X `16) (EXTMUL U HIGH) + | 0xFD 274:Bu32 => VEXTBINOP (I16 X `8) (I8 X `16) (RELAXED_DOT S) | ... grammar Binstr/vec-extun-i32x4 : instr = ... @@ -878,6 +881,10 @@ grammar Binstr/vec-extbin-i32x4 : instr = ... | 0xFD 191:Bu32 => VEXTBINOP (I32 X `4) (I16 X `8) (EXTMUL U HIGH) | ... +grammar Binstr/vec-exttern-i32x4 : instr = ... + | 0xFD 275:Bu32 => VEXTTERNOP (I32 X `4) (I16 X `8) (RELAXED_DOT_ADD S) + | ... + grammar Binstr/vec-un-i64x2 : instr = ... | 0xFD 192:Bu32 => VUNOP (I64 X `2) ABS | 0xFD 193:Bu32 => VUNOP (I64 X `2) NEG @@ -945,6 +952,13 @@ grammar Binstr/vec-bin-f32x4 : instr = ... | 0xFD 233:Bu32 => VBINOP (F32 X `4) MAX | 0xFD 234:Bu32 => VBINOP (F32 X `4) PMIN | 0xFD 235:Bu32 => VBINOP (F32 X `4) PMAX + | 0xFD 269:Bu32 => VBINOP (F32 X `4) RELAXED_MIN + | 0xFD 270:Bu32 => VBINOP (F32 X `4) RELAXED_MAX + | ... + +grammar Binstr/vec-tern-f32x4 : instr = ... + | 0xFD 261:Bu32 => VTERNOP (F32 X `4) RELAXED_MADD + | 0xFD 262:Bu32 => VTERNOP (F32 X `4) RELAXED_NMADD | ... grammar Binstr/vec-un-f64x2 : instr = ... @@ -966,6 +980,13 @@ grammar Binstr/vec-bin-f64x2 : instr = ... | 0xFD 245:Bu32 => VBINOP (F64 X `2) MAX | 0xFD 246:Bu32 => VBINOP (F64 X `2) PMIN | 0xFD 247:Bu32 => VBINOP (F64 X `2) PMAX + | 0xFD 271:Bu32 => VBINOP (F64 X `2) RELAXED_MIN + | 0xFD 272:Bu32 => VBINOP (F64 X `2) RELAXED_MAX + | ... + +grammar Binstr/vec-tern-f64x2 : instr = ... + | 0xFD 263:Bu32 => VTERNOP (F64 X `2) RELAXED_MADD + | 0xFD 264:Bu32 => VTERNOP (F64 X `2) RELAXED_NMADD | ... grammar Binstr/vec-cvt : instr = ... @@ -979,6 +1000,10 @@ grammar Binstr/vec-cvt : instr = ... | 0xFD 253:Bu32 => VCVTOP (I32 X `4) (F64 X `2) (TRUNC_SAT U) ZERO | 0xFD 254:Bu32 => VCVTOP (F64 X `2) (I32 X `4) (CONVERT S) LOW | 0xFD 255:Bu32 => VCVTOP (F64 X `2) (I32 X `4) (CONVERT U) LOW + | 0xFD 257:Bu32 => VCVTOP (I32 X `4) (F32 X `4) (RELAXED_TRUNC S) + | 0xFD 258:Bu32 => VCVTOP (I32 X `4) (F32 X `4) (RELAXED_TRUNC U) + | 0xFD 259:Bu32 => VCVTOP (I32 X `4) (F64 X `2) (RELAXED_TRUNC S) ZERO + | 0xFD 260:Bu32 => VCVTOP (I32 X `4) (F64 X `2) (RELAXED_TRUNC U) ZERO ;; Expressions diff --git a/spectec/src/al/al_util.ml b/spectec/src/al/al_util.ml index 5a591ce3a3..4e0de52fe0 100644 --- a/spectec/src/al/al_util.ml +++ b/spectec/src/al/al_util.ml @@ -140,6 +140,11 @@ let listv_nth l n = | ListV arr_ref -> Array.get !arr_ref n | v -> fail_value "listv_nth" v +let listv_singleton l = + match l with + | ListV arr_ref when Array.length !arr_ref = 1 -> Array.get !arr_ref 0 + | v -> fail_value "listv_singleton" v + let strv_access field = function | StrV r -> Record.find field r | v -> fail_value "strv_access" v diff --git a/spectec/src/backend-interpreter/construct.ml b/spectec/src/backend-interpreter/construct.ml index 023763294f..75e1225bd3 100644 --- a/spectec/src/backend-interpreter/construct.ml +++ b/spectec/src/backend-interpreter/construct.ml @@ -13,8 +13,6 @@ open Util exception WrongConversion of string -let empty = "" - let error category msg = raise (WrongConversion (Printf.sprintf "%s: invalid construction %s" category msg)) @@ -22,6 +20,9 @@ let error_value category v = error category ("`" ^ string_of_value v ^ "`") let error_values category vs = error category ("`[" ^ string_of_values ", " vs ^ "]`") +let error_instr category instr' = + error category ("`" ^ Sexpr.to_string 60 (Arrange.instr (instr' @@ no_region)) ^ "`") + (* Constant *) let default_table_max = 4294967295L @@ -448,11 +449,8 @@ let al_to_int_vbinop : value -> V128Op.ibinop = function | CaseV ("ADD_SAT", [CaseV ("U", [])]) -> V128Op.AddSatU | CaseV ("SUB_SAT", [CaseV ("S", [])]) -> V128Op.SubSatS | CaseV ("SUB_SAT", [CaseV ("U", [])]) -> V128Op.SubSatU - | CaseV ("DOT", []) -> V128Op.DotS - | CaseV ("Q15MULR_SAT", []) -> V128Op.Q15MulRSatS - | CaseV ("SWIZZLE", []) -> V128Op.Swizzle - (*TODO *) - | CaseV ("Shuffle", [ l ]) -> V128Op.Shuffle (al_to_list al_to_int l) + | CaseV ("Q15MULR_SAT", [(*CaseV ("S", [])*)]) -> V128Op.Q15MulRSatS + | CaseV ("RELAXED_Q15MULR", [(*CaseV ("S", [])*)]) -> V128Op.RelaxedQ15MulRS | v -> error_value "integer vbinop" v let al_to_float_vbinop : value -> V128Op.fbinop = function @@ -464,12 +462,30 @@ let al_to_float_vbinop : value -> V128Op.fbinop = function | CaseV ("MAX", []) -> V128Op.Max | CaseV ("PMIN", []) -> V128Op.Pmin | CaseV ("PMAX", []) -> V128Op.Pmax + | CaseV ("RELAXED_MIN", []) -> V128Op.RelaxedMin + | CaseV ("RELAXED_MAX", []) -> V128Op.RelaxedMax | v -> error_value "float vbinop" v let al_to_vbinop : value list -> vec_binop = al_to_vop al_to_int_vbinop al_to_float_vbinop +let al_to_int_vternop : value -> V128Op.iternop = function + | CaseV ("RELAXED_LANESELECT", []) -> V128Op.RelaxedLaneselect + | v -> error_value "integer vternop" v + +let al_to_float_vternop : value -> V128Op.fternop = function + | CaseV ("RELAXED_MADD", []) -> V128Op.RelaxedMadd + | CaseV ("RELAXED_NMADD", []) -> V128Op.RelaxedNmadd + | v -> error_value "float vternop" v + +let al_to_vternop : value list -> vec_ternop = al_to_vop al_to_int_vternop al_to_float_vternop + let al_to_special_vbinop = function - | CaseV ("VSWIZZLE", [ CaseV ("X", [ CaseV ("I8", []); NumV z ]); ]) when z = sixteen -> V128 (V128.I8x16 (V128Op.Swizzle)) + | CaseV ("VSWIZZLOP", [ CaseV ("X", [ CaseV ("I8", []); NumV z ]); op ]) as v when z = sixteen -> + (match op with + | CaseV ("SWIZZLE", []) -> V128 (V128.I8x16 (V128Op.Swizzle)) + | CaseV ("RELAXED_SWIZZLE", []) -> V128 (V128.I8x16 (V128Op.RelaxedSwizzle)) + | _ -> error_value "special vbinop" v) + | CaseV ("VSWIZZLE", [ CaseV ("X", [ CaseV ("I8", []); NumV z ]) ]) when z = sixteen && !version = 2 -> V128 (V128.I8x16 (V128Op.Swizzle)) | CaseV ("VSHUFFLE", [ CaseV ("X", [ CaseV ("I8", []); NumV z ]); l ]) when z = sixteen -> V128 (V128.I8x16 (V128Op.Shuffle (al_to_list al_to_int l))) | CaseV ("VNARROW", [ CaseV ("X", [ CaseV ("I8", []); NumV z1 ]); CaseV ("X", [ CaseV ("I16", []); NumV z2 ]); CaseV ("S", []) ]) when z1 = sixteen && z2 = eight -> V128 (V128.I8x16 (V128Op.NarrowS)) | CaseV ("VNARROW", [ CaseV ("X", [ CaseV ("I16", []); NumV z1 ]); CaseV ("X", [ CaseV ("I32", []); NumV z2 ]); CaseV ("S", []) ]) when z1 = eight && z2 = four -> V128 (V128.I16x8 (V128Op.NarrowS)) @@ -482,16 +498,29 @@ let al_to_special_vbinop = function | CaseV ("EXTMUL", [CaseV ("U", []); CaseV ("HIGH", [])]) -> V128Op.ExtMulHighU | CaseV ("EXTMUL", [CaseV ("S", []); CaseV ("LOW", [])]) -> V128Op.ExtMulLowS | CaseV ("EXTMUL", [CaseV ("U", []); CaseV ("LOW", [])]) -> V128Op.ExtMulLowU - | CaseV ("DOT", []) -> V128Op.DotS - | _ -> error_value "special vbinop" v + | CaseV ("DOT", [(*CaseV ("S", [])*)]) -> V128Op.DotS + | CaseV ("RELAXED_DOT", [(*CaseV ("S", [])*)]) -> V128Op.RelaxedDot + | _ -> error_value "special vextbinop operator" ext in (match c1, c2 with | CaseV ("X", [ CaseV ("I16", []); NumV z1 ]), CaseV ("X", [ CaseV ("I8", []); NumV z2 ]) when z1 = eight && z2 = sixteen -> V128 (V128.I16x8 ext') | CaseV ("X", [ CaseV ("I32", []); NumV z1 ]), CaseV ("X", [ CaseV ("I16", []); NumV z2 ]) when z1 = four && z2 = eight -> V128 (V128.I32x4 ext') | CaseV ("X", [ CaseV ("I64", []); NumV z1 ]), CaseV ("X", [ CaseV ("I32", []); NumV z2 ]) when z1 = two && z2 = four -> V128 (V128.I64x2 ext') - | _ -> error_value "special vbinop" v) + | _ -> error_value "special vextbinop shapes" v) | v -> error_value "special vbinop" v +let al_to_special_vternop = function + | CaseV ("VEXTTERNOP", [ c1; c2; ext ]) as v -> + let ext' = + match ext with + | CaseV ("RELAXED_DOT_ADD", [(*CaseV ("S", [])*)]) -> V128Op.RelaxedDotAdd + | _ -> error_value "special vextternop operator" ext + in + (match c1, c2 with + | CaseV ("X", [ CaseV ("I32", []); NumV z1 ]), CaseV ("X", [ CaseV ("I8", []); NumV z2 ]) when z1 = four && z2 = sixteen -> V128 (V128.I32x4 ext') + | _ -> error_value "special vextternop shapes" v) + | v -> error_value "special vternop" v + let al_to_int_vcvtop : value list -> V128Op.icvtop = function | [ sh; CaseV (op, [CaseV (ext, [])]); OptV half; OptV _zero ] as l -> ( match op with @@ -511,6 +540,14 @@ let al_to_int_vcvtop : value list -> V128Op.icvtop = function | CaseV ("X", [ CaseV ("F64", []); NumV z ]), "U" when z = two -> V128Op.TruncSatUZeroF64x2 | _ -> error_values "integer vcvtop" l ) + | "RELAXED_TRUNC" -> ( + match sh, ext with + | CaseV ("X", [ CaseV ("F32", []); NumV z ]), "S" when z = four -> V128Op.RelaxedTruncSF32x4 + | CaseV ("X", [ CaseV ("F32", []); NumV z ]), "U" when z = four -> V128Op.RelaxedTruncUF32x4 + | CaseV ("X", [ CaseV ("F64", []); NumV z ]), "S" when z = two -> V128Op.RelaxedTruncSZeroF64x2 + | CaseV ("X", [ CaseV ("F64", []); NumV z ]), "U" when z = two -> V128Op.RelaxedTruncUZeroF64x2 + | _ -> error_values "integer vcvtop" l + ) | _ -> error_values "integer vcvtop" l ) | l -> error_values "integer vcvtop" l @@ -768,7 +805,9 @@ and al_to_instr': value -> Ast.instr' = function | CaseV ("VRELOP", vop) -> VecCompare (al_to_vrelop vop) | CaseV ("VUNOP", vop) -> VecUnary (al_to_vunop vop) | CaseV ("VBINOP", vop) -> VecBinary (al_to_vbinop vop) - | CaseV (("VSWIZZLE" | "VSHUFFLE" | "VNARROW" | "VEXTBINOP"), _) as v -> VecBinary (al_to_special_vbinop v) + | CaseV ("VTERNOP", vop) -> VecTernary (al_to_vternop vop) + | CaseV (("VSWIZZLOP" | "VSWIZZLE" | "VSHUFFLE" | "VNARROW" | "VEXTBINOP"), _) as v -> VecBinary (al_to_special_vbinop v) + | CaseV ("VEXTTERNOP", _) as v -> VecTernary (al_to_special_vternop v) | CaseV ("VCVTOP", vop) -> VecConvert (al_to_vcvtop vop) | CaseV ("VEXTUNOP", vop) -> VecConvert (al_to_special_vcvtop vop) | CaseV ("VSHIFTOP", vop) -> VecShift (al_to_vshiftop vop) @@ -1461,6 +1500,17 @@ let al_of_vop f1 f2 = function | V128.F64x2 op -> [ CaseV ("X", [ nullary "F64"; numV two ]); f2 op ] ) +let al_of_vop_opt f1 f2 = function + | V128 vop -> ( + match vop with + | V128.I8x16 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I8"; numV sixteen ]); v ]) (f1 op) + | V128.I16x8 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I16"; numV eight ]); v ]) (f1 op) + | V128.I32x4 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I32"; numV four ]); v ]) (f1 op) + | V128.I64x2 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I64"; numV two ]); v ]) (f1 op) + | V128.F32x4 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "F32"; numV four ]); v ]) (f2 op) + | V128.F64x2 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "F64"; numV two ]); v ]) (f2 op) + ) + let al_of_viop f1: ('a, 'a, 'a, 'a, void, void) V128.laneop vecop -> value list = function | V128 vop -> ( @@ -1473,13 +1523,13 @@ let al_of_viop f1: ) let al_of_vbitmaskop = function - | V128 vop -> ( + | V128 (vop : V128Op.bitmaskop) -> ( match vop with | V128.I8x16 _ -> [ CaseV ("X", [ nullary "I8"; numV sixteen ]) ] | V128.I16x8 _ -> [ CaseV ("X", [ nullary "I16"; numV eight ]) ] | V128.I32x4 _ -> [ CaseV ("X", [ nullary "I32"; numV four ]) ] | V128.I64x2 _ -> [ CaseV ("X", [ nullary "I64"; numV two ]) ] - | _ -> error "al_of_vbitmaskop" empty + | _ -> . ) let al_of_int_vtestop : V128Op.itestop -> value = function @@ -1528,7 +1578,7 @@ let al_of_float_vunop : V128Op.funop -> value = function let al_of_vunop = al_of_vop al_of_int_vunop al_of_float_vunop -let al_of_int_vbinop : V128Op.ibinop -> value option = function +let al_of_int_vbinop_opt : V128Op.ibinop -> value option = function | V128Op.Add -> Some (nullary "ADD") | V128Op.Sub -> Some (nullary "SUB") | V128Op.Mul -> Some (nullary "MUL") @@ -1541,32 +1591,38 @@ let al_of_int_vbinop : V128Op.ibinop -> value option = function | V128Op.AddSatU -> Some (caseV ("ADD_SAT", [nullary "U"])) | V128Op.SubSatS -> Some (caseV ("SUB_SAT", [nullary "S"])) | V128Op.SubSatU -> Some (caseV ("SUB_SAT", [nullary "U"])) - | V128Op.Q15MulRSatS -> Some (nullary "Q15MULR_SAT") + | V128Op.Q15MulRSatS -> Some (caseV ("Q15MULR_SAT", [(*nullary "S"*)])) + | V128Op.RelaxedQ15MulRS -> Some (caseV ("RELAXED_Q15MULR", [(*nullary "S"*)])) | _ -> None -let al_of_float_vbinop : V128Op.fbinop -> value = function - | V128Op.Add -> nullary "ADD" - | V128Op.Sub -> nullary "SUB" - | V128Op.Mul -> nullary "MUL" - | V128Op.Div -> nullary "DIV" - | V128Op.Min -> nullary "MIN" - | V128Op.Max -> nullary "MAX" - | V128Op.Pmin -> nullary "PMIN" - | V128Op.Pmax -> nullary "PMAX" - -let al_of_vbinop = function - | V128 vop -> ( - match vop with - | V128.I8x16 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I8"; numV sixteen ]); v ]) (al_of_int_vbinop op) - | V128.I16x8 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I16"; numV eight ]); v ]) (al_of_int_vbinop op) - | V128.I32x4 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I32"; numV four ]); v ]) (al_of_int_vbinop op) - | V128.I64x2 op -> Option.map (fun v -> [ CaseV ("X", [ nullary "I64"; numV two ]); v ]) (al_of_int_vbinop op) - | V128.F32x4 op -> Some ([ CaseV ("X", [ nullary "F32"; numV four ]); al_of_float_vbinop op ]) - | V128.F64x2 op -> Some ([ CaseV ("X", [ nullary "F64"; numV two ]); al_of_float_vbinop op ]) - ) +let al_of_float_vbinop_opt : V128Op.fbinop -> value option = function + | V128Op.Add -> Some (nullary "ADD") + | V128Op.Sub -> Some (nullary "SUB") + | V128Op.Mul -> Some (nullary "MUL") + | V128Op.Div -> Some (nullary "DIV") + | V128Op.Min -> Some (nullary "MIN") + | V128Op.Max -> Some (nullary "MAX") + | V128Op.Pmin -> Some (nullary "PMIN") + | V128Op.Pmax -> Some (nullary "PMAX") + | V128Op.RelaxedMin -> Some (nullary "RELAXED_MIN") + | V128Op.RelaxedMax -> Some (nullary "RELAXED_MAX") + +let al_of_vbinop_opt = al_of_vop_opt al_of_int_vbinop_opt al_of_float_vbinop_opt + +let al_of_int_vternop_opt : V128Op.iternop -> value option = function + | V128Op.RelaxedLaneselect -> Some (nullary "RELAXED_LANESELECT") + | _ -> None + +let al_of_float_vternop_opt : V128Op.fternop -> value option = function + | V128Op.RelaxedMadd -> Some (nullary "RELAXED_MADD") + | V128Op.RelaxedNmadd -> Some (nullary "RELAXED_NMADD") + +let al_of_vternop_opt = al_of_vop_opt al_of_int_vternop_opt al_of_float_vternop_opt let al_of_special_vbinop = function - | V128 (V128.I8x16 (V128Op.Swizzle)) -> CaseV ("VSWIZZLE", [ CaseV ("X", [ nullary "I8"; numV sixteen ]); ]) + | V128 (V128.I8x16 (V128Op.Swizzle)) when !version = 2 -> CaseV ("VSWIZZLE", [ CaseV ("X", [ nullary "I8"; numV sixteen ]); ]) + | V128 (V128.I8x16 (V128Op.Swizzle)) -> CaseV ("VSWIZZLOP", [ CaseV ("X", [ nullary "I8"; numV sixteen ]); nullary "SWIZZLE" ]) + | V128 (V128.I8x16 (V128Op.RelaxedSwizzle)) -> CaseV ("VSWIZZLOP", [ CaseV ("X", [ nullary "I8"; numV sixteen ]); nullary "RELAXED_SWIZZLE" ]) | V128 (V128.I8x16 (V128Op.Shuffle l)) -> CaseV ("VSHUFFLE", [ CaseV ("X", [ nullary "I8"; numV sixteen ]); al_of_list al_of_int l ]) | V128 (V128.I8x16 (V128Op.NarrowS)) -> CaseV ("VNARROW", [ CaseV ("X", [ nullary "I8"; numV sixteen ]); CaseV ("X", [ nullary "I16"; numV eight ]); al_of_extension Pack.SX ]) | V128 (V128.I16x8 (V128Op.NarrowS)) -> CaseV ("VNARROW", [ CaseV ("X", [ nullary "I16"; numV eight ]); CaseV ("X", [ nullary "I32"; numV four ]); al_of_extension Pack.SX ]) @@ -1584,10 +1640,15 @@ let al_of_special_vbinop = function | V128 (V128.I64x2 (V128Op.ExtMulHighU)) -> CaseV ("VEXTBINOP", [ CaseV ("X", [ nullary "I64"; numV two ]); CaseV ("X", [ nullary "I32"; numV four ]); caseV ("EXTMUL", [al_of_extension Pack.ZX; nullary "HIGH"]) ]) | V128 (V128.I64x2 (V128Op.ExtMulLowS)) -> CaseV ("VEXTBINOP", [ CaseV ("X", [ nullary "I64"; numV two ]); CaseV ("X", [ nullary "I32"; numV four ]); caseV ("EXTMUL", [al_of_extension Pack.SX; nullary "LOW"]) ]) | V128 (V128.I64x2 (V128Op.ExtMulLowU)) -> CaseV ("VEXTBINOP", [ CaseV ("X", [ nullary "I64"; numV two ]); CaseV ("X", [ nullary "I32"; numV four ]); caseV ("EXTMUL", [al_of_extension Pack.ZX; nullary "LOW"]) ] ) - | V128 (V128.I32x4 (V128Op.DotS)) -> CaseV ("VEXTBINOP", [ CaseV ("X", [ nullary "I32"; numV four ]); CaseV ("X", [ nullary "I16"; numV eight ]); nullary "DOT" ]) - | _ -> error "al_of_special_vbinop" empty + | V128 (V128.I32x4 (V128Op.DotS)) -> CaseV ("VEXTBINOP", [ CaseV ("X", [ nullary "I32"; numV four ]); CaseV ("X", [ nullary "I16"; numV eight ]); caseV ("DOT", [(*al_of_extension Pack.SX*)]) ]) + | V128 (V128.I16x8 (V128Op.RelaxedDot)) -> CaseV ("VEXTBINOP", [ CaseV ("X", [ nullary "I16"; numV eight ]); CaseV ("X", [ nullary "I8"; numV sixteen ]); caseV ("RELAXED_DOT", [(*al_of_extension Pack.SX*)]) ]) + | vop -> error_instr "al_of_special_vbinop" (VecBinary vop) + +let al_of_special_vternop = function + | V128 (V128.I32x4 V128Op.RelaxedDotAdd) -> CaseV ("VEXTTERNOP", [ CaseV ("X", [ nullary "I32"; numV four ]); CaseV ("X", [ nullary "I8"; numV sixteen ]); caseV ("RELAXED_DOT_ADD", [(*al_of_extension Pack.SX*)]) ]) + | vop -> error_instr "al_of_special_vternop" (VecTernary vop) -let al_of_int_vcvtop = function +let al_of_int_vcvtop_opt = function | V128Op.ExtendLowS -> Some (None, caseV ("EXTEND", [nullary "S"]), Some (nullary "LOW"), None) | V128Op.ExtendLowU -> Some (None, caseV ("EXTEND", [nullary "U"]), Some (nullary "LOW"), None) | V128Op.ExtendHighS -> Some (None, caseV ("EXTEND", [nullary "S"]), Some (nullary "HIGH"), None) @@ -1596,32 +1657,36 @@ let al_of_int_vcvtop = function | V128Op.TruncSatUF32x4 -> Some (Some (CaseV ("X", [ nullary "F32"; numV four ])), caseV ("TRUNC_SAT", [nullary "U"]), None, None) | V128Op.TruncSatSZeroF64x2 -> Some (Some (CaseV ("X", [ nullary "F64"; numV two ])), caseV ("TRUNC_SAT", [nullary "S"]), None, Some (nullary "ZERO")) | V128Op.TruncSatUZeroF64x2 -> Some (Some (CaseV ("X", [ nullary "F64"; numV two ])), caseV ("TRUNC_SAT", [nullary "U"]), None, Some (nullary "ZERO")) + | V128Op.RelaxedTruncSF32x4 -> Some (Some (CaseV ("X", [ nullary "F32"; numV four ])), caseV ("RELAXED_TRUNC", [nullary "S"]), None, None) + | V128Op.RelaxedTruncUF32x4 -> Some (Some (CaseV ("X", [ nullary "F32"; numV four ])), caseV ("RELAXED_TRUNC", [nullary "U"]), None, None) + | V128Op.RelaxedTruncSZeroF64x2 -> Some (Some (CaseV ("X", [ nullary "F64"; numV two ])), caseV ("RELAXED_TRUNC", [nullary "S"]), None, Some (nullary "ZERO")) + | V128Op.RelaxedTruncUZeroF64x2 -> Some (Some (CaseV ("X", [ nullary "F64"; numV two ])), caseV ("RELAXED_TRUNC", [nullary "U"]), None, Some (nullary "ZERO")) | _ -> None -let al_of_float32_vcvtop = function +let al_of_float32_vcvtop_opt = function | V128Op.DemoteZeroF64x2 -> Some (Some (CaseV ("X", [ nullary "F64"; numV two ])), nullary "DEMOTE", None, Some (nullary "ZERO")) | V128Op.ConvertSI32x4 -> Some (Some (CaseV ("X", [ nullary "I32"; numV four ])), caseV ("CONVERT", [nullary "S"]), None, None) | V128Op.ConvertUI32x4 -> Some (Some (CaseV ("X", [ nullary "I32"; numV four ])), caseV ("CONVERT", [nullary "U"]), None, None) | _ -> None -let al_of_float64_vcvtop = function +let al_of_float64_vcvtop_opt = function | V128Op.PromoteLowF32x4 -> Some (Some (CaseV ("X", [ nullary "F32"; numV four ])), nullary "PROMOTE", Some (nullary "LOW"), None) | V128Op.ConvertSI32x4 -> Some (Some (CaseV ("X", [ nullary "I32"; numV four ])), caseV ("CONVERT", [nullary "S"]), Some (nullary "LOW"), None) | V128Op.ConvertUI32x4 -> Some (Some (CaseV ("X", [ nullary "I32"; numV four ])), caseV ("CONVERT", [nullary "U"]), Some (nullary "LOW"), None) | _ -> None -let al_of_vcvtop = function +let al_of_vcvtop_opt = function | V128 vop -> ( match vop with | V128.I8x16 op -> ( Option.map (fun (to_, op', half, zero) -> let sh = match to_ with Some sh -> sh | None -> ( match half with - | Some _ -> error "al_of_vcvtop" empty + | Some _ -> error_instr "al_of_vcvtop" (VecConvert (V128 vop)) | None -> CaseV ("X", [ nullary "I8"; numV sixteen ]) ) in [ CaseV ("X", [ nullary "I8"; numV sixteen ]); sh; op'; optV half; optV zero ] - ) (al_of_int_vcvtop op) + ) (al_of_int_vcvtop_opt op) ) | V128.I16x8 op -> ( Option.map (fun (to_, op', half, zero) -> @@ -1631,7 +1696,7 @@ let al_of_vcvtop = function | None -> CaseV ("X", [ nullary "I16"; numV eight ]) ) in [ CaseV ("X", [ nullary "I16"; numV eight ]); sh; op'; optV half; optV zero ] - ) (al_of_int_vcvtop op) + ) (al_of_int_vcvtop_opt op) ) | V128.I32x4 op -> ( Option.map (fun (to_, op', half, zero) -> @@ -1641,7 +1706,7 @@ let al_of_vcvtop = function | None -> CaseV ("X", [ nullary "I32"; numV four ]) ) in [ CaseV ("X", [ nullary "I32"; numV four ]); sh; op'; optV half; optV zero ] - ) (al_of_int_vcvtop op) + ) (al_of_int_vcvtop_opt op) ) | V128.I64x2 op -> ( Option.map (fun (to_, op', half, zero) -> @@ -1651,17 +1716,17 @@ let al_of_vcvtop = function | None -> CaseV ("X", [ nullary "I64"; numV two ]) ) in [ CaseV ("X", [ nullary "I64"; numV two ]); sh; op'; optV half; optV zero ] - ) (al_of_int_vcvtop op) + ) (al_of_int_vcvtop_opt op) ) | V128.F32x4 op -> ( Option.map (fun (to_, op', half, zero) -> let sh = match to_ with Some sh -> sh | None -> ( match half with - | Some _ -> error "al_of_vcvtop" empty + | Some _ -> error_instr "al_of_vcvtop" (VecConvert (V128 vop)) | None -> CaseV ("X", [ nullary "F32"; numV four ]) ) in [ CaseV ("X", [ nullary "F32"; numV four ]); sh; op'; optV half; optV zero ] - ) (al_of_float32_vcvtop op) + ) (al_of_float32_vcvtop_opt op) ) | V128.F64x2 op -> ( Option.map (fun (to_, op', half, zero) -> @@ -1671,7 +1736,7 @@ let al_of_vcvtop = function | None -> CaseV ("X", [ nullary "F64"; numV two ]) ) in [ CaseV ("X", [ nullary "F64"; numV two ]); sh; op'; optV half; optV zero ] - ) (al_of_float64_vcvtop op) + ) (al_of_float64_vcvtop_opt op) ) ) @@ -1681,7 +1746,7 @@ let al_of_special_vcvtop = function | V128 (V128.I16x8 (V128Op.ExtAddPairwiseU)) -> CaseV ("VEXTUNOP", [ CaseV ("X", [ nullary "I16"; numV eight]); CaseV ("X", [ nullary "I8"; numV sixteen ]); caseV ("EXTADD_PAIRWISE", [al_of_extension Pack.ZX]) ]) | V128 (V128.I32x4 (V128Op.ExtAddPairwiseS)) -> CaseV ("VEXTUNOP", [ CaseV ("X", [ nullary "I32"; numV four]); CaseV ("X", [ nullary "I16"; numV eight ]); caseV ("EXTADD_PAIRWISE", [al_of_extension Pack.SX]) ]) | V128 (V128.I32x4 (V128Op.ExtAddPairwiseU)) -> CaseV ("VEXTUNOP", [ CaseV ("X", [ nullary "I32"; numV four]); CaseV ("X", [ nullary "I16"; numV eight ]); caseV ("EXTADD_PAIRWISE", [al_of_extension Pack.ZX]) ]) - | _ -> error "al_of_special_vcvtop" empty + | vop -> error_instr "al_of_special_vcvtop" (VecConvert vop) let al_of_int_vshiftop : V128Op.ishiftop -> value = function | V128Op.Shl -> nullary "SHL" @@ -1867,8 +1932,9 @@ let rec al_of_instr instr = | VecTest vop -> CaseV ("VTESTOP", al_of_vtestop vop) | VecCompare vop -> CaseV ("VRELOP", al_of_vrelop vop) | VecUnary vop -> CaseV ("VUNOP", al_of_vunop vop) - | VecBinary vop -> (match al_of_vbinop vop with Some l -> CaseV ("VBINOP", l) | None -> al_of_special_vbinop vop) - | VecConvert vop -> (match al_of_vcvtop vop with Some l -> CaseV ("VCVTOP", l) | None -> al_of_special_vcvtop vop) + | VecBinary vop -> (match al_of_vbinop_opt vop with Some l -> CaseV ("VBINOP", l) | None -> al_of_special_vbinop vop) + | VecTernary vop -> (match al_of_vternop_opt vop with Some l -> CaseV ("VTERNOP", l) | None -> al_of_special_vternop vop) + | VecConvert vop -> (match al_of_vcvtop_opt vop with Some l -> CaseV ("VCVTOP", l) | None -> al_of_special_vcvtop vop) | VecShift vop -> CaseV ("VSHIFTOP", al_of_vshiftop vop) | VecBitmask vop -> CaseV ("VBITMASK", al_of_vbitmaskop vop) | VecTestBits vop -> CaseV ("VVTESTOP", al_of_vvtestop vop) diff --git a/spectec/src/backend-interpreter/exception.ml b/spectec/src/backend-interpreter/exception.ml index 7fd6f3e948..b884a61d4c 100644 --- a/spectec/src/backend-interpreter/exception.ml +++ b/spectec/src/backend-interpreter/exception.ml @@ -1,4 +1,4 @@ -exception Invalid +exception Invalid of exn * Printexc.raw_backtrace exception Trap exception Throw exception OutOfMemory diff --git a/spectec/src/backend-interpreter/manual.ml b/spectec/src/backend-interpreter/manual.ml index 1d78f20486..b147b1dc77 100644 --- a/spectec/src/backend-interpreter/manual.ml +++ b/spectec/src/backend-interpreter/manual.ml @@ -109,7 +109,7 @@ let module_ok = function in CaseV ("->", [ externtypes; externidxs ]) - with _ -> raise Exception.Invalid + with exn -> raise (Exception.Invalid (exn, Printexc.get_raw_backtrace ())) ) | vs -> Numerics.error_values "$Module_ok" vs @@ -129,7 +129,7 @@ let externaddr_type = function in let extern_type = Construct.al_to_extern_type t in boolV (Match.match_extern_type [] externaddr_type extern_type) - with _ -> raise Exception.Invalid) + with exn -> raise (Exception.Invalid (exn, Printexc.get_raw_backtrace ()))) | vs -> Numerics.error_values "$Externaddr_type" vs let val_type = function @@ -138,7 +138,7 @@ let val_type = function let val_type = Construct.al_to_val_type t in (try boolV (Match.match_val_type [] (Value.type_of_value value) val_type) - with _ -> raise Exception.Invalid) + with exn -> raise (Exception.Invalid (exn, Printexc.get_raw_backtrace ()))) | vs -> Numerics.error_values "$Val_type" vs let manual_map = diff --git a/spectec/src/backend-interpreter/numerics.ml b/spectec/src/backend-interpreter/numerics.ml index 7dd7fa4c7d..bfc152f5d0 100644 --- a/spectec/src/backend-interpreter/numerics.ml +++ b/spectec/src/backend-interpreter/numerics.ml @@ -40,6 +40,44 @@ let catch_ixx_exception f = try f() |> someV with | Ixx.Overflow | Ixx.InvalidConversion -> noneV +let list_f f x = f x |> singleton +let unlist_f f x = f x |> listv_singleton + + +let profile name b : numerics = + { + name; + f = + (function + | [] -> al_of_bool b + | vs -> error_values name vs + ) + } + +let profile_nd = profile "ND" false + + +let relaxed name i : numerics = + { + name; + f = + (function + | [] -> al_of_int i + | vs -> error_values name vs + ) + } + +let r_fmadd = relaxed "R_fmadd" 0 +let r_fmin = relaxed "R_fmin" 0 +let r_fmax = relaxed "R_fmax" 0 +let r_idot = relaxed "R_idot" 0 +let r_iq15mulr = relaxed "R_iq15mulr" 0 +let r_trunc_u = relaxed "R_trunc_u" 0 +let r_trunc_s = relaxed "R_trunc_s" 0 +let r_swizzle = relaxed "R_swizzle" 0 +let r_laneselect = relaxed "R_laneselect" 0 + + let signed : numerics = { name = "signed"; @@ -311,6 +349,15 @@ let ieqz : numerics = | vs -> error_values "ieqz" vs ); } +let inez : numerics = + { + name = "inez"; + f = + (function + | [ NumV _; NumV m ] -> m <> Z.zero |> al_of_bool + | vs -> error_values "inez" vs + ); + } let ieq : numerics = { name = "ieq"; @@ -391,6 +438,16 @@ let ibitselect : numerics = | vs -> error_values "ibitselect" vs ); } +let irelaxed_laneselect : numerics = + { + name = "irelaxed_laneselect"; + f = list_f + (function + | [ NumV _ as z; NumV _ as n1; NumV _ as n2; NumV _ as n3 ] -> + ibitselect.f [ z; n1; n2; n3 ] (* use deterministic behaviour *) + | vs -> error_values "irelaxed_laneselect" vs + ); + } let iabs : numerics = { name = "iabs"; @@ -480,8 +537,17 @@ let iq15mulr_sat : numerics = | vs -> error_values "iq15mulr_sat" vs ); } +let irelaxed_q15mulr : numerics = + { + name = "irelaxed_q15mulr"; + f = list_f + (function + | [ NumV _ as z; sx; NumV _ as m; NumV _ as n ] -> + iq15mulr_sat.f [z; sx; m; n] (* use deterministic behaviour *) + | vs -> error_values "irelaxed_q15mulr" vs + ); + } -let list_f f x = f x |> singleton let fadd : numerics = { name = "fadd"; @@ -742,6 +808,47 @@ let fpmax : numerics = | vs -> error_values "fpmax" vs ); } +let frelaxed_min : numerics = + { + name = "frelaxed_min"; + f = + (function + | [ NumV _ as z; CaseV _ as f1; CaseV _ as f2; ] -> + fmin.f [ z; f1; f2 ] (* use deterministic behaviour *) + | vs -> error_values "frelaxed_min" vs + ); + } +let frelaxed_max : numerics = + { + name = "frelaxed_max"; + f = + (function + | [ NumV _ as z; CaseV _ as f1; CaseV _ as f2; ] -> + fmax.f [ z; f1; f2 ] (* use deterministic behaviour *) + | vs -> error_values "frelaxed_max" vs + ); + } + +let frelaxed_madd : numerics = + { + name = "frelaxed_madd"; + f = + (function + | [ NumV _ as z; CaseV _ as f1; CaseV _ as f2; CaseV _ as f3 ] -> + fadd.f [ z; unlist_f fmul.f [ z; f1; f2 ]; f3 ] (* use deterministic behaviour *) + | vs -> error_values "frelaxed_madd" vs + ); + } +let frelaxed_nmadd : numerics = + { + name = "frelaxed_nmadd"; + f = + (function + | [ NumV _ as z; CaseV _ as f1; CaseV _ as f2; CaseV _ as f3 ] -> + frelaxed_madd.f [ z; unlist_f fneg.f [ z; f1 ]; f2; f3 ] (* use deterministic behaviour *) + | vs -> error_values "frelaxed_nmadd" vs + ); + } let extend : numerics = { @@ -806,6 +913,17 @@ let trunc_sat : numerics = ); } +let relaxed_trunc : numerics = + { + name = "relaxed_trunc"; + f = + (function + | [ NumV _ as m; NumV _ as n; sx; CaseV _ as i ] -> + trunc_sat.f [m; n; sx; i] (* use deterministic behaviour *) + | vs -> error_values "relaxed_trunc" vs + ); + } + let promote : numerics = { name = "promote"; @@ -1148,6 +1266,16 @@ let inverse_of_concatn : numerics = } let numerics_list : numerics list = [ + profile_nd; + r_fmadd; + r_fmin; + r_fmax; + r_idot; + r_iq15mulr; + r_trunc_u; + r_trunc_s; + r_swizzle; + r_laneselect; ibytes; inverse_of_ibytes; nbytes; @@ -1181,6 +1309,7 @@ let numerics_list : numerics list = [ ictz; ipopcnt; ieqz; + inez; ieq; ine; ilt; @@ -1188,6 +1317,7 @@ let numerics_list : numerics list = [ ile; ige; ibitselect; + irelaxed_laneselect; iabs; ineg; imin; @@ -1196,6 +1326,7 @@ let numerics_list : numerics list = [ isub_sat; iavgr; iq15mulr_sat; + irelaxed_q15mulr; fadd; fsub; fmul; @@ -1218,10 +1349,15 @@ let numerics_list : numerics list = [ fge; fpmin; fpmax; + frelaxed_min; + frelaxed_max; + frelaxed_madd; + frelaxed_nmadd; extend; wrap; trunc; trunc_sat; + relaxed_trunc; narrow; promote; demote; diff --git a/spectec/src/backend-interpreter/runner.ml b/spectec/src/backend-interpreter/runner.ml index 794a085e0e..17f2b5e42c 100644 --- a/spectec/src/backend-interpreter/runner.ml +++ b/spectec/src/backend-interpreter/runner.ml @@ -10,7 +10,7 @@ open Ds (* Errors *) module Assert = Reference_interpreter.Error.Make () -let error_interpret at msg = Error.error at "interpreter" msg +let _error_interpret at msg = Error.error at "interpreter" msg (* Logging *) @@ -59,10 +59,17 @@ let try_run runner target = runner target with | Exception.Error (at, msg, step) -> - let msg' = msg ^ " (interpreting " ^ step ^ ")" in - error_interpret at msg' + let msg' = msg ^ " (interpreting " ^ step ^ " at " ^ Source.string_of_region at ^ ")" in + (* error_interpret at msg' *) + prerr_endline msg'; + fail + | Exception.Invalid (e, _) -> + let msg = "validation failure (" ^ Printexc.to_string e ^ ")" in + prerr_endline msg; + fail | e -> - prerr_endline (Printexc.to_string e); fail + prerr_endline (Printexc.to_string e); + fail in result, Sys.time () -. start_time @@ -105,7 +112,7 @@ let get_export_addr name modulename = |> args_of_casev in try List.hd vl with Failure _ -> - failwith ("Function export doesn't contains function address") + failwith ("Function export doesn't contain function address") (** Main functions **) @@ -131,7 +138,7 @@ let instantiate module_ = log "[Instantiating module...]\n"; match al_of_module module_, List.map get_externaddr module_.it.imports with - | exception _ -> raise Exception.Invalid + | exception exn -> raise (Exception.Invalid (exn, Printexc.get_raw_backtrace ())) | al_module, externaddrs -> Interpreter.instantiate [ al_module; listV_of_list externaddrs ] @@ -155,7 +162,7 @@ let test_assertion assertion = match assertion.it with | AssertReturn (action, expected) -> let result = run_action action |> al_to_list al_to_value in - Run.assert_result no_region result expected; + Run.assert_results no_region result expected; success | AssertTrap (action, re) -> ( try @@ -178,14 +185,14 @@ let test_assertion assertion = ) | AssertInvalid (def, re) when !Construct.version = 3 -> (match def |> module_of_def |> instantiate |> ignore with - | exception Exception.Invalid -> success + | exception Exception.Invalid _ -> success | _ -> Run.assert_message assertion.at "validation" "module instance" re; fail ) | AssertInvalidCustom (def, re) when !Construct.version = 3 -> (match def |> module_of_def |> instantiate |> ignore with - | exception Exception.Invalid -> success + | exception Exception.Invalid _ -> success | _ -> Run.assert_message assertion.at "validation" "module instance" re; fail @@ -221,9 +228,17 @@ let run_command command = run_command' command with | Exception.Error (at, msg, step) -> - let msg' = msg ^ " (interpreting " ^ step ^ ")" in + let msg' = msg ^ " (interpreting " ^ step ^ " at " ^ Source.string_of_region at ^ ")" in command.at |> string_of_region |> print_endline; - error_interpret at msg' + (* error_interpret at msg' *) + print_endline ("- Test failed at " ^ string_of_region command.at ^ + " (" ^ msg' ^ ")"); + fail + | Exception.Invalid (e, backtrace) -> + print_endline ("- Test failed at " ^ string_of_region command.at ^ + " (" ^ Printexc.to_string e ^ ")"); + Printexc.print_raw_backtrace stdout backtrace; + fail | e -> print_endline ("- Test failed at " ^ string_of_region command.at ^ " (" ^ Printexc.to_string e ^ ")"); diff --git a/spectec/src/frontend/elab.ml b/spectec/src/frontend/elab.ml index c53ffba267..fc5b7168e4 100644 --- a/spectec/src/frontend/elab.ml +++ b/spectec/src/frontend/elab.ml @@ -1025,10 +1025,16 @@ and infer_exp' env e : Il.exp' * typ = let ps, t, _ = find "definition" env.defs id in let as', s = elab_args `Rhs env as_ ps e.at in Il.CallE (id, as'), Subst.subst_typ s t + | EpsE -> error e.at "cannot infer type of empty sequence" | SeqE [] -> (* empty tuples *) Il.TupE [], TupT [] $ e.at - | EpsE -> error e.at "cannot infer type of empty sequence" - | SeqE _ -> error e.at "cannot infer type of expression sequence" + | SeqE es -> + let es', ts = List.split (List.map (infer_exp env) es) in + let t = List.hd ts in + if List.for_all (equiv_typ env t) (List.tl ts) then + Il.ListE es', IterT (t, List) $ e.at + else + error e.at "cannot infer type of expression sequence" | InfixE _ -> error e.at "cannot infer type of infix expression" | BrackE _ -> error e.at "cannot infer type of bracket expression" | IterE (e1, iter) -> diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 1cb93e9b34..a98ccd4b67 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -59,6 +59,17 @@ def $sum(nat*) : nat def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) } +;; 0-aux.watsup +rec { + +;; 0-aux.watsup:37.1-37.57 +def $prod(nat*) : nat + ;; 0-aux.watsup:38.1-38.19 + def $prod([]) = 1 + ;; 0-aux.watsup:39.1-39.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + ;; 0-aux.watsup def $opt_(syntax X, X*) : X? ;; 0-aux.watsup @@ -76,47 +87,47 @@ def $list_(syntax X, X?) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:49.1-49.55 +;; 0-aux.watsup:53.1-53.55 def $concat_(syntax X, X**) : X* - ;; 0-aux.watsup:50.1-50.34 + ;; 0-aux.watsup:54.1-54.34 def $concat_{syntax X}(syntax X, []) = [] - ;; 0-aux.watsup:51.1-51.64 + ;; 0-aux.watsup:55.1-55.64 def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:53.1-53.61 +;; 0-aux.watsup:57.1-57.61 def $concatn_(syntax X, X**, nat : nat) : X* - ;; 0-aux.watsup:54.1-54.38 + ;; 0-aux.watsup:58.1-58.38 def $concatn_{syntax X, n : n}(syntax X, [], n) = [] - ;; 0-aux.watsup:55.1-55.73 + ;; 0-aux.watsup:59.1-59.73 def $concatn_{syntax X, `w*` : X*, n : n, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:57.1-57.78 +;; 0-aux.watsup:61.1-61.78 def $disjoint_(syntax X, X*) : bool - ;; 0-aux.watsup:58.1-58.37 + ;; 0-aux.watsup:62.1-62.37 def $disjoint_{syntax X}(syntax X, []) = true - ;; 0-aux.watsup:59.1-59.68 + ;; 0-aux.watsup:63.1-63.68 def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ w <- w'*{w' <- `w'*`} /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:62.1-62.38 +;; 0-aux.watsup:66.1-66.38 def $setminus1_(syntax X, X : X, X*) : X* - ;; 0-aux.watsup:66.1-66.38 + ;; 0-aux.watsup:70.1-70.38 def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] - ;; 0-aux.watsup:67.1-67.78 + ;; 0-aux.watsup:71.1-71.78 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = [] -- if (w = w_1) - ;; 0-aux.watsup:68.1-68.77 + ;; 0-aux.watsup:72.1-72.77 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = $setminus1_(syntax X, w, w'*{w' <- `w'*`}) -- otherwise } @@ -124,47 +135,50 @@ def $setminus1_(syntax X, X : X, X*) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:61.1-61.56 +;; 0-aux.watsup:65.1-65.56 def $setminus_(syntax X, X*, X*) : X* - ;; 0-aux.watsup:64.1-64.40 + ;; 0-aux.watsup:68.1-68.40 def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] - ;; 0-aux.watsup:65.1-65.90 + ;; 0-aux.watsup:69.1-69.90 def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:73.1-73.46 +;; 0-aux.watsup:77.1-77.46 def $setproduct2_(syntax X, X : X, X**) : X** - ;; 0-aux.watsup:79.1-79.44 + ;; 0-aux.watsup:83.1-83.44 def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] - ;; 0-aux.watsup:80.1-80.90 + ;; 0-aux.watsup:84.1-84.90 def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:72.1-72.47 +;; 0-aux.watsup:76.1-76.47 def $setproduct1_(syntax X, X*, X**) : X** - ;; 0-aux.watsup:77.1-77.46 + ;; 0-aux.watsup:81.1-81.46 def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] - ;; 0-aux.watsup:78.1-78.107 + ;; 0-aux.watsup:82.1-82.107 def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:71.1-71.82 +;; 0-aux.watsup:75.1-75.82 def $setproduct_(syntax X, X**) : X** - ;; 0-aux.watsup:75.1-75.40 + ;; 0-aux.watsup:79.1-79.40 def $setproduct_{syntax X}(syntax X, []) = [[]] - ;; 0-aux.watsup:76.1-76.90 + ;; 0-aux.watsup:80.1-80.90 def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) } +;; 1-syntax.watsup +def $ND : bool + ;; 1-syntax.watsup syntax list{syntax X}(syntax X) = | `%`{`X*` : X*}(X*{X <- `X*`} : X*) @@ -291,7 +305,7 @@ def $cont(byte : byte) : nat ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:87.1-87.25 +;; 1-syntax.watsup:94.1-94.25 def $utf8(char*) : byte* ;; A-binary.watsup:53.1-53.44 def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8([ch])*{ch <- `ch*`}) @@ -415,13 +429,13 @@ syntax fin = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:155.1-156.26 +;; 1-syntax.watsup:162.1-163.26 syntax typeuse = | _IDX{typeidx : typeidx}(typeidx : typeidx) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) | REC{n : n}(n : n) -;; 1-syntax.watsup:158.1-159.26 +;; 1-syntax.watsup:165.1-166.26 syntax heaptype = | ANY | EQ @@ -440,7 +454,7 @@ syntax heaptype = | REC{n : n}(n : n) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) -;; 1-syntax.watsup:166.1-167.14 +;; 1-syntax.watsup:173.1-174.14 syntax valtype = | I32 | I64 @@ -450,10 +464,10 @@ syntax valtype = | REF{nul : nul, heaptype : heaptype}(nul : nul, heaptype : heaptype) | BOT -;; 1-syntax.watsup:196.1-197.16 +;; 1-syntax.watsup:203.1-204.16 syntax resulttype = list(syntax valtype) -;; 1-syntax.watsup:204.1-204.66 +;; 1-syntax.watsup:211.1-211.66 syntax storagetype = | BOT | I32 @@ -465,31 +479,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:220.1-220.60 +;; 1-syntax.watsup:227.1-227.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:222.1-222.90 +;; 1-syntax.watsup:229.1-229.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:223.1-223.64 +;; 1-syntax.watsup:230.1-230.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:224.1-224.54 +;; 1-syntax.watsup:231.1-231.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:226.1-229.18 +;; 1-syntax.watsup:233.1-236.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:231.1-232.30 +;; 1-syntax.watsup:238.1-239.30 syntax subtype = | SUB{fin : fin, `typeuse*` : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse <- `typeuse*`} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:234.1-235.22 +;; 1-syntax.watsup:241.1-242.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -939,6 +953,26 @@ def $shsize(shape : shape) : nat ;; 2-syntax-aux.watsup def $shsize{Lnn : Lnn, N : N}(`%X%`_shape(Lnn, `%`_dim(N))) = ($lsize(Lnn) * N) +;; 1-syntax.watsup +syntax half__(shape_1 : shape, shape_2 : shape) + ;; 1-syntax.watsup + syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = + | LOW + | HIGH + -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) + + + ;; 1-syntax.watsup + syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = + | LOW + -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) + + +;; 1-syntax.watsup +syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = + | ZERO + -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) + ;; 1-syntax.watsup syntax vvunop = | NOT @@ -995,6 +1029,8 @@ syntax vbinop_(shape : shape) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) | `Q15MULR_SATS` -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | `RELAXED_Q15MULRS` + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) | MIN{sx : sx}(sx : sx) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) | MAX{sx : sx}(sx : sx) @@ -1011,6 +1047,21 @@ syntax vbinop_(shape : shape) | MAX | PMIN | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; 1-syntax.watsup +syntax vternop_(shape : shape) + ;; 1-syntax.watsup + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))) = + | RELAXED_LANESELECT + + + ;; 1-syntax.watsup + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))) = + | RELAXED_MADD + | RELAXED_NMADD ;; 1-syntax.watsup @@ -1061,6 +1112,8 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = | TRUNC_SAT{sx : sx}(sx : sx) -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_TRUNC{sx : sx}(sx : sx) + -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup @@ -1072,24 +1125,9 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) ;; 1-syntax.watsup -syntax half__(shape_1 : shape, shape_2 : shape) - ;; 1-syntax.watsup - syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = - | LOW - | HIGH - -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) - - - ;; 1-syntax.watsup - syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = - | LOW - -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) - - -;; 1-syntax.watsup -syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = - | ZERO - -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) +syntax vswizzlop_{M : M}(`%X%`_ishape(I8_Jnn, `%`_dim(M))) = + | SWIZZLE + | RELAXED_SWIZZLE ;; 1-syntax.watsup syntax vshiftop_{Jnn : Jnn, M : M}(`%X%`_ishape(Jnn, `%`_dim(M))) = @@ -1107,6 +1145,13 @@ syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_ -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) | `DOTS` -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | `RELAXED_DOTS` + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; 1-syntax.watsup +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2))) = + | `RELAXED_DOT_ADDS` + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup syntax memarg = @@ -1281,20 +1326,20 @@ syntax instr = | VVTESTOP{vectype : vectype, vvtestop : vvtestop}(vectype : vectype, vvtestop : vvtestop) | VUNOP{shape : shape, vunop_ : vunop_(shape)}(shape : shape, vunop_ : vunop_(shape)) | VBINOP{shape : shape, vbinop_ : vbinop_(shape)}(shape : shape, vbinop_ : vbinop_(shape)) + | VTERNOP{shape : shape, vternop_ : vternop_(shape)}(shape : shape, vternop_ : vternop_(shape)) | VTESTOP{shape : shape, vtestop_ : vtestop_(shape)}(shape : shape, vtestop_ : vtestop_(shape)) | VRELOP{shape : shape, vrelop_ : vrelop_(shape)}(shape : shape, vrelop_ : vrelop_(shape)) | VSHIFTOP{ishape : ishape, vshiftop_ : vshiftop_(ishape)}(ishape : ishape, vshiftop_ : vshiftop_(ishape)) | VBITMASK{ishape : ishape}(ishape : ishape) - | VSWIZZLE{ishape : ishape}(ishape : ishape) - -- if (ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) + | VSWIZZLOP{ishape : ishape, vswizzlop_ : vswizzlop_(ishape)}(ishape : ishape, vswizzlop_ : vswizzlop_(ishape)) | VSHUFFLE{ishape : ishape, `laneidx*` : laneidx*}(ishape : ishape, laneidx*{laneidx <- `laneidx*`} : laneidx*) -- if ((ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) /\ (|laneidx*{laneidx <- `laneidx*`}| = 16)) | VEXTUNOP{ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)) | VEXTBINOP{ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP{ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)) | VNARROW{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(ishape_1 : ishape, ishape_2 : ishape, sx : sx) -- if (($lsize($lanetype((ishape_2 : ishape <: shape))) = (2 * $lsize($lanetype((ishape_1 : ishape <: shape))))) /\ ((2 * $lsize($lanetype((ishape_1 : ishape <: shape)))) <= 32)) | VCVTOP{shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), `half__?` : half__(shape_2, shape_1)?, `zero__?` : zero__(shape_2, shape_1)?}(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), half__?{half__ <- `half__?`} : half__(shape_2, shape_1)?, zero__?{zero__ <- `zero__?`} : zero__(shape_2, shape_1)?) - -- if ($lanetype(shape_1) =/= $lanetype(shape_2)) | VSPLAT{shape : shape}(shape : shape) | VEXTRACT_LANE{shape : shape, `sx?` : sx?, laneidx : laneidx, numtype : numtype}(shape : shape, sx?{sx <- `sx?`} : sx?, laneidx : laneidx) -- if ((sx?{sx <- `sx?`} = ?()) <=> ($lanetype(shape) = (numtype : numtype <: lanetype))) @@ -1799,13 +1844,13 @@ def $free_shape(shape : shape) : free ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:443.1-443.44 +;; 2-syntax-aux.watsup:444.1-444.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; 2-syntax-aux.watsup:444.1-444.32 + ;; 2-syntax-aux.watsup:445.1-445.32 def $shift_labelidxs([]) = [] - ;; 2-syntax-aux.watsup:445.1-445.66 + ;; 2-syntax-aux.watsup:446.1-446.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_uN(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; 2-syntax-aux.watsup:446.1-446.91 + ;; 2-syntax-aux.watsup:447.1-447.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_uN((labelidx!`%`_labelidx.0 - 1))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } @@ -1814,7 +1859,7 @@ rec { ;; 2-syntax-aux.watsup:299.1-299.31 def $free_block(instr*) : free - ;; 2-syntax-aux.watsup:449.1-450.47 + ;; 2-syntax-aux.watsup:450.1-451.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) @@ -1889,134 +1934,136 @@ def $free_instr(instr : instr) : free ;; 2-syntax-aux.watsup:347.1-347.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) ;; 2-syntax-aux.watsup:348.1-348.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; 2-syntax-aux.watsup:349.1-349.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:349.1-349.58 + ;; 2-syntax-aux.watsup:350.1-350.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:350.1-350.64 + ;; 2-syntax-aux.watsup:351.1-351.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:351.1-351.55 - def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) ;; 2-syntax-aux.watsup:352.1-352.55 - def $free_instr{ishape : ishape}(VSWIZZLE_instr(ishape)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:353.1-353.64 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:353.1-353.66 + def $free_instr{ishape : ishape, vswizzlop : vswizzlop_(ishape)}(VSWIZZLOP_instr(ishape, vswizzlop)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:354.1-354.64 def $free_instr{ishape : ishape, `laneidx*` : laneidx*}(VSHUFFLE_instr(ishape, laneidx*{laneidx <- `laneidx*`})) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:354.1-355.49 + ;; 2-syntax-aux.watsup:355.1-356.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:356.1-357.49 + ;; 2-syntax-aux.watsup:357.1-358.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:358.1-359.49 + ;; 2-syntax-aux.watsup:359.1-360.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:360.1-361.47 + ;; 2-syntax-aux.watsup:361.1-362.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1), `half?` : half__(shape_2, shape_1)?, `zero?` : zero__(shape_2, shape_1)?}(VCVTOP_instr(shape_1, shape_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`})) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; 2-syntax-aux.watsup:362.1-362.51 + ;; 2-syntax-aux.watsup:363.1-363.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:363.1-363.70 + ;; 2-syntax-aux.watsup:364.1-364.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:364.1-364.66 + ;; 2-syntax-aux.watsup:365.1-365.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:366.1-366.62 + ;; 2-syntax-aux.watsup:367.1-367.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; 2-syntax-aux.watsup:367.1-367.34 + ;; 2-syntax-aux.watsup:368.1-368.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:368.1-368.38 + ;; 2-syntax-aux.watsup:369.1-369.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:369.1-369.29 + ;; 2-syntax-aux.watsup:370.1-370.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:370.1-370.59 - def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:371.1-371.59 - def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:372.1-372.59 + def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + ;; 2-syntax-aux.watsup:373.1-373.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; 2-syntax-aux.watsup:373.1-373.30 + ;; 2-syntax-aux.watsup:374.1-374.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:375.1-375.33 + ;; 2-syntax-aux.watsup:376.1-376.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:377.1-377.41 + ;; 2-syntax-aux.watsup:378.1-378.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:378.1-378.69 - def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) ;; 2-syntax-aux.watsup:379.1-379.69 + def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) + ;; 2-syntax-aux.watsup:380.1-380.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:380.1-380.65 + ;; 2-syntax-aux.watsup:381.1-381.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:382.1-382.60 + ;; 2-syntax-aux.watsup:383.1-383.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:383.1-383.68 + ;; 2-syntax-aux.watsup:384.1-384.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:384.1-384.70 + ;; 2-syntax-aux.watsup:385.1-385.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:385.1-386.51 + ;; 2-syntax-aux.watsup:386.1-387.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:387.1-388.51 + ;; 2-syntax-aux.watsup:388.1-389.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:389.1-389.64 + ;; 2-syntax-aux.watsup:390.1-390.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:390.1-390.60 + ;; 2-syntax-aux.watsup:391.1-391.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:391.1-391.32 + ;; 2-syntax-aux.watsup:392.1-392.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:392.1-392.61 + ;; 2-syntax-aux.watsup:393.1-393.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:393.1-394.55 + ;; 2-syntax-aux.watsup:394.1-395.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; 2-syntax-aux.watsup:395.1-396.51 + ;; 2-syntax-aux.watsup:396.1-397.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:397.1-398.51 + ;; 2-syntax-aux.watsup:398.1-399.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:400.1-400.41 - def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} ;; 2-syntax-aux.watsup:401.1-401.41 + def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} + ;; 2-syntax-aux.watsup:402.1-402.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:403.1-403.63 - def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:404.1-404.63 - def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:405.1-405.63 + def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + ;; 2-syntax-aux.watsup:406.1-406.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; 2-syntax-aux.watsup:407.1-407.67 - def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) ;; 2-syntax-aux.watsup:408.1-408.67 + def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) + ;; 2-syntax-aux.watsup:409.1-409.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; 2-syntax-aux.watsup:410.1-410.63 - def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:411.1-411.63 + def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:412.1-412.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:412.1-412.64 - def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:413.1-413.64 - def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:414.1-414.64 + def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:415.1-415.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:415.1-416.59 + ;; 2-syntax-aux.watsup:416.1-417.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; 2-syntax-aux.watsup:417.1-418.53 + ;; 2-syntax-aux.watsup:418.1-419.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:419.1-419.60 + ;; 2-syntax-aux.watsup:420.1-420.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:421.1-422.49 + ;; 2-syntax-aux.watsup:422.1-423.49 def $free_instr{numtype : numtype, loadop : loadop_(numtype), memidx : memidx, memarg : memarg}(LOAD_instr(numtype, ?(loadop), memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:423.1-424.49 + ;; 2-syntax-aux.watsup:424.1-425.49 def $free_instr{numtype : numtype, `sz?` : sz?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, sz?{sz <- `sz?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:425.1-426.49 + ;; 2-syntax-aux.watsup:426.1-427.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:427.1-428.49 + ;; 2-syntax-aux.watsup:428.1-429.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:429.1-430.49 + ;; 2-syntax-aux.watsup:430.1-431.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:431.1-432.49 + ;; 2-syntax-aux.watsup:432.1-433.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:433.1-433.59 - def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:434.1-434.59 - def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:435.1-435.59 + def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + ;; 2-syntax-aux.watsup:436.1-436.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; 2-syntax-aux.watsup:436.1-437.51 + ;; 2-syntax-aux.watsup:437.1-438.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; 2-syntax-aux.watsup:438.1-439.49 + ;; 2-syntax-aux.watsup:439.1-440.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:440.1-440.60 + ;; 2-syntax-aux.watsup:441.1-441.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) } @@ -2119,14 +2166,14 @@ def $dataidx_funcs(func*) : dataidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:532.1-532.112 +;; 2-syntax-aux.watsup:533.1-533.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:559.1-559.38 + ;; 2-syntax-aux.watsup:560.1-560.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; 2-syntax-aux.watsup:560.1-560.95 + ;; 2-syntax-aux.watsup:561.1-561.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; 2-syntax-aux.watsup:561.1-561.92 + ;; 2-syntax-aux.watsup:562.1-562.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -2149,78 +2196,78 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:533.1-533.112 +;; 2-syntax-aux.watsup:534.1-534.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:563.1-563.66 + ;; 2-syntax-aux.watsup:564.1-564.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; 2-syntax-aux.watsup:564.1-564.64 + ;; 2-syntax-aux.watsup:565.1-565.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; 2-syntax-aux.watsup:537.1-537.112 +;; 2-syntax-aux.watsup:538.1-538.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; 2-syntax-aux.watsup:569.1-569.67 + ;; 2-syntax-aux.watsup:570.1-570.67 def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) - ;; 2-syntax-aux.watsup:570.1-570.65 + ;; 2-syntax-aux.watsup:571.1-571.65 def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) - ;; 2-syntax-aux.watsup:571.1-571.53 + ;; 2-syntax-aux.watsup:572.1-572.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; 2-syntax-aux.watsup:538.1-538.112 +;; 2-syntax-aux.watsup:539.1-539.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; 2-syntax-aux.watsup:573.1-573.83 + ;; 2-syntax-aux.watsup:574.1-574.83 def $subst_reftype{nul : nul, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(nul, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(nul, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:539.1-539.112 +;; 2-syntax-aux.watsup:540.1-540.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; 2-syntax-aux.watsup:575.1-575.64 - def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:576.1-576.64 - def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:577.1-577.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; 2-syntax-aux.watsup:578.1-578.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; 2-syntax-aux.watsup:578.1-578.40 + ;; 2-syntax-aux.watsup:579.1-579.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; 2-syntax-aux.watsup:542.1-542.112 +;; 2-syntax-aux.watsup:543.1-543.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; 2-syntax-aux.watsup:582.1-582.66 + ;; 2-syntax-aux.watsup:583.1-583.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; 2-syntax-aux.watsup:583.1-583.69 + ;; 2-syntax-aux.watsup:584.1-584.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; 2-syntax-aux.watsup:543.1-543.112 +;; 2-syntax-aux.watsup:544.1-544.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; 2-syntax-aux.watsup:585.1-585.80 + ;; 2-syntax-aux.watsup:586.1-586.80 def $subst_fieldtype{mut : mut, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:545.1-545.112 +;; 2-syntax-aux.watsup:546.1-546.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; 2-syntax-aux.watsup:587.1-587.85 + ;; 2-syntax-aux.watsup:588.1-588.85 def $subst_comptype{`yt*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_structtype(yt*{yt <- `yt*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_structtype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{yt <- `yt*`})) - ;; 2-syntax-aux.watsup:588.1-588.81 + ;; 2-syntax-aux.watsup:589.1-589.81 def $subst_comptype{yt : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(yt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; 2-syntax-aux.watsup:589.1-589.78 + ;; 2-syntax-aux.watsup:590.1-590.78 def $subst_comptype{ft : functype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_comptype($subst_functype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:546.1-546.112 +;; 2-syntax-aux.watsup:547.1-547.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; 2-syntax-aux.watsup:591.1-592.71 + ;; 2-syntax-aux.watsup:592.1-593.71 def $subst_subtype{fin : fin, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(fin, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(fin, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:547.1-547.112 +;; 2-syntax-aux.watsup:548.1-548.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; 2-syntax-aux.watsup:594.1-594.76 + ;; 2-syntax-aux.watsup:595.1-595.76 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{st <- `st*`})) -;; 2-syntax-aux.watsup:548.1-548.112 +;; 2-syntax-aux.watsup:549.1-549.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; 2-syntax-aux.watsup:596.1-596.78 + ;; 2-syntax-aux.watsup:597.1-597.78 def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) -;; 2-syntax-aux.watsup:551.1-551.112 +;; 2-syntax-aux.watsup:552.1-552.112 def $subst_functype(functype : functype, typevar*, typeuse*) : functype - ;; 2-syntax-aux.watsup:599.1-599.113 + ;; 2-syntax-aux.watsup:600.1-600.113 def $subst_functype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_functype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_functype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`}), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`})) } @@ -2293,11 +2340,11 @@ def $subst_all_moduletype(moduletype : moduletype, heaptype*) : moduletype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:627.1-627.98 +;; 2-syntax-aux.watsup:628.1-628.98 def $subst_all_deftypes(deftype*, heaptype*) : deftype* - ;; 2-syntax-aux.watsup:628.1-628.40 + ;; 2-syntax-aux.watsup:629.1-629.40 def $subst_all_deftypes{`tu*` : typeuse*}([], (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [] - ;; 2-syntax-aux.watsup:629.1-629.101 + ;; 2-syntax-aux.watsup:630.1-630.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, (tu : typeuse <: heaptype)*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) } @@ -2341,13 +2388,13 @@ relation Expand: `%~~%`(deftype, comptype) ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:661.1-661.86 +;; 2-syntax-aux.watsup:662.1-662.86 def $funcsxx(externidx*) : typeidx* - ;; 2-syntax-aux.watsup:667.1-667.24 + ;; 2-syntax-aux.watsup:668.1-668.24 def $funcsxx([]) = [] - ;; 2-syntax-aux.watsup:668.1-668.45 + ;; 2-syntax-aux.watsup:669.1-669.45 def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:669.1-669.58 + ;; 2-syntax-aux.watsup:670.1-670.58 def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2355,13 +2402,13 @@ def $funcsxx(externidx*) : typeidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:662.1-662.88 +;; 2-syntax-aux.watsup:663.1-663.88 def $globalsxx(externidx*) : globalidx* - ;; 2-syntax-aux.watsup:671.1-671.26 + ;; 2-syntax-aux.watsup:672.1-672.26 def $globalsxx([]) = [] - ;; 2-syntax-aux.watsup:672.1-672.51 + ;; 2-syntax-aux.watsup:673.1-673.51 def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:673.1-673.62 + ;; 2-syntax-aux.watsup:674.1-674.62 def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2369,13 +2416,13 @@ def $globalsxx(externidx*) : globalidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:663.1-663.87 +;; 2-syntax-aux.watsup:664.1-664.87 def $tablesxx(externidx*) : tableidx* - ;; 2-syntax-aux.watsup:675.1-675.25 + ;; 2-syntax-aux.watsup:676.1-676.25 def $tablesxx([]) = [] - ;; 2-syntax-aux.watsup:676.1-676.48 + ;; 2-syntax-aux.watsup:677.1-677.48 def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:677.1-677.60 + ;; 2-syntax-aux.watsup:678.1-678.60 def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2383,13 +2430,13 @@ def $tablesxx(externidx*) : tableidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:664.1-664.85 +;; 2-syntax-aux.watsup:665.1-665.85 def $memsxx(externidx*) : memidx* - ;; 2-syntax-aux.watsup:679.1-679.23 + ;; 2-syntax-aux.watsup:680.1-680.23 def $memsxx([]) = [] - ;; 2-syntax-aux.watsup:680.1-680.42 + ;; 2-syntax-aux.watsup:681.1-681.42 def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:681.1-681.56 + ;; 2-syntax-aux.watsup:682.1-682.56 def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2397,13 +2444,13 @@ def $memsxx(externidx*) : memidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:665.1-665.85 +;; 2-syntax-aux.watsup:666.1-666.85 def $tagsxx(externidx*) : tagidx* - ;; 2-syntax-aux.watsup:683.1-683.23 + ;; 2-syntax-aux.watsup:684.1-684.23 def $tagsxx([]) = [] - ;; 2-syntax-aux.watsup:684.1-684.42 + ;; 2-syntax-aux.watsup:685.1-685.42 def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:685.1-685.56 + ;; 2-syntax-aux.watsup:686.1-686.56 def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2411,13 +2458,13 @@ def $tagsxx(externidx*) : tagidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:688.1-688.88 +;; 2-syntax-aux.watsup:689.1-689.88 def $funcsxt(externtype*) : deftype* - ;; 2-syntax-aux.watsup:694.1-694.24 + ;; 2-syntax-aux.watsup:695.1-695.24 def $funcsxt([]) = [] - ;; 2-syntax-aux.watsup:695.1-695.47 + ;; 2-syntax-aux.watsup:696.1-696.47 def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:696.1-696.59 + ;; 2-syntax-aux.watsup:697.1-697.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2425,13 +2472,13 @@ def $funcsxt(externtype*) : deftype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:689.1-689.90 +;; 2-syntax-aux.watsup:690.1-690.90 def $globalsxt(externtype*) : globaltype* - ;; 2-syntax-aux.watsup:698.1-698.26 + ;; 2-syntax-aux.watsup:699.1-699.26 def $globalsxt([]) = [] - ;; 2-syntax-aux.watsup:699.1-699.53 + ;; 2-syntax-aux.watsup:700.1-700.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:700.1-700.63 + ;; 2-syntax-aux.watsup:701.1-701.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2439,13 +2486,13 @@ def $globalsxt(externtype*) : globaltype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:690.1-690.89 +;; 2-syntax-aux.watsup:691.1-691.89 def $tablesxt(externtype*) : tabletype* - ;; 2-syntax-aux.watsup:702.1-702.25 + ;; 2-syntax-aux.watsup:703.1-703.25 def $tablesxt([]) = [] - ;; 2-syntax-aux.watsup:703.1-703.50 + ;; 2-syntax-aux.watsup:704.1-704.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:704.1-704.61 + ;; 2-syntax-aux.watsup:705.1-705.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2453,13 +2500,13 @@ def $tablesxt(externtype*) : tabletype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:691.1-691.87 +;; 2-syntax-aux.watsup:692.1-692.87 def $memsxt(externtype*) : memtype* - ;; 2-syntax-aux.watsup:706.1-706.23 + ;; 2-syntax-aux.watsup:707.1-707.23 def $memsxt([]) = [] - ;; 2-syntax-aux.watsup:707.1-707.44 + ;; 2-syntax-aux.watsup:708.1-708.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:708.1-708.57 + ;; 2-syntax-aux.watsup:709.1-709.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2467,13 +2514,13 @@ def $memsxt(externtype*) : memtype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:692.1-692.87 +;; 2-syntax-aux.watsup:693.1-693.87 def $tagsxt(externtype*) : tagtype* - ;; 2-syntax-aux.watsup:710.1-710.23 + ;; 2-syntax-aux.watsup:711.1-711.23 def $tagsxt([]) = [] - ;; 2-syntax-aux.watsup:711.1-711.44 + ;; 2-syntax-aux.watsup:712.1-712.44 def $tagsxt{at : tagtype, `xt*` : externtype*}([TAG_externtype((at : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [at] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:712.1-712.57 + ;; 2-syntax-aux.watsup:713.1-713.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2484,213 +2531,233 @@ def $memarg0 : memarg def $memarg0 = {ALIGN `%`_u32(0), OFFSET `%`_u32(0)} ;; 3-numerics.watsup -def $s33_to_u32(s33 : s33) : u32 +syntax relaxed2 = + | `%`{i : nat}(i : nat) + -- if ((i = 0) \/ (i = 1)) ;; 3-numerics.watsup -def $signed_(N : N, nat : nat) : int +syntax relaxed4 = + | `%`{i : nat}(i : nat) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; 3-numerics.watsup +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) - -- if (0 <= (2 ^ (N - 1))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][i] + -- if $ND ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) - -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][0] + -- otherwise ;; 3-numerics.watsup -def $invsigned_(N : N, int : int) : nat +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X ;; 3-numerics.watsup - def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j - -- if ($signed_(N, j) = (i : nat <: int)) + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][i] + -- if $ND + ;; 3-numerics.watsup + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][0] + -- otherwise ;; 3-numerics.watsup -def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $R_fmadd : relaxed2 ;; 3-numerics.watsup -def $fabs_(N : N, fN : fN(N)) : fN(N)* +def $R_fmin : relaxed4 ;; 3-numerics.watsup -def $fceil_(N : N, fN : fN(N)) : fN(N)* +def $R_fmax : relaxed4 ;; 3-numerics.watsup -def $ffloor_(N : N, fN : fN(N)) : fN(N)* +def $R_idot : relaxed2 ;; 3-numerics.watsup -def $fnearest_(N : N, fN : fN(N)) : fN(N)* +def $R_iq15mulr : relaxed2 ;; 3-numerics.watsup -def $fneg_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_u : relaxed4 ;; 3-numerics.watsup -def $fsqrt_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_s : relaxed2 ;; 3-numerics.watsup -def $ftrunc_(N : N, fN : fN(N)) : fN(N)* +def $R_swizzle : relaxed2 ;; 3-numerics.watsup -def $iclz_(N : N, iN : iN(N)) : iN(N) +def $R_laneselect : relaxed2 ;; 3-numerics.watsup -def $ictz_(N : N, iN : iN(N)) : iN(N) +def $s33_to_u32(s33 : s33) : u32 ;; 3-numerics.watsup -def $ipopcnt_(N : N, iN : iN(N)) : iN(N) +def $signed_(N : N, nat : nat) : int + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) + -- if (0 <= (2 ^ (N - 1))) + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) + -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) ;; 3-numerics.watsup -def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) +def $invsigned_(N : N, int : int) : nat + ;; 3-numerics.watsup + def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j + -- if ($signed_(N, j) = (i : nat <: int)) ;; 3-numerics.watsup -def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] +def $sat_u_(N : N, nat : nat) : nat ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = 0 + -- if (i < 0) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = ((2 ^ N) - 1) + -- if (i > ((2 ^ N) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = i + -- otherwise + +;; 3-numerics.watsup +def $sat_s_(N : N, int : int) : int ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = - ((2 ^ (N - 1)) : nat <: int) + -- if ((i : nat <: int) < - ((2 ^ (N - 1)) : nat <: int)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (((2 ^ (N - 1)) - 1) : nat <: int) + -- if (i > ((2 ^ (N - 1)) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (i : nat <: int) + -- otherwise ;; 3-numerics.watsup -def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $relaxed_trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) ;; 3-numerics.watsup -def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) ;; 3-numerics.watsup -def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $ibits_(N : N, iN : iN(N)) : bit* ;; 3-numerics.watsup -def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbits_(N : N, fN : fN(N)) : bit* ;; 3-numerics.watsup -def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $ibytes_(N : N, iN : iN(N)) : byte* ;; 3-numerics.watsup -def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbytes_(N : N, fN : fN(N)) : byte* ;; 3-numerics.watsup -def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* ;; 3-numerics.watsup -def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* ;; 3-numerics.watsup -def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* ;; 3-numerics.watsup -def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* ;; 3-numerics.watsup -def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $invibytes_(N : N, byte*) : iN(N) + ;; 3-numerics.watsup + def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) + -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) ;; 3-numerics.watsup -def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $invfbytes_(N : N, byte*) : fN(N) ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p + -- if ($fbytes_(N, p) = b*{b <- `b*`}) ;; 3-numerics.watsup -def $ieqz_(N : N, iN : iN(N)) : u32 +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) +def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? ;; 3-numerics.watsup -def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? ;; 3-numerics.watsup -def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $inot_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) + +;; 3-numerics.watsup +def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) + +;; 3-numerics.watsup +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iclz_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ictz_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ieqz_(N : N, iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $inez_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 @@ -2699,202 +2766,285 @@ def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) +def $iabs_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $ineg_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] - -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] - -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $ibits_(N : N, iN : iN(N)) : bit* +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $fbits_(N : N, fN : fN(N)) : bit* +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibytes_(N : N, iN : iN(N)) : byte* +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $fbytes_(N : N, fN : fN(N)) : byte* +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invibytes_(N : N, byte*) : iN(N) - ;; 3-numerics.watsup - def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) - -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invfbytes_(N : N, byte*) : fN(N) - ;; 3-numerics.watsup - def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p - -- if ($fbytes_(N, p) = b*{b <- `b*`}) +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $inot_(N : N, iN : iN(N)) : iN(N) +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) +def $fabs_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iabs_(N : N, iN : iN(N)) : iN(N) +def $fneg_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ineg_(N : N, iN : iN(N)) : iN(N) +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fceil_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ffloor_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fnearest_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; 3-numerics.watsup +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) ;; 3-numerics.watsup def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c ;; 3-numerics.watsup - def $lpacknum_{packtype : packtype, c : num_($lunpack((packtype : packtype <: lanetype)))}((packtype : packtype <: lanetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) - -;; 3-numerics.watsup -def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) + def $lpacknum_{packtype : packtype, c : num_($lunpack((packtype : packtype <: lanetype)))}((packtype : packtype <: lanetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; 3-numerics.watsup +def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) + ;; 3-numerics.watsup + def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + ;; 3-numerics.watsup + def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; 3-numerics.watsup +def $cpacknum_(storagetype : storagetype, lit_ : lit_(($cunpack(storagetype) : consttype <: storagetype))) : lit_(storagetype) + ;; 3-numerics.watsup + def $cpacknum_{consttype : consttype, c : lit_(($cunpack((consttype : consttype <: storagetype)) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; 3-numerics.watsup + def $cpacknum_{packtype : packtype, c : lit_(($cunpack((packtype : packtype <: storagetype)) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; 3-numerics.watsup +def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($cunpack(storagetype) : consttype <: storagetype)) + ;; 3-numerics.watsup + def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; 3-numerics.watsup + def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; 3-numerics.watsup +def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* + +;; 3-numerics.watsup +def $invlanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $invlanes_{sh : shape, `c*` : lane_($lanetype(sh))*, vc : vec_(V128_Vnn)}(sh, c*{c <- `c*`}) = vc + -- if (c*{c <- `c*`} = $lanes_(sh, vc)) + +;; 3-numerics.watsup +def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), nat : nat, nat : nat) : nat + ;; 3-numerics.watsup + def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + ;; 3-numerics.watsup + def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), HIGH_half__, i, j) = j + ;; 3-numerics.watsup + def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + +;; 3-numerics.watsup +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + +;; 3-numerics.watsup +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) + +;; 3-numerics.watsup +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup - def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup - def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup -def $cpacknum_(storagetype : storagetype, lit_ : lit_(($cunpack(storagetype) : consttype <: storagetype))) : lit_(storagetype) +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* ;; 3-numerics.watsup - def $cpacknum_{consttype : consttype, c : lit_(($cunpack((consttype : consttype <: storagetype)) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] ;; 3-numerics.watsup - def $cpacknum_{packtype : packtype, c : lit_(($cunpack((packtype : packtype <: storagetype)) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) - -;; 3-numerics.watsup -def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($cunpack(storagetype) : consttype <: storagetype)) + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] ;; 3-numerics.watsup - def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) ;; 3-numerics.watsup - def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) - -;; 3-numerics.watsup -def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* - -;; 3-numerics.watsup -def $invlanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) ;; 3-numerics.watsup - def $invlanes_{sh : shape, `c*` : lane_($lanetype(sh))*, vc : vec_(V128_Vnn)}(sh, c*{c <- `c*`}) = vc - -- if (c*{c <- `c*`} = $lanes_(sh, vc)) - -;; 3-numerics.watsup -def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), nat : nat, nat : nat) : nat + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] ;; 3-numerics.watsup - def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) ;; 3-numerics.watsup - def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), HIGH_half__, i, j) = j + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) ;; 3-numerics.watsup - def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] + -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) ;; 3-numerics.watsup def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* @@ -2933,12 +3083,6 @@ def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128 ;; 3-numerics.watsup def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fabs_, vN_1) ;; 3-numerics.watsup @@ -2953,6 +3097,12 @@ def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_ def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), TRUNC_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ftrunc_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEAREST_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fnearest_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* @@ -2978,6 +3128,14 @@ def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) +;; 3-numerics.watsup +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, sx, vN_1, vN_2) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + ;; 3-numerics.watsup def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* ;; 3-numerics.watsup @@ -2999,6 +3157,8 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec ;; 3-numerics.watsup def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `Q15MULR_SATS`_vbinop_, vN_1, vN_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iq15mulr_sat_, S_sx, vN_1, vN_2) ;; 3-numerics.watsup + def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `RELAXED_Q15MULRS`_vbinop_, vN_1, vN_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_q15mulr_, S_sx, vN_1, vN_2) + ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ADD_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fadd_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SUB_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsub_, vN_1, vN_2) @@ -3014,6 +3174,49 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmin_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmax_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_min_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_max_, vN_1, vN_2) + +;; 3-numerics.watsup +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $vternop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), RELAXED_LANESELECT_vternop_, vN_1, vN_2, vN_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_laneselect_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_madd_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_NMADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_nmadd_, vN_1, vN_2, vN_3) + +;; 3-numerics.watsup +def $ivtestop_(shape : shape, def $f_(N : N, iN : iN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $ivtestop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + +;; 3-numerics.watsup +def $vtestop_(shape : shape, vtestop_ : vtestop_(shape), vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $vtestop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_, vN_1) = $ivtestop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $inez_, vN_1) ;; 3-numerics.watsup def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) @@ -3079,6 +3282,9 @@ def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, sha def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), TRUNC_SAT_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) -- if (iN_2?{iN_2 <- `iN_2?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) ;; 3-numerics.watsup + def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), RELAXED_TRUNC_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) + -- if (iN_2?{iN_2 <- `iN_2?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) + ;; 3-numerics.watsup def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `fN_2*` : lane_($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), DEMOTE_vcvtop__, fN_1) = fN_2*{fN_2 <- `fN_2*`} -- if (fN_2*{fN_2 <- `fN_2*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), fN_1)) ;; 3-numerics.watsup @@ -3101,11 +3307,38 @@ def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__ -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)[$half__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), half, 0, M_2) : M_2]) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`})) ;; 3-numerics.watsup - def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) - -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`}) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + ;; 3-numerics.watsup + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOTS`_vextbinop__, c_1, c_2) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_sat_($lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + +;; 3-numerics.watsup +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_3*` : lane_($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))))*, Jnn : Jnn, `ci'_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOT_ADDS`_vextternop__, c_1, c_2, c_3) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci_3*{ci_3 <- `ci_3*`} = $lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), c_3)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [`%`_uN(cj_1!`%`_iN.0) `%`_uN(cj_2!`%`_iN.0)]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn((Jnn : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [ck_1 ck_2]*{ck_1 <- `ck_1*`, ck_2 <- `ck_2*`}) = $iadd_sat_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN(cj_1!`%`_iN.0), `%`_iN(cj_2!`%`_iN.0))*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) + -- if (ck'_1*{ck'_1 <- `ck'_1*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_1)*{ck_1 <- `ck_1*`}) + -- if (ck'_2*{ck'_2 <- `ck'_2*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_2)*{ck_2 <- `ck_2*`}) + -- if (ck*{ck <- `ck*`} = $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck'_1, ck'_2)*{ck'_1 <- `ck'_1*`, ck'_2 <- `ck'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck, ci_3)*{ci_3 <- `ci_3*`, ck <- `ck*`})) ;; 3-numerics.watsup def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($lanetype((ishape : ishape <: shape))), u32 : u32) : lane_($lanetype((ishape : ishape <: shape))) @@ -3114,6 +3347,13 @@ def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($la ;; 3-numerics.watsup def $vshiftop_{Jnn : Jnn, M : M, sx : sx, lane : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)))), n : n}(`%X%`_ishape(Jnn, `%`_dim(M)), SHR_vshiftop_(sx), lane, `%`_u32(n)) = $ishr_($lsizenn((Jnn : Jnn <: lanetype)), sx, lane, `%`_u32(n)) +;; 3-numerics.watsup +def $fvtestop_(shape : shape, def $f_(N : N, fN : fN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $fvtestop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($sizenn((Fnn : Fnn <: numtype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + ;; 4-runtime.watsup syntax num = | CONST{numtype : numtype, num_ : num_(numtype)}(numtype : numtype, num_ : num_(numtype)) @@ -4633,224 +4873,232 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:948.1-949.40 + ;; 6-typing.watsup:948.1-949.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:951.1-952.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:951.1-952.44 + ;; 6-typing.watsup:954.1-955.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:954.1-955.47 + ;; 6-typing.watsup:957.1-958.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:957.1-958.33 + ;; 6-typing.watsup:960.1-961.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:960.1-961.39 - rule vswizzle{C : context, sh : ishape}: - `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + ;; 6-typing.watsup:963.1-964.50 + rule vswizzlop{C : context, sh : ishape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:963.1-965.29 + ;; 6-typing.watsup:966.1-968.29 rule vshuffle{C : context, sh : ishape, `i*` : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i <- `i*`} - ;; 6-typing.watsup:967.1-968.44 + ;; 6-typing.watsup:970.1-971.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:970.1-972.21 + ;; 6-typing.watsup:973.1-975.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:974.1-976.21 + ;; 6-typing.watsup:977.1-979.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:978.1-979.50 + ;; 6-typing.watsup:981.1-982.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:981.1-982.57 + ;; 6-typing.watsup:984.1-985.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:984.1-985.48 + ;; 6-typing.watsup:987.1-988.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:990.1-991.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:987.1-988.58 + ;; 6-typing.watsup:993.1-994.58 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1), `half?` : half__(sh_2, sh_1)?, `zero?` : zero__(sh_2, sh_1)?}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:993.1-995.28 + ;; 6-typing.watsup:999.1-1001.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:997.1-999.29 + ;; 6-typing.watsup:1003.1-1005.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1001.1-1003.29 + ;; 6-typing.watsup:1007.1-1009.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1008.1-1010.29 + ;; 6-typing.watsup:1014.1-1016.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:1012.1-1014.29 + ;; 6-typing.watsup:1018.1-1020.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:1019.1-1021.29 + ;; 6-typing.watsup:1025.1-1027.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1023.1-1025.29 + ;; 6-typing.watsup:1029.1-1031.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1027.1-1029.29 + ;; 6-typing.watsup:1033.1-1035.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1031.1-1033.29 + ;; 6-typing.watsup:1037.1-1039.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1035.1-1037.29 + ;; 6-typing.watsup:1041.1-1043.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1039.1-1043.36 + ;; 6-typing.watsup:1045.1-1049.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1045.1-1049.36 + ;; 6-typing.watsup:1051.1-1055.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1051.1-1053.24 + ;; 6-typing.watsup:1057.1-1059.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1058.1-1060.23 + ;; 6-typing.watsup:1064.1-1066.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1062.1-1064.23 + ;; 6-typing.watsup:1068.1-1070.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1066.1-1068.23 + ;; 6-typing.watsup:1072.1-1074.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1070.1-1073.27 + ;; 6-typing.watsup:1076.1-1079.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1075.1-1078.24 + ;; 6-typing.watsup:1081.1-1084.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1080.1-1082.24 + ;; 6-typing.watsup:1086.1-1088.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1093.1-1096.43 + ;; 6-typing.watsup:1099.1-1102.43 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1098.1-1101.35 + ;; 6-typing.watsup:1104.1-1107.35 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1112.1-1115.43 + ;; 6-typing.watsup:1118.1-1121.43 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1117.1-1120.35 + ;; 6-typing.watsup:1123.1-1126.35 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1122.1-1125.46 + ;; 6-typing.watsup:1128.1-1131.46 rule `vload-val`{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1127.1-1130.39 + ;; 6-typing.watsup:1133.1-1136.39 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1132.1-1135.35 + ;; 6-typing.watsup:1138.1-1141.35 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1137.1-1140.35 + ;; 6-typing.watsup:1143.1-1146.35 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1142.1-1146.21 + ;; 6-typing.watsup:1148.1-1152.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1148.1-1151.46 + ;; 6-typing.watsup:1154.1-1157.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1153.1-1157.21 + ;; 6-typing.watsup:1159.1-1163.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) @@ -5125,13 +5373,13 @@ relation Export_ok: `%|-%:%%`(context, export, name, externtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1358.1-1358.100 +;; 6-typing.watsup:1364.1-1364.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1402.1-1403.17 + ;; 6-typing.watsup:1408.1-1409.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1405.1-1408.54 + ;; 6-typing.watsup:1411.1-1414.54 rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) -- Global_ok: `%|-%:%`(C, global_1, gt_1) @@ -5141,13 +5389,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1357.1-1357.98 +;; 6-typing.watsup:1363.1-1363.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1394.1-1395.17 + ;; 6-typing.watsup:1400.1-1401.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1397.1-1400.49 + ;; 6-typing.watsup:1403.1-1406.49 rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) @@ -5584,15 +5832,19 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) ;; 8-reduction.watsup - rule `vtestop-true`{c : vec_(V128_Vnn), Jnn : Jnn, M : M, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(1))]) - -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)) - -- (if (ci_1 =/= `%`_lane_(0)))*{ci_1 <- `ci_1*`} + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if c <- $vternop_(sh, vternop, c_1, c_2, c_3) ;; 8-reduction.watsup - rule `vtestop-false`{c : vec_(V128_Vnn), Jnn : Jnn, M : M}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(0))]) - -- otherwise + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; 8-reduction.watsup + rule vtestop{c_1 : vec_(V128_Vnn), sh : shape, vtestop : vtestop_(sh), i : nat}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(sh, vtestop)], [CONST_instr(I32_numtype, `%`_num_(i))]) + -- if ($vtestop_(sh, vtestop, c_1) = `%`_u32(i)) ;; 8-reduction.watsup rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: @@ -5612,11 +5864,18 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($ibits_(32, ci) = `%`_bit($ilt_($lsize((Jnn : Jnn <: lanetype)), S_sx, ci_1, `%`_iN(0))!`%`_u32.0)*{ci_1 <- `ci_1*`}) ;; 8-reduction.watsup - rule vswizzle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Pnn : Pnn, M : M, c : vec_(V128_Vnn), `c'*` : iN($lsize((Pnn : Pnn <: lanetype)))*, `ci*` : lane_($lanetype(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M))))*, `k*` : nat*}: - `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLE_instr(`%X%`_ishape((Pnn : Pnn <: Jnn), `%`_dim(M)))], [VCONST_instr(V128_vectype, c)]) - -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_2)) - -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) - -- if (c = $invlanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), RELAXED_SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`(instr*, instr*) `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + ;; 8-reduction.watsup + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + ;; 8-reduction.watsup rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Jnn_2 : Jnn, M_2 : M, Jnn_1 : Jnn, M_1 : M, sx : sx, c : vec_(V128_Vnn), `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}: `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(`%X%`_ishape(Jnn_2, `%`_dim(M_2)), `%X%`_ishape(Jnn_1, `%`_dim(M_1)), sx)], [VCONST_instr(V128_vectype, c)]) @@ -6311,89 +6575,89 @@ relation Step: `%~>%`(config, config) `%~>%`(`%;%`_config(z, [REF.ARRAY_ADDR_instr(a) CONST_instr(I32_numtype, `%`_num_(i)) (val : val <: instr) ARRAY.SET_instr(x)]), `%;%`_config($with_array(z, a, i, $packfield_(zt, val)), [])) -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 8-reduction.watsup:806.1-807.56 + ;; 8-reduction.watsup:823.1-824.56 rule local.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) LOCAL.SET_instr(x)]), `%;%`_config($with_local(z, x, val), [])) - ;; 8-reduction.watsup:819.1-820.58 + ;; 8-reduction.watsup:836.1-837.58 rule global.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) GLOBAL.SET_instr(x)]), `%;%`_config($with_global(z, x, val), [])) - ;; 8-reduction.watsup:833.1-835.33 + ;; 8-reduction.watsup:850.1-852.33 rule `table.set-oob`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config(z, [TRAP_instr])) -- if (i >= |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:837.1-839.32 + ;; 8-reduction.watsup:854.1-856.32 rule `table.set-val`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config($with_table(z, x, i, ref), [])) -- if (i < |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:847.1-850.46 + ;; 8-reduction.watsup:864.1-867.46 rule `table.grow-succeed`{z : state, ref : ref, n : n, x : idx, ti : tableinst}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr(I32_numtype, `%`_num_(|$table(z, x).REFS_tableinst|))])) -- if (ti = $growtable($table(z, x), n, ref)) - ;; 8-reduction.watsup:852.1-853.81 + ;; 8-reduction.watsup:869.1-870.81 rule `table.grow-fail`{z : state, ref : ref, n : n, x : idx}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:913.1-914.51 + ;; 8-reduction.watsup:930.1-931.51 rule elem.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [ELEM.DROP_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) - ;; 8-reduction.watsup:997.1-1000.60 + ;; 8-reduction.watsup:1014.1-1017.60 rule `store-num-oob`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($size(nt) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1002.1-1006.29 + ;; 8-reduction.watsup:1019.1-1023.29 rule `store-num-val`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($size(nt) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $nbytes_(nt, c)) - ;; 8-reduction.watsup:1008.1-1011.52 + ;; 8-reduction.watsup:1025.1-1028.52 rule `store-pack-oob`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + (n / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1013.1-1017.52 + ;; 8-reduction.watsup:1030.1-1034.52 rule `store-pack-val`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (n / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : Inn <: numtype)), n, c))) - ;; 8-reduction.watsup:1019.1-1021.63 + ;; 8-reduction.watsup:1036.1-1038.63 rule `vstore-oob`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($vsize(V128_vectype) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1023.1-1025.31 + ;; 8-reduction.watsup:1040.1-1042.31 rule `vstore-val`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($vsize(V128_vectype) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) - ;; 8-reduction.watsup:1028.1-1030.50 + ;; 8-reduction.watsup:1045.1-1047.50 rule `vstore_lane-oob`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + N) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1032.1-1036.49 + ;; 8-reduction.watsup:1049.1-1053.49 rule `vstore_lane-val`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat, `b*` : byte*, Jnn : Jnn, M : M}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (N / 8), b*{b <- `b*`}), [])) -- if (N = $lsize((Jnn : Jnn <: lanetype))) -- if (M = (128 / N)) -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)[j]!`%`_lane_.0))) - ;; 8-reduction.watsup:1044.1-1047.37 + ;; 8-reduction.watsup:1061.1-1064.37 rule `memory.grow-succeed`{z : state, n : n, x : idx, mi : meminst}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr(I32_numtype, `%`_num_((|$mem(z, x).BYTES_meminst| / (64 * $Ki))))])) -- if (mi = $growmem($mem(z, x), n)) - ;; 8-reduction.watsup:1049.1-1050.78 + ;; 8-reduction.watsup:1066.1-1067.78 rule `memory.grow-fail`{z : state, n : n, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:1110.1-1111.51 + ;; 8-reduction.watsup:1127.1-1128.51 rule data.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [DATA.DROP_instr(x)]), `%;%`_config($with_data(z, x, []), [])) } @@ -7043,7 +7307,7 @@ grammar Blaneidx : laneidx ;; A-binary.watsup rec { -;; A-binary.watsup:971.1-981.66 +;; A-binary.watsup:992.1-1006.73 grammar Binstr : instr ;; A-binary.watsup:214.5-214.24 prod 0x00 => UNREACHABLE_instr @@ -7573,430 +7837,462 @@ grammar Binstr : instr prod{`b*` : byte*} {0xFD `%`_u32(12):Bu32 b:Bbyte^16{b <- `b*`}} => VCONST_instr(V128_vectype, $invibytes_(128, b^16{b <- `b*`})) ;; A-binary.watsup:625.5-625.58 prod{l : labelidx} {0xFD `%`_u32(13):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx^16{}} => VSHUFFLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), [`%`_uN(l!`%`_labelidx.0)]) - ;; A-binary.watsup:626.5-626.40 - prod {0xFD `%`_u32(14):Bu32} => VSWIZZLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:630.5-630.38 - prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) + ;; A-binary.watsup:626.5-626.49 + prod {0xFD `%`_u32(14):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SWIZZLE_vswizzlop_) + ;; A-binary.watsup:627.5-627.58 + prod {0xFD `%`_u32(256):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), RELAXED_SWIZZLE_vswizzlop_) ;; A-binary.watsup:631.5-631.38 - prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) + prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) ;; A-binary.watsup:632.5-632.38 - prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) ;; A-binary.watsup:633.5-633.38 - prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) + prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) ;; A-binary.watsup:634.5-634.38 - prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) ;; A-binary.watsup:635.5-635.38 + prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + ;; A-binary.watsup:636.5-636.38 prod {0xFD `%`_u32(20):Bu32} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2))) - ;; A-binary.watsup:639.5-639.60 - prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:640.5-640.60 + prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:641.5-641.60 prod{l : labelidx} {0xFD `%`_u32(22):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:641.5-641.58 + ;; A-binary.watsup:642.5-642.58 prod{l : labelidx} {0xFD `%`_u32(23):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:642.5-642.60 - prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:643.5-643.60 + prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:644.5-644.60 prod{l : labelidx} {0xFD `%`_u32(25):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:644.5-644.58 - prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:645.5-645.58 - prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:646.5-646.58 - prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:647.5-647.58 - prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:648.5-648.58 - prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:649.5-649.58 - prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:650.5-650.58 - prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:651.5-651.58 - prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:652.5-652.58 + prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:653.5-653.58 prod{l : labelidx} {0xFD `%`_u32(34):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:656.5-656.41 - prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) ;; A-binary.watsup:657.5-657.41 + prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) + ;; A-binary.watsup:658.5-658.41 prod {0xFD `%`_u32(36):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NE_vrelop_) - ;; A-binary.watsup:658.5-658.45 - prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:659.5-659.45 - prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:660.5-660.45 - prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) ;; A-binary.watsup:661.5-661.45 - prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) ;; A-binary.watsup:662.5-662.45 - prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) ;; A-binary.watsup:663.5-663.45 - prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) ;; A-binary.watsup:664.5-664.45 - prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) ;; A-binary.watsup:665.5-665.45 + prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:666.5-666.45 prod {0xFD `%`_u32(44):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:669.5-669.41 - prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) ;; A-binary.watsup:670.5-670.41 + prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) + ;; A-binary.watsup:671.5-671.41 prod {0xFD `%`_u32(46):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NE_vrelop_) - ;; A-binary.watsup:671.5-671.45 - prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:672.5-672.45 - prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:673.5-673.45 - prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) ;; A-binary.watsup:674.5-674.45 - prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) ;; A-binary.watsup:675.5-675.45 - prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) ;; A-binary.watsup:676.5-676.45 - prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) ;; A-binary.watsup:677.5-677.45 - prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) ;; A-binary.watsup:678.5-678.45 + prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:679.5-679.45 prod {0xFD `%`_u32(54):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:682.5-682.41 - prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:683.5-683.41 + prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) + ;; A-binary.watsup:684.5-684.41 prod {0xFD `%`_u32(56):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NE_vrelop_) - ;; A-binary.watsup:684.5-684.45 - prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:685.5-685.45 - prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:686.5-686.45 - prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) ;; A-binary.watsup:687.5-687.45 - prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) ;; A-binary.watsup:688.5-688.45 - prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) ;; A-binary.watsup:689.5-689.45 - prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) ;; A-binary.watsup:690.5-690.45 - prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) ;; A-binary.watsup:691.5-691.45 + prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:692.5-692.45 prod {0xFD `%`_u32(64):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:695.5-695.41 - prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:696.5-696.41 - prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) + prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:697.5-697.41 - prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) + prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) ;; A-binary.watsup:698.5-698.41 - prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) + prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) ;; A-binary.watsup:699.5-699.41 - prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) ;; A-binary.watsup:700.5-700.41 + prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + ;; A-binary.watsup:701.5-701.41 prod {0xFD `%`_u32(70):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GE_vrelop_) - ;; A-binary.watsup:704.5-704.41 - prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:705.5-705.41 - prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) + prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:706.5-706.41 - prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) + prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) ;; A-binary.watsup:707.5-707.41 - prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) + prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) ;; A-binary.watsup:708.5-708.41 - prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) ;; A-binary.watsup:709.5-709.41 + prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + ;; A-binary.watsup:710.5-710.41 prod {0xFD `%`_u32(76):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GE_vrelop_) - ;; A-binary.watsup:713.5-713.36 + ;; A-binary.watsup:714.5-714.36 prod {0xFD `%`_u32(77):Bu32} => VVUNOP_instr(V128_vectype, NOT_vvunop) - ;; A-binary.watsup:717.5-717.37 + ;; A-binary.watsup:718.5-718.37 prod {0xFD `%`_u32(78):Bu32} => VVBINOP_instr(V128_vectype, AND_vvbinop) - ;; A-binary.watsup:718.5-718.40 + ;; A-binary.watsup:719.5-719.40 prod {0xFD `%`_u32(79):Bu32} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) - ;; A-binary.watsup:719.5-719.36 + ;; A-binary.watsup:720.5-720.36 prod {0xFD `%`_u32(80):Bu32} => VVBINOP_instr(V128_vectype, OR_vvbinop) - ;; A-binary.watsup:720.5-720.37 + ;; A-binary.watsup:721.5-721.37 prod {0xFD `%`_u32(81):Bu32} => VVBINOP_instr(V128_vectype, XOR_vvbinop) - ;; A-binary.watsup:724.5-724.44 + ;; A-binary.watsup:725.5-725.44 prod {0xFD `%`_u32(82):Bu32} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) - ;; A-binary.watsup:728.5-728.43 + ;; A-binary.watsup:729.5-729.43 prod {0xFD `%`_u32(83):Bu32} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) - ;; A-binary.watsup:732.5-732.41 - prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) ;; A-binary.watsup:733.5-733.41 + prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) + ;; A-binary.watsup:734.5-734.41 prod {0xFD `%`_u32(97):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NEG_vunop_) - ;; A-binary.watsup:734.5-734.44 + ;; A-binary.watsup:735.5-735.44 prod {0xFD `%`_u32(98):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), POPCNT_vunop_) - ;; A-binary.watsup:738.5-738.48 + ;; A-binary.watsup:739.5-739.48 prod {0xFD `%`_u32(99):Bu32} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:742.5-742.41 + ;; A-binary.watsup:743.5-743.41 prod {0xFD `%`_u32(100):Bu32} => VBITMASK_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:746.5-746.53 - prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) ;; A-binary.watsup:747.5-747.53 + prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) + ;; A-binary.watsup:748.5-748.53 prod {0xFD `%`_u32(102):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), U_sx) - ;; A-binary.watsup:751.5-751.45 + ;; A-binary.watsup:752.5-752.45 prod {0xFD `%`_u32(107):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHL_vshiftop_) - ;; A-binary.watsup:752.5-752.49 - prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) ;; A-binary.watsup:753.5-753.49 + prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) + ;; A-binary.watsup:754.5-754.49 prod {0xFD `%`_u32(109):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:757.5-757.43 + ;; A-binary.watsup:758.5-758.43 prod {0xFD `%`_u32(110):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_vbinop_) - ;; A-binary.watsup:758.5-758.51 - prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) ;; A-binary.watsup:759.5-759.51 + prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:760.5-760.51 prod {0xFD `%`_u32(112):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:760.5-760.43 + ;; A-binary.watsup:761.5-761.43 prod {0xFD `%`_u32(113):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_vbinop_) - ;; A-binary.watsup:761.5-761.51 - prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) ;; A-binary.watsup:762.5-762.51 + prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:763.5-763.51 prod {0xFD `%`_u32(115):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:763.5-763.47 - prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:764.5-764.47 - prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) + prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:765.5-765.47 - prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) ;; A-binary.watsup:766.5-766.47 + prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + ;; A-binary.watsup:767.5-767.47 prod {0xFD `%`_u32(121):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:767.5-767.48 + ;; A-binary.watsup:768.5-768.48 prod {0xFD `%`_u32(123):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `AVGRU`_vbinop_) - ;; A-binary.watsup:771.5-771.72 - prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) ;; A-binary.watsup:772.5-772.72 + prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; A-binary.watsup:773.5-773.72 prod {0xFD `%`_u32(125):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:776.5-776.42 - prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) ;; A-binary.watsup:777.5-777.42 + prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) + ;; A-binary.watsup:778.5-778.42 prod {0xFD `%`_u32(129):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NEG_vunop_) - ;; A-binary.watsup:781.5-781.55 + ;; A-binary.watsup:782.5-782.55 prod {0xFD `%`_u32(130):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `Q15MULR_SATS`_vbinop_) - ;; A-binary.watsup:785.5-785.49 + ;; A-binary.watsup:783.5-783.59 + prod {0xFD `%`_u32(273):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `RELAXED_Q15MULRS`_vbinop_) + ;; A-binary.watsup:787.5-787.49 prod {0xFD `%`_u32(131):Bu32} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:789.5-789.41 + ;; A-binary.watsup:791.5-791.41 prod {0xFD `%`_u32(132):Bu32} => VBITMASK_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8))) - ;; A-binary.watsup:793.5-793.53 + ;; A-binary.watsup:795.5-795.53 prod {0xFD `%`_u32(133):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), S_sx) - ;; A-binary.watsup:794.5-794.53 + ;; A-binary.watsup:796.5-796.53 prod {0xFD `%`_u32(134):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), U_sx) - ;; A-binary.watsup:798.5-798.65 + ;; A-binary.watsup:800.5-800.65 prod {0xFD `%`_u32(135):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:799.5-799.66 + ;; A-binary.watsup:801.5-801.66 prod {0xFD `%`_u32(136):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:800.5-800.65 + ;; A-binary.watsup:802.5-802.65 prod {0xFD `%`_u32(137):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:801.5-801.66 + ;; A-binary.watsup:803.5-803.66 prod {0xFD `%`_u32(138):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:805.5-805.45 + ;; A-binary.watsup:807.5-807.45 prod {0xFD `%`_u32(139):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHL_vshiftop_) - ;; A-binary.watsup:806.5-806.49 + ;; A-binary.watsup:808.5-808.49 prod {0xFD `%`_u32(140):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:807.5-807.49 + ;; A-binary.watsup:809.5-809.49 prod {0xFD `%`_u32(141):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:811.5-811.43 + ;; A-binary.watsup:813.5-813.43 prod {0xFD `%`_u32(142):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_vbinop_) - ;; A-binary.watsup:812.5-812.51 + ;; A-binary.watsup:814.5-814.51 prod {0xFD `%`_u32(143):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:813.5-813.51 + ;; A-binary.watsup:815.5-815.51 prod {0xFD `%`_u32(144):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:814.5-814.43 + ;; A-binary.watsup:816.5-816.43 prod {0xFD `%`_u32(145):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_vbinop_) - ;; A-binary.watsup:815.5-815.51 + ;; A-binary.watsup:817.5-817.51 prod {0xFD `%`_u32(146):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:816.5-816.51 + ;; A-binary.watsup:818.5-818.51 prod {0xFD `%`_u32(147):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:817.5-817.43 + ;; A-binary.watsup:819.5-819.43 prod {0xFD `%`_u32(149):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MUL_vbinop_) - ;; A-binary.watsup:818.5-818.47 + ;; A-binary.watsup:820.5-820.47 prod {0xFD `%`_u32(150):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:819.5-819.47 + ;; A-binary.watsup:821.5-821.47 prod {0xFD `%`_u32(151):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:820.5-820.47 + ;; A-binary.watsup:822.5-822.47 prod {0xFD `%`_u32(152):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:821.5-821.47 + ;; A-binary.watsup:823.5-823.47 prod {0xFD `%`_u32(153):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:822.5-822.48 + ;; A-binary.watsup:824.5-824.48 prod {0xFD `%`_u32(155):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `AVGRU`_vbinop_) - ;; A-binary.watsup:826.5-826.68 + ;; A-binary.watsup:828.5-828.68 prod {0xFD `%`_u32(156):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:827.5-827.69 + ;; A-binary.watsup:829.5-829.69 prod {0xFD `%`_u32(157):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:828.5-828.68 + ;; A-binary.watsup:830.5-830.68 prod {0xFD `%`_u32(158):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:829.5-829.69 + ;; A-binary.watsup:831.5-831.69 prod {0xFD `%`_u32(159):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:833.5-833.72 + ;; A-binary.watsup:832.5-832.69 + prod {0xFD `%`_u32(274):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), `RELAXED_DOTS`_vextbinop__) + ;; A-binary.watsup:836.5-836.72 prod {0xFD `%`_u32(126):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; A-binary.watsup:834.5-834.72 + ;; A-binary.watsup:837.5-837.72 prod {0xFD `%`_u32(127):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:838.5-838.42 + ;; A-binary.watsup:841.5-841.42 prod {0xFD `%`_u32(160):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:839.5-839.42 + ;; A-binary.watsup:842.5-842.42 prod {0xFD `%`_u32(161):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:843.5-843.49 + ;; A-binary.watsup:846.5-846.49 prod {0xFD `%`_u32(163):Bu32} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:847.5-847.41 + ;; A-binary.watsup:850.5-850.41 prod {0xFD `%`_u32(164):Bu32} => VBITMASK_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4))) - ;; A-binary.watsup:851.5-851.65 + ;; A-binary.watsup:854.5-854.65 prod {0xFD `%`_u32(167):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:852.5-852.66 + ;; A-binary.watsup:855.5-855.66 prod {0xFD `%`_u32(168):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:853.5-853.65 + ;; A-binary.watsup:856.5-856.65 prod {0xFD `%`_u32(169):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:854.5-854.66 + ;; A-binary.watsup:857.5-857.66 prod {0xFD `%`_u32(170):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:858.5-858.45 + ;; A-binary.watsup:861.5-861.45 prod {0xFD `%`_u32(171):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHL_vshiftop_) - ;; A-binary.watsup:859.5-859.49 + ;; A-binary.watsup:862.5-862.49 prod {0xFD `%`_u32(172):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:860.5-860.49 + ;; A-binary.watsup:863.5-863.49 prod {0xFD `%`_u32(173):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:864.5-864.43 + ;; A-binary.watsup:867.5-867.43 prod {0xFD `%`_u32(174):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:865.5-865.43 + ;; A-binary.watsup:868.5-868.43 prod {0xFD `%`_u32(177):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:866.5-866.43 + ;; A-binary.watsup:869.5-869.43 prod {0xFD `%`_u32(181):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:867.5-867.47 + ;; A-binary.watsup:870.5-870.47 prod {0xFD `%`_u32(182):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:868.5-868.47 + ;; A-binary.watsup:871.5-871.47 prod {0xFD `%`_u32(183):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:869.5-869.47 + ;; A-binary.watsup:872.5-872.47 prod {0xFD `%`_u32(184):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:870.5-870.47 + ;; A-binary.watsup:873.5-873.47 prod {0xFD `%`_u32(185):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:874.5-874.61 + ;; A-binary.watsup:877.5-877.61 prod {0xFD `%`_u32(186):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `DOTS`_vextbinop__) - ;; A-binary.watsup:875.5-875.68 + ;; A-binary.watsup:878.5-878.68 prod {0xFD `%`_u32(188):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:876.5-876.69 + ;; A-binary.watsup:879.5-879.69 prod {0xFD `%`_u32(189):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:877.5-877.68 + ;; A-binary.watsup:880.5-880.68 prod {0xFD `%`_u32(190):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:878.5-878.69 + ;; A-binary.watsup:881.5-881.69 prod {0xFD `%`_u32(191):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:882.5-882.42 + ;; A-binary.watsup:885.5-885.74 + prod {0xFD `%`_u32(275):Bu32} => VEXTTERNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `RELAXED_DOT_ADDS`_vextternop__) + ;; A-binary.watsup:889.5-889.42 prod {0xFD `%`_u32(192):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:883.5-883.42 + ;; A-binary.watsup:890.5-890.42 prod {0xFD `%`_u32(193):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:887.5-887.49 + ;; A-binary.watsup:894.5-894.49 prod {0xFD `%`_u32(195):Bu32} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:891.5-891.41 + ;; A-binary.watsup:898.5-898.41 prod {0xFD `%`_u32(196):Bu32} => VBITMASK_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2))) - ;; A-binary.watsup:895.5-895.65 + ;; A-binary.watsup:902.5-902.65 prod {0xFD `%`_u32(199):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:896.5-896.66 + ;; A-binary.watsup:903.5-903.66 prod {0xFD `%`_u32(200):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:897.5-897.65 + ;; A-binary.watsup:904.5-904.65 prod {0xFD `%`_u32(201):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:898.5-898.66 + ;; A-binary.watsup:905.5-905.66 prod {0xFD `%`_u32(202):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:902.5-902.45 + ;; A-binary.watsup:909.5-909.45 prod {0xFD `%`_u32(203):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHL_vshiftop_) - ;; A-binary.watsup:903.5-903.49 + ;; A-binary.watsup:910.5-910.49 prod {0xFD `%`_u32(204):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:904.5-904.49 + ;; A-binary.watsup:911.5-911.49 prod {0xFD `%`_u32(205):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:908.5-908.43 + ;; A-binary.watsup:915.5-915.43 prod {0xFD `%`_u32(206):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:909.5-909.43 + ;; A-binary.watsup:916.5-916.43 prod {0xFD `%`_u32(209):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:910.5-910.43 + ;; A-binary.watsup:917.5-917.43 prod {0xFD `%`_u32(213):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:914.5-914.42 + ;; A-binary.watsup:921.5-921.42 prod {0xFD `%`_u32(214):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), EQ_vrelop_) - ;; A-binary.watsup:915.5-915.42 + ;; A-binary.watsup:922.5-922.42 prod {0xFD `%`_u32(215):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NE_vrelop_) - ;; A-binary.watsup:916.5-916.46 + ;; A-binary.watsup:923.5-923.46 prod {0xFD `%`_u32(216):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LT_vrelop_(S_sx)) - ;; A-binary.watsup:917.5-917.46 + ;; A-binary.watsup:924.5-924.46 prod {0xFD `%`_u32(217):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GT_vrelop_(S_sx)) - ;; A-binary.watsup:918.5-918.46 + ;; A-binary.watsup:925.5-925.46 prod {0xFD `%`_u32(218):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LE_vrelop_(S_sx)) - ;; A-binary.watsup:919.5-919.46 + ;; A-binary.watsup:926.5-926.46 prod {0xFD `%`_u32(219):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GE_vrelop_(S_sx)) - ;; A-binary.watsup:923.5-923.68 + ;; A-binary.watsup:930.5-930.68 prod {0xFD `%`_u32(220):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:924.5-924.69 + ;; A-binary.watsup:931.5-931.69 prod {0xFD `%`_u32(221):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:925.5-925.68 + ;; A-binary.watsup:932.5-932.68 prod {0xFD `%`_u32(222):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:926.5-926.69 + ;; A-binary.watsup:933.5-933.69 prod {0xFD `%`_u32(223):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:930.5-930.43 + ;; A-binary.watsup:937.5-937.43 prod {0xFD `%`_u32(103):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), CEIL_vunop_) - ;; A-binary.watsup:931.5-931.44 + ;; A-binary.watsup:938.5-938.44 prod {0xFD `%`_u32(104):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), FLOOR_vunop_) - ;; A-binary.watsup:932.5-932.44 + ;; A-binary.watsup:939.5-939.44 prod {0xFD `%`_u32(105):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_vunop_) - ;; A-binary.watsup:933.5-933.46 + ;; A-binary.watsup:940.5-940.46 prod {0xFD `%`_u32(106):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEAREST_vunop_) - ;; A-binary.watsup:934.5-934.42 + ;; A-binary.watsup:941.5-941.42 prod {0xFD `%`_u32(224):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:935.5-935.42 + ;; A-binary.watsup:942.5-942.42 prod {0xFD `%`_u32(225):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:936.5-936.43 + ;; A-binary.watsup:943.5-943.43 prod {0xFD `%`_u32(227):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SQRT_vunop_) - ;; A-binary.watsup:940.5-940.43 + ;; A-binary.watsup:947.5-947.43 prod {0xFD `%`_u32(228):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:941.5-941.43 + ;; A-binary.watsup:948.5-948.43 prod {0xFD `%`_u32(229):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:942.5-942.43 + ;; A-binary.watsup:949.5-949.43 prod {0xFD `%`_u32(230):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:943.5-943.43 + ;; A-binary.watsup:950.5-950.43 prod {0xFD `%`_u32(231):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), DIV_vbinop_) - ;; A-binary.watsup:944.5-944.43 + ;; A-binary.watsup:951.5-951.43 prod {0xFD `%`_u32(232):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MIN_vbinop_) - ;; A-binary.watsup:945.5-945.43 + ;; A-binary.watsup:952.5-952.43 prod {0xFD `%`_u32(233):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MAX_vbinop_) - ;; A-binary.watsup:946.5-946.44 + ;; A-binary.watsup:953.5-953.44 prod {0xFD `%`_u32(234):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMIN_vbinop_) - ;; A-binary.watsup:947.5-947.44 + ;; A-binary.watsup:954.5-954.44 prod {0xFD `%`_u32(235):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMAX_vbinop_) - ;; A-binary.watsup:951.5-951.43 + ;; A-binary.watsup:955.5-955.51 + prod {0xFD `%`_u32(269):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:956.5-956.51 + prod {0xFD `%`_u32(270):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:960.5-960.53 + prod {0xFD `%`_u32(261):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:961.5-961.54 + prod {0xFD `%`_u32(262):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:965.5-965.43 prod {0xFD `%`_u32(116):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), CEIL_vunop_) - ;; A-binary.watsup:952.5-952.44 + ;; A-binary.watsup:966.5-966.44 prod {0xFD `%`_u32(117):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), FLOOR_vunop_) - ;; A-binary.watsup:953.5-953.44 + ;; A-binary.watsup:967.5-967.44 prod {0xFD `%`_u32(122):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_vunop_) - ;; A-binary.watsup:954.5-954.46 + ;; A-binary.watsup:968.5-968.46 prod {0xFD `%`_u32(148):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEAREST_vunop_) - ;; A-binary.watsup:955.5-955.42 + ;; A-binary.watsup:969.5-969.42 prod {0xFD `%`_u32(236):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:956.5-956.42 + ;; A-binary.watsup:970.5-970.42 prod {0xFD `%`_u32(237):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:957.5-957.43 + ;; A-binary.watsup:971.5-971.43 prod {0xFD `%`_u32(239):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SQRT_vunop_) - ;; A-binary.watsup:961.5-961.43 + ;; A-binary.watsup:975.5-975.43 prod {0xFD `%`_u32(240):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:962.5-962.43 + ;; A-binary.watsup:976.5-976.43 prod {0xFD `%`_u32(241):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:963.5-963.43 + ;; A-binary.watsup:977.5-977.43 prod {0xFD `%`_u32(242):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:964.5-964.43 + ;; A-binary.watsup:978.5-978.43 prod {0xFD `%`_u32(243):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), DIV_vbinop_) - ;; A-binary.watsup:965.5-965.43 + ;; A-binary.watsup:979.5-979.43 prod {0xFD `%`_u32(244):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MIN_vbinop_) - ;; A-binary.watsup:966.5-966.43 + ;; A-binary.watsup:980.5-980.43 prod {0xFD `%`_u32(245):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MAX_vbinop_) - ;; A-binary.watsup:967.5-967.44 + ;; A-binary.watsup:981.5-981.44 prod {0xFD `%`_u32(246):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMIN_vbinop_) - ;; A-binary.watsup:968.5-968.44 + ;; A-binary.watsup:982.5-982.44 prod {0xFD `%`_u32(247):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMAX_vbinop_) - ;; A-binary.watsup:972.5-972.61 + ;; A-binary.watsup:983.5-983.51 + prod {0xFD `%`_u32(271):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:984.5-984.51 + prod {0xFD `%`_u32(272):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:988.5-988.53 + prod {0xFD `%`_u32(263):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:989.5-989.54 + prod {0xFD `%`_u32(264):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:993.5-993.61 prod {0xFD `%`_u32(94):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), DEMOTE_vcvtop__, ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:973.5-973.61 + ;; A-binary.watsup:994.5-994.61 prod {0xFD `%`_u32(95):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(F32_lanetype, `%`_dim(4)), PROMOTE_vcvtop__, ?(LOW_half__), ?()) - ;; A-binary.watsup:974.5-974.64 + ;; A-binary.watsup:995.5-995.64 prod {0xFD `%`_u32(248):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:975.5-975.64 + ;; A-binary.watsup:996.5-996.64 prod {0xFD `%`_u32(249):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:976.5-976.62 + ;; A-binary.watsup:997.5-997.62 prod {0xFD `%`_u32(250):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:977.5-977.62 + ;; A-binary.watsup:998.5-998.62 prod {0xFD `%`_u32(251):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:978.5-978.69 + ;; A-binary.watsup:999.5-999.69 prod {0xFD `%`_u32(252):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:979.5-979.69 + ;; A-binary.watsup:1000.5-1000.69 prod {0xFD `%`_u32(253):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:980.5-980.66 + ;; A-binary.watsup:1001.5-1001.66 prod {0xFD `%`_u32(254):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:981.5-981.66 + ;; A-binary.watsup:1002.5-1002.66 prod {0xFD `%`_u32(255):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(LOW_half__), ?()) + ;; A-binary.watsup:1003.5-1003.68 + prod {0xFD `%`_u32(257):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?()) + ;; A-binary.watsup:1004.5-1004.68 + prod {0xFD `%`_u32(258):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?()) + ;; A-binary.watsup:1005.5-1005.73 + prod {0xFD `%`_u32(259):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) + ;; A-binary.watsup:1006.5-1006.73 + prod {0xFD `%`_u32(260):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) } ;; A-binary.watsup diff --git a/spectec/test-interpreter/TEST.md b/spectec/test-interpreter/TEST.md index f8ba62e791..d2d2a3a027 100644 --- a/spectec/test-interpreter/TEST.md +++ b/spectec/test-interpreter/TEST.md @@ -1163,6 +1163,27 @@ watsup 0.4 generator ===== ../../test-interpreter/spec-test-3/ref_null.wast ===== - 36/36 (100.00%) +===== ../../test-interpreter/spec-test-3/relaxed-simd/i16x8_relaxed_q15mulr_s.wast ===== +- 4/4 (100.00%) + +===== ../../test-interpreter/spec-test-3/relaxed-simd/i32x4_relaxed_trunc.wast ===== +- 18/18 (100.00%) + +===== ../../test-interpreter/spec-test-3/relaxed-simd/i8x16_relaxed_swizzle.wast ===== +- 7/7 (100.00%) + +===== ../../test-interpreter/spec-test-3/relaxed-simd/relaxed_dot_product.wast ===== +- 12/12 (100.00%) + +===== ../../test-interpreter/spec-test-3/relaxed-simd/relaxed_laneselect.wast ===== +- 13/13 (100.00%) + +===== ../../test-interpreter/spec-test-3/relaxed-simd/relaxed_madd_nmadd.wast ===== +- 21/21 (100.00%) + +===== ../../test-interpreter/spec-test-3/relaxed-simd/relaxed_min_max.wast ===== +- 26/26 (100.00%) + ===== ../../test-interpreter/spec-test-3/return.wast ===== - 85/85 (100.00%) @@ -1451,7 +1472,7 @@ watsup 0.4 generator ===== ../../test-interpreter/spec-test-3/utf8-invalid-encoding.wast ===== - 0/0 (100.00%) -Total [51220/51220] (100.00%) +Total [51321/51321] (100.00%) == Complete. ``` diff --git a/spectec/test-latex/TEST.md b/spectec/test-latex/TEST.md index 4401873aeb..69d229e0be 100644 --- a/spectec/test-latex/TEST.md +++ b/spectec/test-latex/TEST.md @@ -2260,6 +2260,13 @@ $$ \end{array} $$ +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{\Pi}\, \epsilon & = & 1 \\ +{\Pi}\, n~{{n'}^\ast} & = & n \cdot {\Pi}\, {{n'}^\ast} \\ +\end{array} +$$ + \vspace{1ex} $$ @@ -2333,6 +2340,8 @@ $$ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lrrl@{}l@{}} & {\mathit{list}}(X) & ::= & {X^\ast} & \quad \mbox{if}~ {|{X^\ast}|} < {2^{32}} \\ @@ -2754,6 +2763,14 @@ $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} +& {{\mathit{half}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{low} ~|~ \mathsf{high} & \quad \mbox{if}~ 2 \cdot N_1 = N_1 \\ +& {{\mathit{half}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{low} & \quad \mbox{if}~ 2 \cdot N_1 = N_1 = \mathsf{{\scriptstyle 64}} \\ +\end{array} +$$ + +$$ +\begin{array}[t]{@{}lrrl@{}l@{}} +& {{\mathit{zero}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{zero} & \quad \mbox{if}~ 2 \cdot N_2 = N_1 = \mathsf{{\scriptstyle 64}} \\ & {\mathit{vvunop}} & ::= & \mathsf{not} \\ & {\mathit{vvbinop}} & ::= & \mathsf{and} ~|~ \mathsf{andnot} ~|~ \mathsf{or} ~|~ \mathsf{xor} \\ & {\mathit{vvternop}} & ::= & \mathsf{bitselect} \\ @@ -2778,9 +2795,17 @@ $$ & & | & \mathsf{mul} & \quad \mbox{if}~ N \geq \mathsf{{\scriptstyle 16}} \\ & & | & {\mathsf{avgr}}{\mathsf{\_}}{\mathsf{u}} & \quad \mbox{if}~ N \leq \mathsf{{\scriptstyle 16}} \\ & & | & {\mathsf{q{\scriptstyle 15}mulr\_sat}}{\mathsf{\_}}{\mathsf{s}} & \quad \mbox{if}~ N = \mathsf{{\scriptstyle 16}} \\ +& & | & {\mathsf{relaxed\_q{\scriptstyle 15}mulr}}{\mathsf{\_}}{\mathsf{s}} & \quad \mbox{if}~ N = \mathsf{{\scriptstyle 16}} \\ & & | & {\mathsf{min}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ N \leq \mathsf{{\scriptstyle 32}} \\ & & | & {\mathsf{max}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ N \leq \mathsf{{\scriptstyle 32}} \\ -& {{\mathit{vbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}} & ::= & \mathsf{add} ~|~ \mathsf{sub} ~|~ \mathsf{mul} ~|~ \mathsf{div} ~|~ \mathsf{min} ~|~ \mathsf{max} ~|~ \mathsf{pmin} ~|~ \mathsf{pmax} \\ +& {{\mathit{vbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}} & ::= & \mathsf{add} ~|~ \mathsf{sub} ~|~ \mathsf{mul} ~|~ \mathsf{div} ~|~ \mathsf{min} ~|~ \mathsf{max} ~|~ \mathsf{pmin} ~|~ \mathsf{pmax} ~|~ \mathsf{relaxed\_min} ~|~ \mathsf{relaxed\_max} \\ +\end{array} +$$ + +$$ +\begin{array}[t]{@{}lrrl@{}l@{}} +& {{\mathit{vternop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}} & ::= & \mathsf{relaxed\_laneselect} \\ +& {{\mathit{vternop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}} & ::= & \mathsf{relaxed\_madd} ~|~ \mathsf{relaxed\_nmadd} \\ \end{array} $$ @@ -2806,6 +2831,7 @@ $$ & {{\mathit{vcvtop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{extend}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ N_2 = 2 \cdot N_1 \\ & {{\mathit{vcvtop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ N_2 \geq N_1 = \mathsf{{\scriptstyle 32}} \\ & {{\mathit{vcvtop}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ N_1 \geq N_2 = \mathsf{{\scriptstyle 32}} \\ +& & | & {\mathsf{relaxed\_trunc}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ N_1 \geq N_2 = \mathsf{{\scriptstyle 32}} \\ & {{\mathit{vcvtop}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{demote} & \quad \mbox{if}~ N_1 > N_2 \\ & & | & \mathsf{promote} & \quad \mbox{if}~ N_1 < N_2 \\ \end{array} @@ -2813,33 +2839,33 @@ $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {{\mathit{half}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{low} ~|~ \mathsf{high} & \quad \mbox{if}~ 2 \cdot N_1 = N_1 \\ -& {{\mathit{half}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{low} & \quad \mbox{if}~ 2 \cdot N_1 = N_1 = \mathsf{{\scriptstyle 64}} \\ +& {{\mathit{vswizzlop}}}_{{\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M}} & ::= & \mathsf{swizzle} ~|~ \mathsf{relaxed\_swizzle} \\ \end{array} $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {{\mathit{zero}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & \mathsf{zero} & \quad \mbox{if}~ 2 \cdot N_2 = N_1 = \mathsf{{\scriptstyle 64}} \\ +& {{\mathit{vshiftop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}} & ::= & \mathsf{shl} ~|~ {\mathsf{shr}}{\mathsf{\_}}{{\mathit{sx}}} \\ \end{array} $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {{\mathit{vshiftop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}} & ::= & \mathsf{shl} ~|~ {\mathsf{shr}}{\mathsf{\_}}{{\mathit{sx}}} \\ +& {{\mathit{vextunop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{extadd\_pairwise}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ 16 \leq 2 \cdot N_1 = N_2 \leq \mathsf{{\scriptstyle 32}} \\ \end{array} $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {{\mathit{vextunop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{extadd\_pairwise}}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ 16 \leq 2 \cdot N_1 = N_2 \leq \mathsf{{\scriptstyle 32}} \\ +& {{\mathit{vextbinop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{extmul}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{half}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}} & \quad \mbox{if}~ 2 \cdot N_1 = N_2 \geq \mathsf{{\scriptstyle 16}} \\ +& & | & {\mathsf{dot}}{\mathsf{\_}}{\mathsf{s}} & \quad \mbox{if}~ 2 \cdot N_1 = N_2 = \mathsf{{\scriptstyle 32}} \\ +& & | & {\mathsf{relaxed\_dot}}{\mathsf{\_}}{\mathsf{s}} & \quad \mbox{if}~ 2 \cdot N_1 = N_2 = \mathsf{{\scriptstyle 16}} \\ \end{array} $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {{\mathit{vextbinop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{extmul}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{half}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}} & \quad \mbox{if}~ 2 \cdot N_1 = N_2 \geq \mathsf{{\scriptstyle 16}} \\ -& & | & {\mathsf{dot}}{\mathsf{\_}}{\mathsf{s}} & \quad \mbox{if}~ 2 \cdot N_1 = N_2 = \mathsf{{\scriptstyle 32}} \\ +& {{\mathit{vextternop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}} & ::= & {\mathsf{relaxed\_dot\_add}}{\mathsf{\_}}{\mathsf{s}} & \quad \mbox{if}~ 4 \cdot N_1 = N_2 = \mathsf{{\scriptstyle 32}} \\ \end{array} $$ @@ -2923,16 +2949,18 @@ $$ & & | & {\mathit{vectype}} {.} {\mathit{vvtestop}} \\ & & | & {\mathit{shape}} {.} {{\mathit{vunop}}}_{{\mathit{shape}}} \\ & & | & {\mathit{shape}} {.} {{\mathit{vbinop}}}_{{\mathit{shape}}} \\ +& & | & {\mathit{shape}} {.} {{\mathit{vternop}}}_{{\mathit{shape}}} \\ & & | & {\mathit{shape}} {.} {{\mathit{vtestop}}}_{{\mathit{shape}}} \\ & & | & {\mathit{shape}} {.} {{\mathit{vrelop}}}_{{\mathit{shape}}} \\ & & | & {\mathit{ishape}} {.} {{\mathit{vshiftop}}}_{{\mathit{ishape}}} \\ & & | & {\mathit{ishape}}{.}\mathsf{bitmask} \\ -& & | & {\mathit{ishape}}{.}\mathsf{swizzle} & \quad \mbox{if}~ {\mathit{ishape}} = {\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{\mathsf{{\scriptstyle 16}}} \\ +& & | & {\mathit{ishape}} {.} {{\mathit{vswizzlop}}}_{{\mathit{ishape}}} \\ & & | & {\mathit{ishape}}{.}\mathsf{shuffle}~{{\mathit{laneidx}}^\ast} & \quad \mbox{if}~ {\mathit{ishape}} = {\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{\mathsf{{\scriptstyle 16}}} \land {|{{\mathit{laneidx}}^\ast}|} = \mathsf{{\scriptstyle 16}} \\ & & | & {\mathit{ishape}}_1 {.} {{{\mathit{vextunop}}}_{{\mathit{ishape}}_2, {\mathit{ishape}}_1}}{\mathsf{\_}}{{\mathit{ishape}}_2} \\ & & | & {\mathit{ishape}}_1 {.} {{{\mathit{vextbinop}}}_{{\mathit{ishape}}_2, {\mathit{ishape}}_1}}{\mathsf{\_}}{{\mathit{ishape}}_2} \\ +& & | & {\mathit{ishape}}_1 {.} {{{\mathit{vextternop}}}_{{\mathit{ishape}}_2, {\mathit{ishape}}_1}}{\mathsf{\_}}{{\mathit{ishape}}_2} \\ & & | & {{\mathit{ishape}}_1{.}\mathsf{narrow}}{\mathsf{\_}}{{\mathit{ishape}}_2}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ {|{\mathrm{lanetype}}({\mathit{ishape}}_2)|} = 2 \cdot {|{\mathrm{lanetype}}({\mathit{ishape}}_1)|} \leq \mathsf{{\scriptstyle 32}} \\ -& & | & {\mathit{shape}}_1 {.} {{{\mathit{vcvtop}}}_{{\mathit{shape}}_2, {\mathit{shape}}_1}}{\mathsf{\_}}{{{{\mathit{zero}}}_{{\mathit{shape}}_2, {\mathit{shape}}_1}^?}}{\mathsf{\_}}{{\mathit{shape}}_2}{\mathsf{\_}}{{{{\mathit{half}}}_{{\mathit{shape}}_2, {\mathit{shape}}_1}^?}} & \quad \mbox{if}~ {\mathrm{lanetype}}({\mathit{shape}}_1) \neq {\mathrm{lanetype}}({\mathit{shape}}_2) \\ +& & | & {\mathit{shape}}_1 {.} {{{\mathit{vcvtop}}}_{{\mathit{shape}}_2, {\mathit{shape}}_1}}{\mathsf{\_}}{{{{\mathit{zero}}}_{{\mathit{shape}}_2, {\mathit{shape}}_1}^?}}{\mathsf{\_}}{{\mathit{shape}}_2}{\mathsf{\_}}{{{{\mathit{half}}}_{{\mathit{shape}}_2, {\mathit{shape}}_1}^?}} \\ & & | & {\mathit{shape}}{.}\mathsf{splat} \\ & & | & {{\mathit{shape}}{.}\mathsf{extract\_lane}}{\mathsf{\_}}{{{\mathit{sx}}^?}}~{\mathit{laneidx}} & \quad \mbox{if}~ {{\mathit{sx}}^?} = \epsilon \Leftrightarrow {\mathrm{lanetype}}({\mathit{shape}}) = {\mathit{numtype}} \\ & & | & {\mathit{shape}}{.}\mathsf{replace\_lane}~{\mathit{laneidx}} \\ @@ -3586,11 +3614,12 @@ $$ {\mathrm{free}}_{\mathit{instr}}({\mathit{vectype}} {.} {\mathit{vvtestop}}) & = & {\mathrm{free}}_{\mathit{vectype}}({\mathit{vectype}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{shape}} {.} {\mathit{vunop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{shape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{shape}} {.} {\mathit{vbinop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{shape}}) \\ +{\mathrm{free}}_{\mathit{instr}}({\mathit{shape}} {.} {\mathit{vternop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{shape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{shape}} {.} {\mathit{vtestop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{shape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{shape}} {.} {\mathit{vrelop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{shape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{ishape}} {.} {\mathit{vshiftop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{ishape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{ishape}}{.}\mathsf{bitmask}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{ishape}}) \\ -{\mathrm{free}}_{\mathit{instr}}({\mathit{ishape}}{.}\mathsf{swizzle}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{ishape}}) \\ +{\mathrm{free}}_{\mathit{instr}}({\mathit{ishape}} {.} {\mathit{vswizzlop}}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{ishape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{ishape}}{.}\mathsf{shuffle}~{{\mathit{laneidx}}^\ast}) & = & {\mathrm{free}}_{\mathit{shape}}({\mathit{ishape}}) \\ {\mathrm{free}}_{\mathit{instr}}({\mathit{ishape}}_1 {.} {{\mathit{vextunop}}}{\mathsf{\_}}{{\mathit{ishape}}_2}) & = & & \\ \multicolumn{4}{@{}l@{}}{\quad @@ -4262,18 +4291,24 @@ $$ \vspace{1ex} -\vspace{1ex} +$$ +\begin{array}[t]{@{}lrrl@{}l@{}} +& {\mathit{relaxed{\kern-0.1em\scriptstyle 2}}} & ::= & 0 ~|~ 1 \\ +& {\mathit{relaxed{\kern-0.1em\scriptstyle 4}}} & ::= & 0 ~|~ 1 ~|~ 2 ~|~ 3 \\ +\end{array} +$$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{signed}}}_{N}(i) & = & i & \quad \mbox{if}~ 0 \leq {2^{N - 1}} \\ -{{\mathrm{signed}}}_{N}(i) & = & i - {2^{N}} & \quad \mbox{if}~ {2^{N - 1}} \leq i < {2^{N}} \\ +{{\mathrm{relaxed}}(i)}{{}[ X_1, X_2 ]} & = & (X_1~X_2){}[i] & \quad \mbox{if}~ {\mathrm{ND}} \\ +{{\mathrm{relaxed}}(i)}{{}[ X_1, X_2 ]} & = & (X_1~X_2){}[0] & \mbox{otherwise} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{{{\mathrm{signed}}}_{N}^{{-1}}}}{(i)} & = & j & \quad \mbox{if}~ {{\mathrm{signed}}}_{N}(j) = i \\ +{{\mathrm{relaxed}}(i)}{{}[ X_1, X_2, X_3, X_4 ]} & = & (X_1~X_2~X_3~X_4){}[i] & \quad \mbox{if}~ {\mathrm{ND}} \\ +{{\mathrm{relaxed}}(i)}{{}[ X_1, X_2, X_3, X_4 ]} & = & (X_1~X_2~X_3~X_4){}[0] & \mbox{otherwise} \\ \end{array} $$ @@ -4281,15 +4316,18 @@ $$ \vspace{1ex} +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{{{\mathrm{bytes}}}_{{\mathsf{i}}{N}}^{{-1}}}}{({b^\ast})} & = & n & \quad \mbox{if}~ {{\mathrm{bytes}}}_{{\mathsf{i}}{N}}(n) = {b^\ast} \\ +{{\mathrm{signed}}}_{N}(i) & = & i & \quad \mbox{if}~ 0 \leq {2^{N - 1}} \\ +{{\mathrm{signed}}}_{N}(i) & = & i - {2^{N}} & \quad \mbox{if}~ {2^{N - 1}} \leq i < {2^{N}} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{{{\mathrm{bytes}}}_{{\mathsf{f}}{N}}^{{-1}}}}{({b^\ast})} & = & p & \quad \mbox{if}~ {{\mathrm{bytes}}}_{{\mathsf{f}}{N}}(p) = {b^\ast} \\ +{{{{\mathrm{signed}}}_{N}^{{-1}}}}{(i)} & = & j & \quad \mbox{if}~ {{\mathrm{signed}}}_{N}(j) = i \\ \end{array} $$ @@ -4297,144 +4335,169 @@ $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{add}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{iadd}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{sub}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{isub}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{mul}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{imul}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{{\mathsf{div}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{idiv}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ -{{\mathsf{rem}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{irem}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ -{\mathsf{and}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{iand}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{or}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ior}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{xor}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ixor}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{shl}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ishl}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{{\mathsf{shr}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ishr}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ -{\mathsf{rotl}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{irotl}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{rotr}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{irotr}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{{\mathrm{sat\_u}}}_{N}(i) & = & 0 & \quad \mbox{if}~ i < 0 \\ +{{\mathrm{sat\_u}}}_{N}(i) & = & {2^{N}} - 1 & \quad \mbox{if}~ i > {2^{N}} - 1 \\ +{{\mathrm{sat\_u}}}_{N}(i) & = & i & \mbox{otherwise} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{clz}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{iclz}}}_{N}({\mathit{iN}}) \\ -{\mathsf{ctz}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{ictz}}}_{N}({\mathit{iN}}) \\ -{\mathsf{popcnt}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{ipopcnt}}}_{N}({\mathit{iN}}) \\ -{{\mathsf{extend}}{M}{\mathsf{\_}}{\mathsf{s}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{{{\mathrm{extend}}}_{M, N}^{\mathsf{s}}}}{({{\mathrm{wrap}}}_{N, M}({\mathit{iN}}))} \\ +{{\mathrm{sat\_s}}}_{N}(i) & = & {-{2^{N - 1}}} & \quad \mbox{if}~ i < {-{2^{N - 1}}} \\ +{{\mathrm{sat\_s}}}_{N}(i) & = & {2^{N - 1}} - 1 & \quad \mbox{if}~ i > {2^{N - 1}} - 1 \\ +{{\mathrm{sat\_s}}}_{N}(i) & = & i & \mbox{otherwise} \\ \end{array} $$ +\vspace{1ex} + +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{eqz}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{ieqz}}}_{N}({\mathit{iN}}) \\ +{{{{\mathrm{bytes}}}_{{\mathsf{i}}{N}}^{{-1}}}}{({b^\ast})} & = & n & \quad \mbox{if}~ {{\mathrm{bytes}}}_{{\mathsf{i}}{N}}(n) = {b^\ast} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{eq}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ieq}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{\mathsf{ne}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ine}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ -{{\mathsf{lt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ilt}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ -{{\mathsf{gt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{igt}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ -{{\mathsf{le}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ile}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ -{{\mathsf{ge}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ige}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{{{{\mathrm{bytes}}}_{{\mathsf{f}}{N}}^{{-1}}}}{({b^\ast})} & = & p & \quad \mbox{if}~ {{\mathrm{bytes}}}_{{\mathsf{f}}{N}}(p) = {b^\ast} \\ \end{array} $$ +\vspace{1ex} + +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{add}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fadd}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{sub}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fsub}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{mul}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fmul}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{div}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fdiv}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{min}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fmin}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{max}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fmax}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{copysign}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fcopysign}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{{\mathrm{pack}}}_{{\mathit{numtype}}}(c) & = & c \\ +{{\mathrm{pack}}}_{{\mathit{packtype}}}(c) & = & {{\mathrm{wrap}}}_{{|{\mathrm{unpack}}({\mathit{packtype}})|}, {|{\mathit{packtype}}|}}(c) \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{abs}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fabs}}}_{N}({\mathit{fN}}) \\ -{\mathsf{neg}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fneg}}}_{N}({\mathit{fN}}) \\ -{\mathsf{sqrt}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fsqrt}}}_{N}({\mathit{fN}}) \\ -{\mathsf{ceil}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fceil}}}_{N}({\mathit{fN}}) \\ -{\mathsf{floor}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{ffloor}}}_{N}({\mathit{fN}}) \\ -{\mathsf{trunc}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{ftrunc}}}_{N}({\mathit{fN}}) \\ -{\mathsf{nearest}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fnearest}}}_{N}({\mathit{fN}}) \\ +{{\mathrm{unpack}}}_{{\mathit{numtype}}}(c) & = & c \\ +{{\mathrm{unpack}}}_{{\mathit{packtype}}}(c) & = & {{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, {|{\mathrm{unpack}}({\mathit{packtype}})|}}^{\mathsf{u}}}}{(c)} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{eq}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{feq}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{ne}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fne}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{lt}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{flt}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{gt}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fgt}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{le}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fle}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ -{\mathsf{ge}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fge}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{{\mathrm{pack}}}_{{\mathit{consttype}}}(c) & = & c \\ +{{\mathrm{pack}}}_{{\mathit{packtype}}}(c) & = & {{\mathrm{wrap}}}_{{|{\mathrm{unpack}}({\mathit{packtype}})|}, {|{\mathit{packtype}}|}}(c) \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathsf{extend}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{iN}}_1)} & = & {{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)} \\ -{\mathsf{wrap}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{iN}}_1)} & = & {{\mathrm{wrap}}}_{N_1, N_2}({\mathit{iN}}_1) \\ -{{\mathsf{trunc}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1)} & = & {{{{\mathrm{trunc}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{fN}}_1)} \\ -{{\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1)} & = & {{{{\mathrm{trunc\_sat}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{fN}}_1)} \\ -{{\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{iN}}_1)} & = & {{{{\mathrm{convert}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)} \\ -{\mathsf{promote}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{fN}}_1)} & = & {{\mathrm{promote}}}_{N_1, N_2}({\mathit{fN}}_1) \\ -{\mathsf{demote}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{fN}}_1)} & = & {{\mathrm{demote}}}_{N_1, N_2}({\mathit{fN}}_1) \\ -{\mathsf{reinterpret}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{iN}}_1)} & = & {{\mathrm{reinterpret}}}_{{{\mathsf{i}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{iN}}_1) & \quad \mbox{if}~ {|{{\mathsf{i}}{N}}_1|} = {|{{\mathsf{f}}{N}}_2|} \\ -{\mathsf{reinterpret}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1)} & = & {{\mathrm{reinterpret}}}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1) & \quad \mbox{if}~ {|{{\mathsf{f}}{N}}_1|} = {|{{\mathsf{i}}{N}}_2|} \\ +{{\mathrm{unpack}}}_{{\mathit{consttype}}}(c) & = & c \\ +{{\mathrm{unpack}}}_{{\mathit{packtype}}}(c) & = & {{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, {|{\mathrm{unpack}}({\mathit{packtype}})|}}^{\mathsf{u}}}}{(c)} \\ \end{array} $$ \vspace{1ex} +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{pack}}}_{{\mathit{numtype}}}(c) & = & c \\ -{{\mathrm{pack}}}_{{\mathit{packtype}}}(c) & = & {{\mathrm{wrap}}}_{{|{\mathrm{unpack}}({\mathit{packtype}})|}, {|{\mathit{packtype}}|}}(c) \\ +{{{{\mathrm{lanes}}}_{{\mathit{sh}}}^{{-1}}}}{({c^\ast})} & = & {\mathit{vc}} & \quad \mbox{if}~ {c^\ast} = {{\mathrm{lanes}}}_{{\mathit{sh}}}({\mathit{vc}}) \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{unpack}}}_{{\mathit{numtype}}}(c) & = & c \\ -{{\mathrm{unpack}}}_{{\mathit{packtype}}}(c) & = & {{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, {|{\mathrm{unpack}}({\mathit{packtype}})|}}^{\mathsf{u}}}}{(c)} \\ +{\mathrm{half}}(\mathsf{low}, i, j) & = & i \\ +{\mathrm{half}}(\mathsf{high}, i, j) & = & j \\ +{\mathrm{half}}(\mathsf{low}, i, j) & = & i \\ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{pack}}}_{{\mathit{consttype}}}(c) & = & c \\ -{{\mathrm{pack}}}_{{\mathit{packtype}}}(c) & = & {{\mathrm{wrap}}}_{{|{\mathrm{unpack}}({\mathit{packtype}})|}, {|{\mathit{packtype}}|}}(c) \\ +{\mathsf{clz}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{iclz}}}_{N}({\mathit{iN}}) \\ +{\mathsf{ctz}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{ictz}}}_{N}({\mathit{iN}}) \\ +{\mathsf{popcnt}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{ipopcnt}}}_{N}({\mathit{iN}}) \\ +{{\mathsf{extend}}{M}{\mathsf{\_}}{\mathsf{s}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{{{\mathrm{extend}}}_{M, N}^{\mathsf{s}}}}{({{\mathrm{wrap}}}_{N, M}({\mathit{iN}}))} \\ +{\mathsf{abs}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fabs}}}_{N}({\mathit{fN}}) \\ +{\mathsf{neg}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fneg}}}_{N}({\mathit{fN}}) \\ +{\mathsf{sqrt}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fsqrt}}}_{N}({\mathit{fN}}) \\ +{\mathsf{ceil}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fceil}}}_{N}({\mathit{fN}}) \\ +{\mathsf{floor}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{ffloor}}}_{N}({\mathit{fN}}) \\ +{\mathsf{trunc}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{ftrunc}}}_{N}({\mathit{fN}}) \\ +{\mathsf{nearest}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}})} & = & {{\mathrm{fnearest}}}_{N}({\mathit{fN}}) \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{unpack}}}_{{\mathit{consttype}}}(c) & = & c \\ -{{\mathrm{unpack}}}_{{\mathit{packtype}}}(c) & = & {{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, {|{\mathrm{unpack}}({\mathit{packtype}})|}}^{\mathsf{u}}}}{(c)} \\ +{\mathsf{add}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{iadd}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{sub}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{isub}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{mul}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{imul}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{{\mathsf{div}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{idiv}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{{\mathsf{rem}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{irem}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{\mathsf{and}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{iand}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{or}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ior}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{xor}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ixor}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{shl}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ishl}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{{\mathsf{shr}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ishr}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{\mathsf{rotl}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{irotl}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{rotr}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{irotr}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{add}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fadd}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{sub}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fsub}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{mul}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fmul}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{div}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fdiv}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{min}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fmin}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{max}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fmax}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{copysign}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fcopysign}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ \end{array} $$ -\vspace{1ex} - -\vspace{1ex} +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{\mathsf{eqz}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}})} & = & {{\mathrm{ieqz}}}_{N}({\mathit{iN}}) \\ +\end{array} +$$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{{{\mathrm{lanes}}}_{{\mathit{sh}}}^{{-1}}}}{({c^\ast})} & = & {\mathit{vc}} & \quad \mbox{if}~ {c^\ast} = {{\mathrm{lanes}}}_{{\mathit{sh}}}({\mathit{vc}}) \\ +{\mathsf{eq}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ieq}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{\mathsf{ne}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{\mathrm{ine}}}_{N}({\mathit{iN}}_1, {\mathit{iN}}_2) \\ +{{\mathsf{lt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ilt}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{{\mathsf{gt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{igt}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{{\mathsf{le}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ile}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{{\mathsf{ge}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{\mathsf{i}}{N}}({\mathit{iN}}_1, {\mathit{iN}}_2)} & = & {{{{\mathrm{ige}}}_{N}^{{\mathit{sx}}}}}{({\mathit{iN}}_1, {\mathit{iN}}_2)} \\ +{\mathsf{eq}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{feq}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{ne}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fne}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{lt}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{flt}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{gt}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fgt}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{le}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fle}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ +{\mathsf{ge}}{{}_{{\mathsf{f}}{N}}({\mathit{fN}}_1, {\mathit{fN}}_2)} & = & {{\mathrm{fge}}}_{N}({\mathit{fN}}_1, {\mathit{fN}}_2) \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathrm{half}}(\mathsf{low}, i, j) & = & i \\ -{\mathrm{half}}(\mathsf{high}, i, j) & = & j \\ -{\mathrm{half}}(\mathsf{low}, i, j) & = & i \\ +{{\mathsf{extend}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{iN}}_1)} & = & {{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)} \\ +{\mathsf{wrap}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{iN}}_1)} & = & {{\mathrm{wrap}}}_{N_1, N_2}({\mathit{iN}}_1) \\ +{{\mathsf{trunc}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1)} & = & {{{{\mathrm{trunc}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{fN}}_1)} \\ +{{\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1)} & = & {{{{\mathrm{trunc\_sat}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{fN}}_1)} \\ +{{\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{iN}}_1)} & = & {{{{\mathrm{convert}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)} \\ +{\mathsf{promote}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{fN}}_1)} & = & {{\mathrm{promote}}}_{N_1, N_2}({\mathit{fN}}_1) \\ +{\mathsf{demote}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{fN}}_1)} & = & {{\mathrm{demote}}}_{N_1, N_2}({\mathit{fN}}_1) \\ +{\mathsf{reinterpret}}{{}_{{{\mathsf{i}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{iN}}_1)} & = & {{\mathrm{reinterpret}}}_{{{\mathsf{i}}{N}}_1, {{\mathsf{f}}{N}}_2}({\mathit{iN}}_1) & \quad \mbox{if}~ {|{{\mathsf{i}}{N}}_1|} = {|{{\mathsf{f}}{N}}_2|} \\ +{\mathsf{reinterpret}}{{}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1)} & = & {{\mathrm{reinterpret}}}_{{{\mathsf{f}}{N}}_1, {{\mathsf{i}}{N}}_2}({\mathit{fN}}_1) & \quad \mbox{if}~ {|{{\mathsf{f}}{N}}_1|} = {|{{\mathsf{i}}{N}}_2|} \\ \end{array} $$ +\vspace{1ex} + +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} {\mathsf{not}}{{}_{\mathsf{v{\scriptstyle 128}}}({\mathit{v{\kern-0.1em\scriptstyle 128}}})} & = & {{\mathrm{inot}}}_{{|\mathsf{v{\scriptstyle 128}}|}}({\mathit{v{\kern-0.1em\scriptstyle 128}}}) \\ @@ -4456,6 +4519,8 @@ $$ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} {{\mathrm{ivunop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1) & = & {{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})} & \quad @@ -4468,12 +4533,31 @@ $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} +{{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}(c_1)^\ast} \\ +\end{array} \\ +\end{array} +$$ + +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{\mathsf{abs}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fabs}}, {\mathit{vN}}_1) \\ +{\mathsf{neg}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fneg}}, {\mathit{vN}}_1) \\ +{\mathsf{sqrt}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fsqrt}}, {\mathit{vN}}_1) \\ +{\mathsf{ceil}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fceil}}, {\mathit{vN}}_1) \\ +{\mathsf{floor}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{ffloor}}, {\mathit{vN}}_1) \\ +{\mathsf{trunc}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{ftrunc}}, {\mathit{vN}}_1) \\ +{\mathsf{nearest}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fnearest}}, {\mathit{vN}}_1) \\ {\mathsf{abs}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{ivunop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{iabs}}, {\mathit{vN}}_1) \\ {\mathsf{neg}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{ivunop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ineg}}, {\mathit{vN}}_1) \\ {\mathsf{popcnt}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{ivunop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ipopcnt}}, {\mathit{vN}}_1) \\ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} {{\mathrm{ivbinop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})} & \quad @@ -4496,6 +4580,28 @@ $$ \end{array} $$ +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{{\mathrm{ivbinopsxnd}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ +{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}({\mathit{sx}}, c_1, c_2)^\ast} \\ +\end{array} \\ +\end{array} +$$ + +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ +{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}(c_1, c_2)^\ast} \\ +\end{array} \\ +\end{array} +$$ + $$ \begin{array}[t]{@{}lcl@{}l@{}} {\mathsf{add}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivbinop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{iadd}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ @@ -4507,85 +4613,103 @@ $$ {{\mathsf{max}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivbinopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{imax}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ {{\mathsf{avgr}}{\mathsf{\_}}{\mathsf{u}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivbinopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{iavgr}}, \mathsf{u}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ {{\mathsf{q{\scriptstyle 15}mulr\_sat}}{\mathsf{\_}}{\mathsf{s}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivbinopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{iq{\kern-0.1em\scriptstyle 15\kern-0.1em}mulr}}_{{\mathit{sat}}}, \mathsf{s}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{{\mathsf{relaxed\_q{\scriptstyle 15}mulr}}{\mathsf{\_}}{\mathsf{s}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivbinopsxnd}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{irelaxed}}_{{\mathit{q{\kern-0.1em\scriptstyle 15\kern-0.1em}mulr}}}, \mathsf{s}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{add}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fadd}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{sub}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fsub}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{mul}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fmul}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{div}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fdiv}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{min}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fmin}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{max}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fmax}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{pmin}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fpmin}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{pmax}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fpmax}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{relaxed\_min}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{frelaxed}}_{{\mathit{min}}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{relaxed\_max}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{frelaxed}}_{{\mathit{max}}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{ivrelop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})} & \quad +{{\mathrm{ivternopnd}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad \begin{array}[t]{@{}l@{}} \mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ {\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ -{\land}~ {c^\ast} = {{{{{\mathrm{extend}}}_{1, N}^{\mathsf{s}}}}{({{\mathrm{f}}}_{N}(c_1, c_2))}^\ast} \\ +{\land}~ {c_3^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_3) \\ +{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}(c_1, c_2, c_3)^\ast} \\ \end{array} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})} & \quad +{{\mathrm{fvternop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad \begin{array}[t]{@{}l@{}} -\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ -{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ -{\land}~ {c^\ast} = {{{{{\mathrm{extend}}}_{1, N}^{\mathsf{s}}}}{({{\mathrm{f}}}_{N}({\mathit{sx}}, c_1, c_2))}^\ast} \\ +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ +{\land}~ {c_3^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_3) \\ +{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}(c_1, c_2, c_3)^\ast} \\ \end{array} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{eq}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ieq}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{ne}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ine}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{{\mathsf{lt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ilt}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{{\mathsf{gt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{igt}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{{\mathsf{le}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ile}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{{\mathsf{ge}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ige}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{relaxed\_laneselect}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3)} & = & {{\mathrm{ivternopnd}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{irelaxed}}_{{\mathit{laneselect}}}, {\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3) \\ +{\mathsf{relaxed\_madd}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3)} & = & {{\mathrm{fvternop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{frelaxed}}_{{\mathit{madd}}}, {\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3) \\ +{\mathsf{relaxed\_nmadd}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3)} & = & {{\mathrm{fvternop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{frelaxed}}_{{\mathit{nmadd}}}, {\mathit{vN}}_1, {\mathit{vN}}_2, {\mathit{vN}}_3) \\ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad +{{\mathrm{ivtestop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1) & = & {\Pi}\, {c^\ast} & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {c^\ast} = {{{\mathrm{f}}}_{N}(c_1)^\ast} \\ +\end{array} \\ +\end{array} +$$ + +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{{\mathrm{fvtestop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1) & = & {\Pi}\, {c^\ast} & \quad \begin{array}[t]{@{}l@{}} \mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ -{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}(c_1)^\ast} \\ +{\land}~ {c^\ast} = {{{\mathrm{f}}}_{N}(c_1)^\ast} \\ \end{array} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{abs}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fabs}}, {\mathit{vN}}_1) \\ -{\mathsf{neg}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fneg}}, {\mathit{vN}}_1) \\ -{\mathsf{sqrt}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fsqrt}}, {\mathit{vN}}_1) \\ -{\mathsf{ceil}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fceil}}, {\mathit{vN}}_1) \\ -{\mathsf{floor}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{ffloor}}, {\mathit{vN}}_1) \\ -{\mathsf{trunc}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{ftrunc}}, {\mathit{vN}}_1) \\ -{\mathsf{nearest}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{fvunop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fnearest}}, {\mathit{vN}}_1) \\ +{\mathsf{all\_true}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1)} & = & {{\mathrm{ivtestop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{inez}}, {\mathit{vN}}_1) \\ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})}^\ast} & \quad +{{\mathrm{ivrelop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})} & \quad \begin{array}[t]{@{}l@{}} -\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ -{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ -{\land}~ {{c^\ast}^\ast} = \Large\times~{{{\mathrm{f}}}_{N}(c_1, c_2)^\ast} \\ +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ +{\land}~ {c^\ast} = {{{{{\mathrm{extend}}}_{1, N}^{\mathsf{s}}}}{({{\mathrm{f}}}_{N}(c_1, c_2))}^\ast} \\ \end{array} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{\mathsf{add}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fadd}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{sub}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fsub}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{mul}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fmul}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{div}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fdiv}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{min}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fmin}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{max}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fmax}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{pmin}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fpmin}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ -{\mathsf{pmax}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvbinop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fpmax}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{f}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) & = & {{{{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}^{{-1}}}}{({c^\ast})} & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {c_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1) \\ +{\land}~ {c_2^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_2) \\ +{\land}~ {c^\ast} = {{{{{\mathrm{extend}}}_{1, N}^{\mathsf{s}}}}{({{\mathrm{f}}}_{N}({\mathit{sx}}, c_1, c_2))}^\ast} \\ +\end{array} \\ \end{array} $$ @@ -4603,6 +4727,12 @@ $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} +{\mathsf{eq}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ieq}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{\mathsf{ne}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelop}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ine}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{{\mathsf{lt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ilt}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{{\mathsf{gt}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{igt}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{{\mathsf{le}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ile}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ +{{\mathsf{ge}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{ivrelopsx}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}({\mathrm{ige}}, {\mathit{sx}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ {\mathsf{eq}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvrelop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{feq}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ {\mathsf{ne}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvrelop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{fne}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ {\mathsf{lt}}{{}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathit{vN}}_1, {\mathit{vN}}_2)} & = & {{\mathrm{fvrelop}}}_{{{\mathsf{f}}{N}}{\mathsf{x}}{M}}({\mathrm{flt}}, {\mathit{vN}}_1, {\mathit{vN}}_2) \\ @@ -4612,16 +4742,21 @@ $$ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} {{\mathrm{vcvtop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}({\mathsf{extend}}{\mathsf{\_}}{{\mathit{sx}}}, {\mathit{iN}}_1) & = & {\mathit{iN}}_2 & \quad \mbox{if}~ {\mathit{iN}}_2 = {{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)} \\ {{\mathrm{vcvtop}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}}({\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}}, {\mathit{iN}}_1) & = & {\mathit{fN}}_2 & \quad \mbox{if}~ {\mathit{fN}}_2 = {{{{\mathrm{convert}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)} \\ {{\mathrm{vcvtop}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}({\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}, {\mathit{fN}}_1) & = & {{\mathit{iN}}_2^?} & \quad \mbox{if}~ {{\mathit{iN}}_2^?} = {{{{\mathrm{trunc\_sat}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{fN}}_1)} \\ +{{\mathrm{vcvtop}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}({\mathsf{relaxed\_trunc}}{\mathsf{\_}}{{\mathit{sx}}}, {\mathit{fN}}_1) & = & {{\mathit{iN}}_2^?} & \quad \mbox{if}~ {{\mathit{iN}}_2^?} = {{{{\mathrm{relaxed\_trunc}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{fN}}_1)} \\ {{\mathrm{vcvtop}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}}(\mathsf{demote}, {\mathit{fN}}_1) & = & {{\mathit{fN}}_2^\ast} & \quad \mbox{if}~ {{\mathit{fN}}_2^\ast} = {{\mathrm{demote}}}_{N_1, N_2}({\mathit{fN}}_1) \\ {{\mathrm{vcvtop}}}_{{{{\mathsf{f}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{f}}{N}}_2}{\mathsf{x}}{M_2}}(\mathsf{promote}, {\mathit{fN}}_1) & = & {{\mathit{fN}}_2^\ast} & \quad \mbox{if}~ {{\mathit{fN}}_2^\ast} = {{\mathrm{promote}}}_{N_1, N_2}({\mathit{fN}}_1) \\ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} {{\mathsf{extadd\_pairwise}}{\mathsf{\_}}{{\mathit{sx}}}}{{}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}(c_1)} & = & c & \quad @@ -4645,12 +4780,45 @@ $$ \begin{array}[t]{@{}l@{}} \mbox{if}~ {{\mathit{ci}}_1^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}}(c_1) \\ {\land}~ {{\mathit{ci}}_2^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}}(c_2) \\ -{\land}~ {\bigoplus}\, {({\mathit{cj}}_1~{\mathit{cj}}_2)^\ast} = {{{\mathrm{imul}}}_{N_2}({{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_1)}, {{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_2)})^\ast} \\ +{\land}~ {{\mathit{ci}'}_1^\ast} = {{{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_1)}^\ast} \\ +{\land}~ {{\mathit{ci}'}_2^\ast} = {{{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_2)}^\ast} \\ +{\land}~ {\bigoplus}\, {({\mathit{cj}}_1~{\mathit{cj}}_2)^\ast} = {{{\mathrm{imul}}}_{N_2}({\mathit{ci}'}_1, {\mathit{ci}'}_2)^\ast} \\ {\land}~ c = {{{{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}^{{-1}}}}{({{{\mathrm{iadd}}}_{N_2}({\mathit{cj}}_1, {\mathit{cj}}_2)^\ast})} \\ \end{array} \\ +{{\mathsf{relaxed\_dot}}{\mathsf{\_}}{\mathsf{s}}}{{}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}(c_1, c_2)} & = & c & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {{\mathit{ci}}_1^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}}(c_1) \\ +{\land}~ {{\mathit{ci}}_2^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}}(c_2) \\ +{\land}~ {{\mathit{ci}'}_1^\ast} = {{{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_1)}^\ast} \\ +{\land}~ {{\mathit{ci}'}_2^\ast} = {{{{{\mathrm{extend}}}_{N_1, N_2}^{{{\mathrm{relaxed}}({\mathrm{R}}_{\mathit{idot}})}{{}[ \mathsf{s}, \mathsf{u} ]}}}}{({\mathit{ci}}_2)}^\ast} \\ +{\land}~ {\bigoplus}\, {({\mathit{cj}}_1~{\mathit{cj}}_2)^\ast} = {{{\mathrm{imul}}}_{N_2}({\mathit{ci}'}_1, {\mathit{ci}'}_2)^\ast} \\ +{\land}~ c = {{{{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}^{{-1}}}}{({{{{{\mathrm{iadd\_sat}}}_{N_2}^{\mathsf{s}}}}{({\mathit{cj}}_1, {\mathit{cj}}_2)}^\ast})} \\ +\end{array} \\ \end{array} $$ +$$ +\begin{array}[t]{@{}lcl@{}l@{}} +{{\mathsf{relaxed\_dot\_add}}{\mathsf{\_}}{\mathsf{s}}}{{}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}(c_1, c_2, c_3)} & = & c & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {{\mathit{ci}}_1^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}}(c_1) \\ +{\land}~ {{\mathit{ci}}_2^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_1}{\mathsf{x}}{M_1}}(c_2) \\ +{\land}~ {{\mathit{ci}}_3^\ast} = {{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}(c_3) \\ +{\land}~ N = 2 \cdot N_1 \\ +{\land}~ {{\mathit{ci}'}_1^\ast} = {{{{{\mathrm{extend}}}_{N_1, N}^{\mathsf{s}}}}{({\mathit{ci}}_1)}^\ast} \\ +{\land}~ {{\mathit{ci}'}_2^\ast} = {{{{{\mathrm{extend}}}_{N_1, N}^{{{\mathrm{relaxed}}({\mathrm{R}}_{\mathit{idot}})}{{}[ \mathsf{s}, \mathsf{u} ]}}}}{({\mathit{ci}}_2)}^\ast} \\ +{\land}~ {\bigoplus}\, {({\mathit{cj}}_1~{\mathit{cj}}_2)^\ast} = {{{\mathrm{imul}}}_{N}({\mathit{ci}'}_1, {\mathit{ci}'}_2)^\ast} \\ +{\land}~ {\bigoplus}\, {({\mathit{ck}}_1~{\mathit{ck}}_2)^\ast} = {{{{{\mathrm{iadd\_sat}}}_{N}^{\mathsf{s}}}}{({\mathit{cj}}_1, {\mathit{cj}}_2)}^\ast} \\ +{\land}~ {{\mathit{ck}'}_1^\ast} = {{{{{\mathrm{extend}}}_{N, N_2}^{\mathsf{s}}}}{({\mathit{ck}}_1)}^\ast} \\ +{\land}~ {{\mathit{ck}'}_2^\ast} = {{{{{\mathrm{extend}}}_{N, N_2}^{\mathsf{s}}}}{({\mathit{ck}}_2)}^\ast} \\ +{\land}~ {{\mathit{ck}}^\ast} = {{{\mathrm{iadd}}}_{N_2}({\mathit{ck}'}_1, {\mathit{ck}'}_2)^\ast} \\ +{\land}~ c = {{{{\mathrm{lanes}}}_{{{{\mathsf{i}}{N}}_2}{\mathsf{x}}{M_2}}^{{-1}}}}{({{{\mathrm{iadd}}}_{N_2}({\mathit{ck}}, {\mathit{ci}}_3)^\ast})} \\ +\end{array} \\ +\end{array} +$$ + +\vspace{1ex} + $$ \begin{array}[t]{@{}lcl@{}l@{}} {\mathsf{shl}}{{}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}}{({\mathit{lane}}, n)} & = & {{\mathrm{ishl}}}_{N}({\mathit{lane}}, n) \\ @@ -7380,6 +7548,16 @@ C \vdash {\mathit{sh}} {.} {\mathit{vbinop}} : \mathsf{v{\scriptstyle 128}}~\mat \end{array} $$ +$$ +\begin{array}{@{}c@{}}\displaystyle +\frac{ +}{ +C \vdash {\mathit{sh}} {.} {\mathit{vternop}} : \mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}} \rightarrow \mathsf{v{\scriptstyle 128}} +} \, {[\textsc{\scriptsize T{-}vternop}]} +\qquad +\end{array} +$$ + $$ \begin{array}{@{}c@{}}\displaystyle \frac{ @@ -7424,8 +7602,8 @@ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ }{ -C \vdash {\mathit{sh}}{.}\mathsf{swizzle} : \mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}} \rightarrow \mathsf{v{\scriptstyle 128}} -} \, {[\textsc{\scriptsize T{-}vswizzle}]} +C \vdash {\mathit{sh}} {.} {\mathit{vswizzlop}} : \mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}} \rightarrow \mathsf{v{\scriptstyle 128}} +} \, {[\textsc{\scriptsize T{-}vswizzlop}]} \qquad \end{array} $$ @@ -7493,6 +7671,16 @@ C \vdash {\mathit{sh}}_1 {.} {{\mathit{vextbinop}}}{\mathsf{\_}}{{\mathit{sh}}_2 \end{array} $$ +$$ +\begin{array}{@{}c@{}}\displaystyle +\frac{ +}{ +C \vdash {\mathit{sh}}_1 {.} {{\mathit{vextternop}}}{\mathsf{\_}}{{\mathit{sh}}_2} : \mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}} \rightarrow \mathsf{v{\scriptstyle 128}} +} \, {[\textsc{\scriptsize T{-}vextternop}]} +\qquad +\end{array} +$$ + $$ \begin{array}{@{}c@{}}\displaystyle \frac{ @@ -9508,12 +9696,16 @@ $$ $$ \begin{array}[t]{@{}lrcl@{}l@{}} -{[\textsc{\scriptsize E{-}vtestop{-}true}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)~({{\mathsf{i}}{N}}{\mathsf{x}}{M} {.} \mathsf{all\_true}) & \hookrightarrow & (\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~1) & \quad -\begin{array}[t]{@{}l@{}} -\mbox{if}~ {{\mathit{ci}}_1^\ast} = {{\mathrm{lanes}}}_{{{\mathsf{i}}{N}}{\mathsf{x}}{M}}(c) \\ -{\land}~ ({\mathit{ci}}_1 \neq 0)^\ast \\ -\end{array} \\ -{[\textsc{\scriptsize E{-}vtestop{-}false}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)~({{\mathsf{i}}{N}}{\mathsf{x}}{M} {.} \mathsf{all\_true}) & \hookrightarrow & (\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~0) & \mbox{otherwise} \\ +{[\textsc{\scriptsize E{-}vternop{-}val}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_2)~(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_3)~({\mathit{sh}} {.} {\mathit{vternop}}) & \hookrightarrow & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c) & \quad \mbox{if}~ c \in {{\mathit{vternop}}}{{}_{{\mathit{sh}}}(c_1, c_2, c_3)} \\ +{[\textsc{\scriptsize E{-}vternop{-}trap}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_2)~(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_3)~({\mathit{sh}} {.} {\mathit{vternop}}) & \hookrightarrow & \mathsf{trap} & \quad \mbox{if}~ {{\mathit{vternop}}}{{}_{{\mathit{sh}}}(c_1, c_2, c_3)} = \epsilon \\ +\end{array} +$$ + +\vspace{1ex} + +$$ +\begin{array}[t]{@{}lrcl@{}l@{}} +{[\textsc{\scriptsize E{-}vtestop}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~({\mathit{sh}} {.} {\mathit{vtestop}}) & \hookrightarrow & (\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~i) & \quad \mbox{if}~ {{\mathit{vtestop}}}{{}_{{\mathit{sh}}}(c_1)} = i \\ \end{array} $$ @@ -9553,11 +9745,17 @@ $$ $$ \begin{array}[t]{@{}lrcl@{}l@{}} -{[\textsc{\scriptsize E{-}vswizzle}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_2)~({{\mathsf{i}}{N}}{\mathsf{x}}{M}{.}\mathsf{swizzle}) & \hookrightarrow & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c) & \quad +{[\textsc{\scriptsize E{-}vswizzlop{-}swizzle}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_2)~({\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M} {.} \mathsf{swizzle}) & \hookrightarrow & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c) & \quad +\begin{array}[t]{@{}l@{}} +\mbox{if}~ {{\mathit{ci}}^\ast} = {{\mathrm{lanes}}}_{{\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M}}(c_2) \\ +{\land}~ {{c'}^\ast} = {{\mathrm{lanes}}}_{{\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M}}(c_1)~{0^{256 - M}} \\ +{\land}~ c = {{{{\mathrm{lanes}}}_{{\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M}}^{{-1}}}}{({{{c'}^\ast}{}[{{\mathit{ci}}^\ast}{}[k]]^{k%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:223.1-223.64 +;; 1-syntax.watsup:230.1-230.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:224.1-224.54 +;; 1-syntax.watsup:231.1-231.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:226.1-229.18 +;; 1-syntax.watsup:233.1-236.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:231.1-232.30 +;; 1-syntax.watsup:238.1-239.30 syntax subtype = | SUB{fin : fin, `typeuse*` : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse <- `typeuse*`} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:234.1-235.22 +;; 1-syntax.watsup:241.1-242.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -929,6 +943,26 @@ def $shsize(shape : shape) : nat ;; 2-syntax-aux.watsup def $shsize{Lnn : Lnn, N : N}(`%X%`_shape(Lnn, `%`_dim(N))) = ($lsize(Lnn) * N) +;; 1-syntax.watsup +syntax half__(shape_1 : shape, shape_2 : shape) + ;; 1-syntax.watsup + syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = + | LOW + | HIGH + -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) + + + ;; 1-syntax.watsup + syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = + | LOW + -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) + + +;; 1-syntax.watsup +syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = + | ZERO + -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) + ;; 1-syntax.watsup syntax vvunop = | NOT @@ -985,6 +1019,8 @@ syntax vbinop_(shape : shape) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) | `Q15MULR_SATS` -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | `RELAXED_Q15MULRS` + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) | MIN{sx : sx}(sx : sx) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) | MAX{sx : sx}(sx : sx) @@ -1001,6 +1037,21 @@ syntax vbinop_(shape : shape) | MAX | PMIN | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; 1-syntax.watsup +syntax vternop_(shape : shape) + ;; 1-syntax.watsup + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))) = + | RELAXED_LANESELECT + + + ;; 1-syntax.watsup + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))) = + | RELAXED_MADD + | RELAXED_NMADD ;; 1-syntax.watsup @@ -1051,6 +1102,8 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = | TRUNC_SAT{sx : sx}(sx : sx) -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_TRUNC{sx : sx}(sx : sx) + -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup @@ -1062,24 +1115,9 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) ;; 1-syntax.watsup -syntax half__(shape_1 : shape, shape_2 : shape) - ;; 1-syntax.watsup - syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = - | LOW - | HIGH - -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) - - - ;; 1-syntax.watsup - syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = - | LOW - -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) - - -;; 1-syntax.watsup -syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = - | ZERO - -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) +syntax vswizzlop_{M : M}(`%X%`_ishape(I8_Jnn, `%`_dim(M))) = + | SWIZZLE + | RELAXED_SWIZZLE ;; 1-syntax.watsup syntax vshiftop_{Jnn : Jnn, M : M}(`%X%`_ishape(Jnn, `%`_dim(M))) = @@ -1097,6 +1135,13 @@ syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_ -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) | `DOTS` -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | `RELAXED_DOTS` + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; 1-syntax.watsup +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2))) = + | `RELAXED_DOT_ADDS` + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup syntax memarg = @@ -1271,20 +1316,20 @@ syntax instr = | VVTESTOP{vectype : vectype, vvtestop : vvtestop}(vectype : vectype, vvtestop : vvtestop) | VUNOP{shape : shape, vunop_ : vunop_(shape)}(shape : shape, vunop_ : vunop_(shape)) | VBINOP{shape : shape, vbinop_ : vbinop_(shape)}(shape : shape, vbinop_ : vbinop_(shape)) + | VTERNOP{shape : shape, vternop_ : vternop_(shape)}(shape : shape, vternop_ : vternop_(shape)) | VTESTOP{shape : shape, vtestop_ : vtestop_(shape)}(shape : shape, vtestop_ : vtestop_(shape)) | VRELOP{shape : shape, vrelop_ : vrelop_(shape)}(shape : shape, vrelop_ : vrelop_(shape)) | VSHIFTOP{ishape : ishape, vshiftop_ : vshiftop_(ishape)}(ishape : ishape, vshiftop_ : vshiftop_(ishape)) | VBITMASK{ishape : ishape}(ishape : ishape) - | VSWIZZLE{ishape : ishape}(ishape : ishape) - -- if (ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) + | VSWIZZLOP{ishape : ishape, vswizzlop_ : vswizzlop_(ishape)}(ishape : ishape, vswizzlop_ : vswizzlop_(ishape)) | VSHUFFLE{ishape : ishape, `laneidx*` : laneidx*}(ishape : ishape, laneidx*{laneidx <- `laneidx*`} : laneidx*) -- if ((ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) /\ (|laneidx*{laneidx <- `laneidx*`}| = 16)) | VEXTUNOP{ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)) | VEXTBINOP{ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP{ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)) | VNARROW{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(ishape_1 : ishape, ishape_2 : ishape, sx : sx) -- if (($lsize($lanetype((ishape_2 : ishape <: shape))) = (2 * $lsize($lanetype((ishape_1 : ishape <: shape))))) /\ ((2 * $lsize($lanetype((ishape_1 : ishape <: shape)))) <= 32)) | VCVTOP{shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), `half__?` : half__(shape_2, shape_1)?, `zero__?` : zero__(shape_2, shape_1)?}(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), half__?{half__ <- `half__?`} : half__(shape_2, shape_1)?, zero__?{zero__ <- `zero__?`} : zero__(shape_2, shape_1)?) - -- if ($lanetype(shape_1) =/= $lanetype(shape_2)) | VSPLAT{shape : shape}(shape : shape) | VEXTRACT_LANE{shape : shape, `sx?` : sx?, laneidx : laneidx, numtype : numtype}(shape : shape, sx?{sx <- `sx?`} : sx?, laneidx : laneidx) -- if ((sx?{sx <- `sx?`} = ?()) <=> ($lanetype(shape) = (numtype : numtype <: lanetype))) @@ -1789,13 +1834,13 @@ def $free_shape(shape : shape) : free ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:443.1-443.44 +;; 2-syntax-aux.watsup:444.1-444.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; 2-syntax-aux.watsup:444.1-444.32 + ;; 2-syntax-aux.watsup:445.1-445.32 def $shift_labelidxs([]) = [] - ;; 2-syntax-aux.watsup:445.1-445.66 + ;; 2-syntax-aux.watsup:446.1-446.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_uN(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; 2-syntax-aux.watsup:446.1-446.91 + ;; 2-syntax-aux.watsup:447.1-447.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_uN((labelidx!`%`_labelidx.0 - 1))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } @@ -1804,7 +1849,7 @@ rec { ;; 2-syntax-aux.watsup:299.1-299.31 def $free_block(instr*) : free - ;; 2-syntax-aux.watsup:449.1-450.47 + ;; 2-syntax-aux.watsup:450.1-451.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) @@ -1879,134 +1924,136 @@ def $free_instr(instr : instr) : free ;; 2-syntax-aux.watsup:347.1-347.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) ;; 2-syntax-aux.watsup:348.1-348.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; 2-syntax-aux.watsup:349.1-349.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:349.1-349.58 + ;; 2-syntax-aux.watsup:350.1-350.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:350.1-350.64 + ;; 2-syntax-aux.watsup:351.1-351.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:351.1-351.55 - def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) ;; 2-syntax-aux.watsup:352.1-352.55 - def $free_instr{ishape : ishape}(VSWIZZLE_instr(ishape)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:353.1-353.64 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:353.1-353.66 + def $free_instr{ishape : ishape, vswizzlop : vswizzlop_(ishape)}(VSWIZZLOP_instr(ishape, vswizzlop)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:354.1-354.64 def $free_instr{ishape : ishape, `laneidx*` : laneidx*}(VSHUFFLE_instr(ishape, laneidx*{laneidx <- `laneidx*`})) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:354.1-355.49 + ;; 2-syntax-aux.watsup:355.1-356.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:356.1-357.49 + ;; 2-syntax-aux.watsup:357.1-358.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:358.1-359.49 + ;; 2-syntax-aux.watsup:359.1-360.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:360.1-361.47 + ;; 2-syntax-aux.watsup:361.1-362.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1), `half?` : half__(shape_2, shape_1)?, `zero?` : zero__(shape_2, shape_1)?}(VCVTOP_instr(shape_1, shape_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`})) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; 2-syntax-aux.watsup:362.1-362.51 + ;; 2-syntax-aux.watsup:363.1-363.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:363.1-363.70 + ;; 2-syntax-aux.watsup:364.1-364.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:364.1-364.66 + ;; 2-syntax-aux.watsup:365.1-365.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:366.1-366.62 + ;; 2-syntax-aux.watsup:367.1-367.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; 2-syntax-aux.watsup:367.1-367.34 + ;; 2-syntax-aux.watsup:368.1-368.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:368.1-368.38 + ;; 2-syntax-aux.watsup:369.1-369.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:369.1-369.29 + ;; 2-syntax-aux.watsup:370.1-370.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:370.1-370.59 - def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:371.1-371.59 - def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:372.1-372.59 + def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + ;; 2-syntax-aux.watsup:373.1-373.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; 2-syntax-aux.watsup:373.1-373.30 + ;; 2-syntax-aux.watsup:374.1-374.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:375.1-375.33 + ;; 2-syntax-aux.watsup:376.1-376.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:377.1-377.41 + ;; 2-syntax-aux.watsup:378.1-378.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:378.1-378.69 - def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) ;; 2-syntax-aux.watsup:379.1-379.69 + def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) + ;; 2-syntax-aux.watsup:380.1-380.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:380.1-380.65 + ;; 2-syntax-aux.watsup:381.1-381.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:382.1-382.60 + ;; 2-syntax-aux.watsup:383.1-383.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:383.1-383.68 + ;; 2-syntax-aux.watsup:384.1-384.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:384.1-384.70 + ;; 2-syntax-aux.watsup:385.1-385.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:385.1-386.51 + ;; 2-syntax-aux.watsup:386.1-387.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:387.1-388.51 + ;; 2-syntax-aux.watsup:388.1-389.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:389.1-389.64 + ;; 2-syntax-aux.watsup:390.1-390.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:390.1-390.60 + ;; 2-syntax-aux.watsup:391.1-391.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:391.1-391.32 + ;; 2-syntax-aux.watsup:392.1-392.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:392.1-392.61 + ;; 2-syntax-aux.watsup:393.1-393.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:393.1-394.55 + ;; 2-syntax-aux.watsup:394.1-395.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; 2-syntax-aux.watsup:395.1-396.51 + ;; 2-syntax-aux.watsup:396.1-397.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:397.1-398.51 + ;; 2-syntax-aux.watsup:398.1-399.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:400.1-400.41 - def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} ;; 2-syntax-aux.watsup:401.1-401.41 + def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} + ;; 2-syntax-aux.watsup:402.1-402.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:403.1-403.63 - def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:404.1-404.63 - def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:405.1-405.63 + def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + ;; 2-syntax-aux.watsup:406.1-406.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; 2-syntax-aux.watsup:407.1-407.67 - def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) ;; 2-syntax-aux.watsup:408.1-408.67 + def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) + ;; 2-syntax-aux.watsup:409.1-409.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; 2-syntax-aux.watsup:410.1-410.63 - def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:411.1-411.63 + def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:412.1-412.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:412.1-412.64 - def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:413.1-413.64 - def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:414.1-414.64 + def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:415.1-415.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:415.1-416.59 + ;; 2-syntax-aux.watsup:416.1-417.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; 2-syntax-aux.watsup:417.1-418.53 + ;; 2-syntax-aux.watsup:418.1-419.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:419.1-419.60 + ;; 2-syntax-aux.watsup:420.1-420.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:421.1-422.49 + ;; 2-syntax-aux.watsup:422.1-423.49 def $free_instr{numtype : numtype, loadop : loadop_(numtype), memidx : memidx, memarg : memarg}(LOAD_instr(numtype, ?(loadop), memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:423.1-424.49 + ;; 2-syntax-aux.watsup:424.1-425.49 def $free_instr{numtype : numtype, `sz?` : sz?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, sz?{sz <- `sz?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:425.1-426.49 + ;; 2-syntax-aux.watsup:426.1-427.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:427.1-428.49 + ;; 2-syntax-aux.watsup:428.1-429.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:429.1-430.49 + ;; 2-syntax-aux.watsup:430.1-431.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:431.1-432.49 + ;; 2-syntax-aux.watsup:432.1-433.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:433.1-433.59 - def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:434.1-434.59 - def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:435.1-435.59 + def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + ;; 2-syntax-aux.watsup:436.1-436.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; 2-syntax-aux.watsup:436.1-437.51 + ;; 2-syntax-aux.watsup:437.1-438.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; 2-syntax-aux.watsup:438.1-439.49 + ;; 2-syntax-aux.watsup:439.1-440.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:440.1-440.60 + ;; 2-syntax-aux.watsup:441.1-441.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) } @@ -2109,14 +2156,14 @@ def $dataidx_funcs(func*) : dataidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:532.1-532.112 +;; 2-syntax-aux.watsup:533.1-533.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:559.1-559.38 + ;; 2-syntax-aux.watsup:560.1-560.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; 2-syntax-aux.watsup:560.1-560.95 + ;; 2-syntax-aux.watsup:561.1-561.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; 2-syntax-aux.watsup:561.1-561.92 + ;; 2-syntax-aux.watsup:562.1-562.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -2139,78 +2186,78 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:533.1-533.112 +;; 2-syntax-aux.watsup:534.1-534.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:563.1-563.66 + ;; 2-syntax-aux.watsup:564.1-564.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; 2-syntax-aux.watsup:564.1-564.64 + ;; 2-syntax-aux.watsup:565.1-565.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; 2-syntax-aux.watsup:537.1-537.112 +;; 2-syntax-aux.watsup:538.1-538.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; 2-syntax-aux.watsup:569.1-569.67 + ;; 2-syntax-aux.watsup:570.1-570.67 def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) - ;; 2-syntax-aux.watsup:570.1-570.65 + ;; 2-syntax-aux.watsup:571.1-571.65 def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) - ;; 2-syntax-aux.watsup:571.1-571.53 + ;; 2-syntax-aux.watsup:572.1-572.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; 2-syntax-aux.watsup:538.1-538.112 +;; 2-syntax-aux.watsup:539.1-539.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; 2-syntax-aux.watsup:573.1-573.83 + ;; 2-syntax-aux.watsup:574.1-574.83 def $subst_reftype{nul : nul, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(nul, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(nul, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:539.1-539.112 +;; 2-syntax-aux.watsup:540.1-540.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; 2-syntax-aux.watsup:575.1-575.64 - def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:576.1-576.64 - def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:577.1-577.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; 2-syntax-aux.watsup:578.1-578.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; 2-syntax-aux.watsup:578.1-578.40 + ;; 2-syntax-aux.watsup:579.1-579.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; 2-syntax-aux.watsup:542.1-542.112 +;; 2-syntax-aux.watsup:543.1-543.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; 2-syntax-aux.watsup:582.1-582.66 + ;; 2-syntax-aux.watsup:583.1-583.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; 2-syntax-aux.watsup:583.1-583.69 + ;; 2-syntax-aux.watsup:584.1-584.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; 2-syntax-aux.watsup:543.1-543.112 +;; 2-syntax-aux.watsup:544.1-544.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; 2-syntax-aux.watsup:585.1-585.80 + ;; 2-syntax-aux.watsup:586.1-586.80 def $subst_fieldtype{mut : mut, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:545.1-545.112 +;; 2-syntax-aux.watsup:546.1-546.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; 2-syntax-aux.watsup:587.1-587.85 + ;; 2-syntax-aux.watsup:588.1-588.85 def $subst_comptype{`yt*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_structtype(yt*{yt <- `yt*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_structtype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{yt <- `yt*`})) - ;; 2-syntax-aux.watsup:588.1-588.81 + ;; 2-syntax-aux.watsup:589.1-589.81 def $subst_comptype{yt : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(yt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; 2-syntax-aux.watsup:589.1-589.78 + ;; 2-syntax-aux.watsup:590.1-590.78 def $subst_comptype{ft : functype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_comptype($subst_functype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:546.1-546.112 +;; 2-syntax-aux.watsup:547.1-547.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; 2-syntax-aux.watsup:591.1-592.71 + ;; 2-syntax-aux.watsup:592.1-593.71 def $subst_subtype{fin : fin, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(fin, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(fin, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:547.1-547.112 +;; 2-syntax-aux.watsup:548.1-548.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; 2-syntax-aux.watsup:594.1-594.76 + ;; 2-syntax-aux.watsup:595.1-595.76 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{st <- `st*`})) -;; 2-syntax-aux.watsup:548.1-548.112 +;; 2-syntax-aux.watsup:549.1-549.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; 2-syntax-aux.watsup:596.1-596.78 + ;; 2-syntax-aux.watsup:597.1-597.78 def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) -;; 2-syntax-aux.watsup:551.1-551.112 +;; 2-syntax-aux.watsup:552.1-552.112 def $subst_functype(functype : functype, typevar*, typeuse*) : functype - ;; 2-syntax-aux.watsup:599.1-599.113 + ;; 2-syntax-aux.watsup:600.1-600.113 def $subst_functype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_functype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_functype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`}), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`})) } @@ -2283,11 +2330,11 @@ def $subst_all_moduletype(moduletype : moduletype, heaptype*) : moduletype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:627.1-627.98 +;; 2-syntax-aux.watsup:628.1-628.98 def $subst_all_deftypes(deftype*, heaptype*) : deftype* - ;; 2-syntax-aux.watsup:628.1-628.40 + ;; 2-syntax-aux.watsup:629.1-629.40 def $subst_all_deftypes{`tu*` : typeuse*}([], (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [] - ;; 2-syntax-aux.watsup:629.1-629.101 + ;; 2-syntax-aux.watsup:630.1-630.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, (tu : typeuse <: heaptype)*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) } @@ -2331,13 +2378,13 @@ relation Expand: `%~~%`(deftype, comptype) ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:661.1-661.86 +;; 2-syntax-aux.watsup:662.1-662.86 def $funcsxx(externidx*) : typeidx* - ;; 2-syntax-aux.watsup:667.1-667.24 + ;; 2-syntax-aux.watsup:668.1-668.24 def $funcsxx([]) = [] - ;; 2-syntax-aux.watsup:668.1-668.45 + ;; 2-syntax-aux.watsup:669.1-669.45 def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:669.1-669.58 + ;; 2-syntax-aux.watsup:670.1-670.58 def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2345,13 +2392,13 @@ def $funcsxx(externidx*) : typeidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:662.1-662.88 +;; 2-syntax-aux.watsup:663.1-663.88 def $globalsxx(externidx*) : globalidx* - ;; 2-syntax-aux.watsup:671.1-671.26 + ;; 2-syntax-aux.watsup:672.1-672.26 def $globalsxx([]) = [] - ;; 2-syntax-aux.watsup:672.1-672.51 + ;; 2-syntax-aux.watsup:673.1-673.51 def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:673.1-673.62 + ;; 2-syntax-aux.watsup:674.1-674.62 def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2359,13 +2406,13 @@ def $globalsxx(externidx*) : globalidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:663.1-663.87 +;; 2-syntax-aux.watsup:664.1-664.87 def $tablesxx(externidx*) : tableidx* - ;; 2-syntax-aux.watsup:675.1-675.25 + ;; 2-syntax-aux.watsup:676.1-676.25 def $tablesxx([]) = [] - ;; 2-syntax-aux.watsup:676.1-676.48 + ;; 2-syntax-aux.watsup:677.1-677.48 def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:677.1-677.60 + ;; 2-syntax-aux.watsup:678.1-678.60 def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2373,13 +2420,13 @@ def $tablesxx(externidx*) : tableidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:664.1-664.85 +;; 2-syntax-aux.watsup:665.1-665.85 def $memsxx(externidx*) : memidx* - ;; 2-syntax-aux.watsup:679.1-679.23 + ;; 2-syntax-aux.watsup:680.1-680.23 def $memsxx([]) = [] - ;; 2-syntax-aux.watsup:680.1-680.42 + ;; 2-syntax-aux.watsup:681.1-681.42 def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:681.1-681.56 + ;; 2-syntax-aux.watsup:682.1-682.56 def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2387,13 +2434,13 @@ def $memsxx(externidx*) : memidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:665.1-665.85 +;; 2-syntax-aux.watsup:666.1-666.85 def $tagsxx(externidx*) : tagidx* - ;; 2-syntax-aux.watsup:683.1-683.23 + ;; 2-syntax-aux.watsup:684.1-684.23 def $tagsxx([]) = [] - ;; 2-syntax-aux.watsup:684.1-684.42 + ;; 2-syntax-aux.watsup:685.1-685.42 def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:685.1-685.56 + ;; 2-syntax-aux.watsup:686.1-686.56 def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -2401,13 +2448,13 @@ def $tagsxx(externidx*) : tagidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:688.1-688.88 +;; 2-syntax-aux.watsup:689.1-689.88 def $funcsxt(externtype*) : deftype* - ;; 2-syntax-aux.watsup:694.1-694.24 + ;; 2-syntax-aux.watsup:695.1-695.24 def $funcsxt([]) = [] - ;; 2-syntax-aux.watsup:695.1-695.47 + ;; 2-syntax-aux.watsup:696.1-696.47 def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:696.1-696.59 + ;; 2-syntax-aux.watsup:697.1-697.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2415,13 +2462,13 @@ def $funcsxt(externtype*) : deftype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:689.1-689.90 +;; 2-syntax-aux.watsup:690.1-690.90 def $globalsxt(externtype*) : globaltype* - ;; 2-syntax-aux.watsup:698.1-698.26 + ;; 2-syntax-aux.watsup:699.1-699.26 def $globalsxt([]) = [] - ;; 2-syntax-aux.watsup:699.1-699.53 + ;; 2-syntax-aux.watsup:700.1-700.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:700.1-700.63 + ;; 2-syntax-aux.watsup:701.1-701.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2429,13 +2476,13 @@ def $globalsxt(externtype*) : globaltype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:690.1-690.89 +;; 2-syntax-aux.watsup:691.1-691.89 def $tablesxt(externtype*) : tabletype* - ;; 2-syntax-aux.watsup:702.1-702.25 + ;; 2-syntax-aux.watsup:703.1-703.25 def $tablesxt([]) = [] - ;; 2-syntax-aux.watsup:703.1-703.50 + ;; 2-syntax-aux.watsup:704.1-704.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:704.1-704.61 + ;; 2-syntax-aux.watsup:705.1-705.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2443,13 +2490,13 @@ def $tablesxt(externtype*) : tabletype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:691.1-691.87 +;; 2-syntax-aux.watsup:692.1-692.87 def $memsxt(externtype*) : memtype* - ;; 2-syntax-aux.watsup:706.1-706.23 + ;; 2-syntax-aux.watsup:707.1-707.23 def $memsxt([]) = [] - ;; 2-syntax-aux.watsup:707.1-707.44 + ;; 2-syntax-aux.watsup:708.1-708.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:708.1-708.57 + ;; 2-syntax-aux.watsup:709.1-709.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2457,13 +2504,13 @@ def $memsxt(externtype*) : memtype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:692.1-692.87 +;; 2-syntax-aux.watsup:693.1-693.87 def $tagsxt(externtype*) : tagtype* - ;; 2-syntax-aux.watsup:710.1-710.23 + ;; 2-syntax-aux.watsup:711.1-711.23 def $tagsxt([]) = [] - ;; 2-syntax-aux.watsup:711.1-711.44 + ;; 2-syntax-aux.watsup:712.1-712.44 def $tagsxt{at : tagtype, `xt*` : externtype*}([TAG_externtype((at : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [at] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:712.1-712.57 + ;; 2-syntax-aux.watsup:713.1-713.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -2474,213 +2521,233 @@ def $memarg0 : memarg def $memarg0 = {ALIGN `%`_u32(0), OFFSET `%`_u32(0)} ;; 3-numerics.watsup -def $s33_to_u32(s33 : s33) : u32 +syntax relaxed2 = + | `%`{i : nat}(i : nat) + -- if ((i = 0) \/ (i = 1)) ;; 3-numerics.watsup -def $signed_(N : N, nat : nat) : int +syntax relaxed4 = + | `%`{i : nat}(i : nat) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; 3-numerics.watsup +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) - -- if (0 <= (2 ^ (N - 1))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][i] + -- if $ND ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) - -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][0] + -- otherwise ;; 3-numerics.watsup -def $invsigned_(N : N, int : int) : nat +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X ;; 3-numerics.watsup - def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j - -- if ($signed_(N, j) = (i : nat <: int)) + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][i] + -- if $ND + ;; 3-numerics.watsup + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][0] + -- otherwise ;; 3-numerics.watsup -def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $R_fmadd : relaxed2 ;; 3-numerics.watsup -def $fabs_(N : N, fN : fN(N)) : fN(N)* +def $R_fmin : relaxed4 ;; 3-numerics.watsup -def $fceil_(N : N, fN : fN(N)) : fN(N)* +def $R_fmax : relaxed4 ;; 3-numerics.watsup -def $ffloor_(N : N, fN : fN(N)) : fN(N)* +def $R_idot : relaxed2 ;; 3-numerics.watsup -def $fnearest_(N : N, fN : fN(N)) : fN(N)* +def $R_iq15mulr : relaxed2 ;; 3-numerics.watsup -def $fneg_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_u : relaxed4 ;; 3-numerics.watsup -def $fsqrt_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_s : relaxed2 ;; 3-numerics.watsup -def $ftrunc_(N : N, fN : fN(N)) : fN(N)* +def $R_swizzle : relaxed2 ;; 3-numerics.watsup -def $iclz_(N : N, iN : iN(N)) : iN(N) +def $R_laneselect : relaxed2 ;; 3-numerics.watsup -def $ictz_(N : N, iN : iN(N)) : iN(N) +def $s33_to_u32(s33 : s33) : u32 ;; 3-numerics.watsup -def $ipopcnt_(N : N, iN : iN(N)) : iN(N) +def $signed_(N : N, nat : nat) : int + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) + -- if (0 <= (2 ^ (N - 1))) + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) + -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) ;; 3-numerics.watsup -def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) +def $invsigned_(N : N, int : int) : nat + ;; 3-numerics.watsup + def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j + -- if ($signed_(N, j) = (i : nat <: int)) ;; 3-numerics.watsup -def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] +def $sat_u_(N : N, nat : nat) : nat ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = 0 + -- if (i < 0) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = ((2 ^ N) - 1) + -- if (i > ((2 ^ N) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = i + -- otherwise + +;; 3-numerics.watsup +def $sat_s_(N : N, int : int) : int ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = - ((2 ^ (N - 1)) : nat <: int) + -- if ((i : nat <: int) < - ((2 ^ (N - 1)) : nat <: int)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (((2 ^ (N - 1)) - 1) : nat <: int) + -- if (i > ((2 ^ (N - 1)) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (i : nat <: int) + -- otherwise ;; 3-numerics.watsup -def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $relaxed_trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) ;; 3-numerics.watsup -def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) ;; 3-numerics.watsup -def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $ibits_(N : N, iN : iN(N)) : bit* ;; 3-numerics.watsup -def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbits_(N : N, fN : fN(N)) : bit* ;; 3-numerics.watsup -def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $ibytes_(N : N, iN : iN(N)) : byte* ;; 3-numerics.watsup -def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbytes_(N : N, fN : fN(N)) : byte* ;; 3-numerics.watsup -def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* ;; 3-numerics.watsup -def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* ;; 3-numerics.watsup -def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* ;; 3-numerics.watsup -def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* ;; 3-numerics.watsup -def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $invibytes_(N : N, byte*) : iN(N) + ;; 3-numerics.watsup + def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) + -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) ;; 3-numerics.watsup -def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $invfbytes_(N : N, byte*) : fN(N) ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p + -- if ($fbytes_(N, p) = b*{b <- `b*`}) ;; 3-numerics.watsup -def $ieqz_(N : N, iN : iN(N)) : u32 +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) +def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? ;; 3-numerics.watsup -def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? ;; 3-numerics.watsup -def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $inot_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) + +;; 3-numerics.watsup +def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) + +;; 3-numerics.watsup +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iclz_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ictz_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ieqz_(N : N, iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $inez_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 @@ -2689,156 +2756,118 @@ def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) +def $iabs_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $ineg_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] - -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] - -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $ibits_(N : N, iN : iN(N)) : bit* +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $fbits_(N : N, fN : fN(N)) : bit* +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibytes_(N : N, iN : iN(N)) : byte* +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $fbytes_(N : N, fN : fN(N)) : byte* +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invibytes_(N : N, byte*) : iN(N) - ;; 3-numerics.watsup - def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) - -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invfbytes_(N : N, byte*) : fN(N) - ;; 3-numerics.watsup - def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p - -- if ($fbytes_(N, p) = b*{b <- `b*`}) +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $inot_(N : N, iN : iN(N)) : iN(N) +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) +def $fabs_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iabs_(N : N, iN : iN(N)) : iN(N) +def $fneg_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ineg_(N : N, iN : iN(N)) : iN(N) +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fceil_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ffloor_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fnearest_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; 3-numerics.watsup +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) @@ -2887,70 +2916,191 @@ def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i ;; 3-numerics.watsup -def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* ;; 3-numerics.watsup - def $vvunop_{v128 : vec_(V128_Vnn)}(V128_vectype, NOT_vvunop, v128) = [$inot_($vsize(V128_vectype), v128)] - -;; 3-numerics.watsup -def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, AND_vvbinop, v128_1, v128_2) = [$iand_($vsize(V128_vectype), v128_1, v128_2)] + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, ANDNOT_vvbinop, v128_1, v128_2) = [$iandnot_($vsize(V128_vectype), v128_1, v128_2)] + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, OR_vvbinop, v128_1, v128_2) = [$ior_($vsize(V128_vectype), v128_1, v128_2)] + def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, XOR_vvbinop, v128_1, v128_2) = [$ixor_($vsize(V128_vectype), v128_1, v128_2)] - -;; 3-numerics.watsup -def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) ;; 3-numerics.watsup - def $vvternop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn), v128_3 : vec_(V128_Vnn)}(V128_vectype, BITSELECT_vvternop, v128_1, v128_2, v128_3) = [$ibitselect_($vsize(V128_vectype), v128_1, v128_2, v128_3)] - -;; 3-numerics.watsup -def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) ;; 3-numerics.watsup - def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} - -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) - -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`})) - -;; 3-numerics.watsup -def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) ;; 3-numerics.watsup - def $ivunop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : iN(N), vN_1 : vec_(V128_Vnn), `c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = [$invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})] - -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) - -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)*{c_1 <- `c_1*`}) + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) ;; 3-numerics.watsup -def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fabs_, vN_1) + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fneg_, vN_1) + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SQRT_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsqrt_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), CEIL_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fceil_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), FLOOR_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ffloor_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), TRUNC_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ftrunc_, vN_1) + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] ;; 3-numerics.watsup - def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEAREST_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fnearest_, vN_1) + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup -def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 ;; 3-numerics.watsup - def $fvbinop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} - -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) - -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) - -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) + +;; 3-numerics.watsup +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] + -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) + +;; 3-numerics.watsup +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* + ;; 3-numerics.watsup + def $vvunop_{v128 : vec_(V128_Vnn)}(V128_vectype, NOT_vvunop, v128) = [$inot_($vsize(V128_vectype), v128)] + +;; 3-numerics.watsup +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, AND_vvbinop, v128_1, v128_2) = [$iand_($vsize(V128_vectype), v128_1, v128_2)] + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, ANDNOT_vvbinop, v128_1, v128_2) = [$iandnot_($vsize(V128_vectype), v128_1, v128_2)] + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, OR_vvbinop, v128_1, v128_2) = [$ior_($vsize(V128_vectype), v128_1, v128_2)] + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, XOR_vvbinop, v128_1, v128_2) = [$ixor_($vsize(V128_vectype), v128_1, v128_2)] + +;; 3-numerics.watsup +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; 3-numerics.watsup + def $vvternop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn), v128_3 : vec_(V128_Vnn)}(V128_vectype, BITSELECT_vvternop, v128_1, v128_2, v128_3) = [$ibitselect_($vsize(V128_vectype), v128_1, v128_2, v128_3)] + +;; 3-numerics.watsup +def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`})) + +;; 3-numerics.watsup +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivunop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : iN(N), vN_1 : vec_(V128_Vnn), `c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = [$invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)*{c_1 <- `c_1*`}) + +;; 3-numerics.watsup +def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fabs_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fneg_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SQRT_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsqrt_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), CEIL_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fceil_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), FLOOR_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ffloor_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), TRUNC_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ftrunc_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEAREST_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fnearest_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) + +;; 3-numerics.watsup +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvbinop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) ;; 3-numerics.watsup def $ivbinop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* @@ -2968,6 +3118,14 @@ def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) +;; 3-numerics.watsup +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, sx, vN_1, vN_2) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + ;; 3-numerics.watsup def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* ;; 3-numerics.watsup @@ -2989,6 +3147,8 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec ;; 3-numerics.watsup def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `Q15MULR_SATS`_vbinop_, vN_1, vN_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iq15mulr_sat_, S_sx, vN_1, vN_2) ;; 3-numerics.watsup + def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `RELAXED_Q15MULRS`_vbinop_, vN_1, vN_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_q15mulr_, S_sx, vN_1, vN_2) + ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ADD_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fadd_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SUB_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsub_, vN_1, vN_2) @@ -3004,6 +3164,49 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmin_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmax_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_min_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_max_, vN_1, vN_2) + +;; 3-numerics.watsup +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $vternop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), RELAXED_LANESELECT_vternop_, vN_1, vN_2, vN_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_laneselect_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_madd_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_NMADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_nmadd_, vN_1, vN_2, vN_3) + +;; 3-numerics.watsup +def $ivtestop_(shape : shape, def $f_(N : N, iN : iN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $ivtestop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + +;; 3-numerics.watsup +def $vtestop_(shape : shape, vtestop_ : vtestop_(shape), vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $vtestop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_, vN_1) = $ivtestop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $inez_, vN_1) ;; 3-numerics.watsup def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) @@ -3069,6 +3272,9 @@ def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, sha def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), TRUNC_SAT_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) -- if (iN_2?{iN_2 <- `iN_2?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) ;; 3-numerics.watsup + def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), RELAXED_TRUNC_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) + -- if (iN_2?{iN_2 <- `iN_2?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) + ;; 3-numerics.watsup def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `fN_2*` : lane_($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), DEMOTE_vcvtop__, fN_1) = fN_2*{fN_2 <- `fN_2*`} -- if (fN_2*{fN_2 <- `fN_2*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), fN_1)) ;; 3-numerics.watsup @@ -3091,11 +3297,38 @@ def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__ -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)[$half__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), half, 0, M_2) : M_2]) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`})) ;; 3-numerics.watsup - def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) - -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`}) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + ;; 3-numerics.watsup + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOTS`_vextbinop__, c_1, c_2) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_sat_($lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + +;; 3-numerics.watsup +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_3*` : lane_($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))))*, Jnn : Jnn, `ci'_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOT_ADDS`_vextternop__, c_1, c_2, c_3) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci_3*{ci_3 <- `ci_3*`} = $lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), c_3)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [`%`_uN(cj_1!`%`_iN.0) `%`_uN(cj_2!`%`_iN.0)]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn((Jnn : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [ck_1 ck_2]*{ck_1 <- `ck_1*`, ck_2 <- `ck_2*`}) = $iadd_sat_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN(cj_1!`%`_iN.0), `%`_iN(cj_2!`%`_iN.0))*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) + -- if (ck'_1*{ck'_1 <- `ck'_1*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_1)*{ck_1 <- `ck_1*`}) + -- if (ck'_2*{ck'_2 <- `ck'_2*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_2)*{ck_2 <- `ck_2*`}) + -- if (ck*{ck <- `ck*`} = $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck'_1, ck'_2)*{ck'_1 <- `ck'_1*`, ck'_2 <- `ck'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck, ci_3)*{ci_3 <- `ci_3*`, ck <- `ck*`})) ;; 3-numerics.watsup def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($lanetype((ishape : ishape <: shape))), u32 : u32) : lane_($lanetype((ishape : ishape <: shape))) @@ -3104,6 +3337,13 @@ def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($la ;; 3-numerics.watsup def $vshiftop_{Jnn : Jnn, M : M, sx : sx, lane : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)))), n : n}(`%X%`_ishape(Jnn, `%`_dim(M)), SHR_vshiftop_(sx), lane, `%`_u32(n)) = $ishr_($lsizenn((Jnn : Jnn <: lanetype)), sx, lane, `%`_u32(n)) +;; 3-numerics.watsup +def $fvtestop_(shape : shape, def $f_(N : N, fN : fN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $fvtestop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($sizenn((Fnn : Fnn <: numtype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + ;; 4-runtime.watsup syntax num = | CONST{numtype : numtype, num_ : num_(numtype)}(numtype : numtype, num_ : num_(numtype)) @@ -4623,224 +4863,232 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:948.1-949.40 + ;; 6-typing.watsup:948.1-949.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:951.1-952.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:951.1-952.44 + ;; 6-typing.watsup:954.1-955.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:954.1-955.47 + ;; 6-typing.watsup:957.1-958.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:957.1-958.33 + ;; 6-typing.watsup:960.1-961.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:960.1-961.39 - rule vswizzle{C : context, sh : ishape}: - `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + ;; 6-typing.watsup:963.1-964.50 + rule vswizzlop{C : context, sh : ishape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:963.1-965.29 + ;; 6-typing.watsup:966.1-968.29 rule vshuffle{C : context, sh : ishape, `i*` : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i <- `i*`} - ;; 6-typing.watsup:967.1-968.44 + ;; 6-typing.watsup:970.1-971.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:970.1-972.21 + ;; 6-typing.watsup:973.1-975.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:974.1-976.21 + ;; 6-typing.watsup:977.1-979.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:978.1-979.50 + ;; 6-typing.watsup:981.1-982.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:981.1-982.57 + ;; 6-typing.watsup:984.1-985.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:984.1-985.48 + ;; 6-typing.watsup:987.1-988.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:990.1-991.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:987.1-988.58 + ;; 6-typing.watsup:993.1-994.58 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1), `half?` : half__(sh_2, sh_1)?, `zero?` : zero__(sh_2, sh_1)?}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:993.1-995.28 + ;; 6-typing.watsup:999.1-1001.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:997.1-999.29 + ;; 6-typing.watsup:1003.1-1005.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1001.1-1003.29 + ;; 6-typing.watsup:1007.1-1009.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1008.1-1010.29 + ;; 6-typing.watsup:1014.1-1016.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:1012.1-1014.29 + ;; 6-typing.watsup:1018.1-1020.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:1019.1-1021.29 + ;; 6-typing.watsup:1025.1-1027.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1023.1-1025.29 + ;; 6-typing.watsup:1029.1-1031.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1027.1-1029.29 + ;; 6-typing.watsup:1033.1-1035.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1031.1-1033.29 + ;; 6-typing.watsup:1037.1-1039.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1035.1-1037.29 + ;; 6-typing.watsup:1041.1-1043.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1039.1-1043.36 + ;; 6-typing.watsup:1045.1-1049.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1045.1-1049.36 + ;; 6-typing.watsup:1051.1-1055.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1051.1-1053.24 + ;; 6-typing.watsup:1057.1-1059.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1058.1-1060.23 + ;; 6-typing.watsup:1064.1-1066.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1062.1-1064.23 + ;; 6-typing.watsup:1068.1-1070.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1066.1-1068.23 + ;; 6-typing.watsup:1072.1-1074.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1070.1-1073.27 + ;; 6-typing.watsup:1076.1-1079.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1075.1-1078.24 + ;; 6-typing.watsup:1081.1-1084.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1080.1-1082.24 + ;; 6-typing.watsup:1086.1-1088.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1093.1-1096.43 + ;; 6-typing.watsup:1099.1-1102.43 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1098.1-1101.35 + ;; 6-typing.watsup:1104.1-1107.35 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1112.1-1115.43 + ;; 6-typing.watsup:1118.1-1121.43 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1117.1-1120.35 + ;; 6-typing.watsup:1123.1-1126.35 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1122.1-1125.46 + ;; 6-typing.watsup:1128.1-1131.46 rule `vload-val`{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1127.1-1130.39 + ;; 6-typing.watsup:1133.1-1136.39 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1132.1-1135.35 + ;; 6-typing.watsup:1138.1-1141.35 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1137.1-1140.35 + ;; 6-typing.watsup:1143.1-1146.35 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1142.1-1146.21 + ;; 6-typing.watsup:1148.1-1152.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1148.1-1151.46 + ;; 6-typing.watsup:1154.1-1157.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1153.1-1157.21 + ;; 6-typing.watsup:1159.1-1163.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) @@ -5115,13 +5363,13 @@ relation Export_ok: `%|-%:%%`(context, export, name, externtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1358.1-1358.100 +;; 6-typing.watsup:1364.1-1364.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1402.1-1403.17 + ;; 6-typing.watsup:1408.1-1409.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1405.1-1408.54 + ;; 6-typing.watsup:1411.1-1414.54 rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) -- Global_ok: `%|-%:%`(C, global_1, gt_1) @@ -5131,13 +5379,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1357.1-1357.98 +;; 6-typing.watsup:1363.1-1363.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1394.1-1395.17 + ;; 6-typing.watsup:1400.1-1401.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1397.1-1400.49 + ;; 6-typing.watsup:1403.1-1406.49 rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) @@ -5574,15 +5822,19 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) ;; 8-reduction.watsup - rule `vtestop-true`{c : vec_(V128_Vnn), Jnn : Jnn, M : M, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(1))]) - -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)) - -- (if (ci_1 =/= `%`_lane_(0)))*{ci_1 <- `ci_1*`} + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if c <- $vternop_(sh, vternop, c_1, c_2, c_3) ;; 8-reduction.watsup - rule `vtestop-false`{c : vec_(V128_Vnn), Jnn : Jnn, M : M}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(0))]) - -- otherwise + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; 8-reduction.watsup + rule vtestop{c_1 : vec_(V128_Vnn), sh : shape, vtestop : vtestop_(sh), i : nat}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(sh, vtestop)], [CONST_instr(I32_numtype, `%`_num_(i))]) + -- if ($vtestop_(sh, vtestop, c_1) = `%`_u32(i)) ;; 8-reduction.watsup rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: @@ -5602,11 +5854,18 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($ibits_(32, ci) = `%`_bit($ilt_($lsize((Jnn : Jnn <: lanetype)), S_sx, ci_1, `%`_iN(0))!`%`_u32.0)*{ci_1 <- `ci_1*`}) ;; 8-reduction.watsup - rule vswizzle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Pnn : Pnn, M : M, c : vec_(V128_Vnn), `c'*` : iN($lsize((Pnn : Pnn <: lanetype)))*, `ci*` : lane_($lanetype(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M))))*, `k*` : nat*}: - `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLE_instr(`%X%`_ishape((Pnn : Pnn <: Jnn), `%`_dim(M)))], [VCONST_instr(V128_vectype, c)]) - -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_2)) - -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) - -- if (c = $invlanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), RELAXED_SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`(instr*, instr*) `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + ;; 8-reduction.watsup + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + ;; 8-reduction.watsup rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Jnn_2 : Jnn, M_2 : M, Jnn_1 : Jnn, M_1 : M, sx : sx, c : vec_(V128_Vnn), `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}: `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(`%X%`_ishape(Jnn_2, `%`_dim(M_2)), `%X%`_ishape(Jnn_1, `%`_dim(M_1)), sx)], [VCONST_instr(V128_vectype, c)]) @@ -6301,89 +6565,89 @@ relation Step: `%~>%`(config, config) `%~>%`(`%;%`_config(z, [REF.ARRAY_ADDR_instr(a) CONST_instr(I32_numtype, `%`_num_(i)) (val : val <: instr) ARRAY.SET_instr(x)]), `%;%`_config($with_array(z, a, i, $packfield_(zt, val)), [])) -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 8-reduction.watsup:806.1-807.56 + ;; 8-reduction.watsup:823.1-824.56 rule local.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) LOCAL.SET_instr(x)]), `%;%`_config($with_local(z, x, val), [])) - ;; 8-reduction.watsup:819.1-820.58 + ;; 8-reduction.watsup:836.1-837.58 rule global.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) GLOBAL.SET_instr(x)]), `%;%`_config($with_global(z, x, val), [])) - ;; 8-reduction.watsup:833.1-835.33 + ;; 8-reduction.watsup:850.1-852.33 rule `table.set-oob`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config(z, [TRAP_instr])) -- if (i >= |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:837.1-839.32 + ;; 8-reduction.watsup:854.1-856.32 rule `table.set-val`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config($with_table(z, x, i, ref), [])) -- if (i < |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:847.1-850.46 + ;; 8-reduction.watsup:864.1-867.46 rule `table.grow-succeed`{z : state, ref : ref, n : n, x : idx, ti : tableinst}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr(I32_numtype, `%`_num_(|$table(z, x).REFS_tableinst|))])) -- if (ti = $growtable($table(z, x), n, ref)) - ;; 8-reduction.watsup:852.1-853.81 + ;; 8-reduction.watsup:869.1-870.81 rule `table.grow-fail`{z : state, ref : ref, n : n, x : idx}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:913.1-914.51 + ;; 8-reduction.watsup:930.1-931.51 rule elem.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [ELEM.DROP_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) - ;; 8-reduction.watsup:997.1-1000.60 + ;; 8-reduction.watsup:1014.1-1017.60 rule `store-num-oob`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($size(nt) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1002.1-1006.29 + ;; 8-reduction.watsup:1019.1-1023.29 rule `store-num-val`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($size(nt) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $nbytes_(nt, c)) - ;; 8-reduction.watsup:1008.1-1011.52 + ;; 8-reduction.watsup:1025.1-1028.52 rule `store-pack-oob`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + (n / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1013.1-1017.52 + ;; 8-reduction.watsup:1030.1-1034.52 rule `store-pack-val`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (n / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : Inn <: numtype)), n, c))) - ;; 8-reduction.watsup:1019.1-1021.63 + ;; 8-reduction.watsup:1036.1-1038.63 rule `vstore-oob`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($vsize(V128_vectype) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1023.1-1025.31 + ;; 8-reduction.watsup:1040.1-1042.31 rule `vstore-val`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($vsize(V128_vectype) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) - ;; 8-reduction.watsup:1028.1-1030.50 + ;; 8-reduction.watsup:1045.1-1047.50 rule `vstore_lane-oob`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + N) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1032.1-1036.49 + ;; 8-reduction.watsup:1049.1-1053.49 rule `vstore_lane-val`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat, `b*` : byte*, Jnn : Jnn, M : M}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (N / 8), b*{b <- `b*`}), [])) -- if (N = $lsize((Jnn : Jnn <: lanetype))) -- if (M = (128 / N)) -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)[j]!`%`_lane_.0))) - ;; 8-reduction.watsup:1044.1-1047.37 + ;; 8-reduction.watsup:1061.1-1064.37 rule `memory.grow-succeed`{z : state, n : n, x : idx, mi : meminst}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr(I32_numtype, `%`_num_((|$mem(z, x).BYTES_meminst| / (64 * $Ki))))])) -- if (mi = $growmem($mem(z, x), n)) - ;; 8-reduction.watsup:1049.1-1050.78 + ;; 8-reduction.watsup:1066.1-1067.78 rule `memory.grow-fail`{z : state, n : n, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:1110.1-1111.51 + ;; 8-reduction.watsup:1127.1-1128.51 rule data.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [DATA.DROP_instr(x)]), `%;%`_config($with_data(z, x, []), [])) } @@ -7033,7 +7297,7 @@ grammar Blaneidx : laneidx ;; A-binary.watsup rec { -;; A-binary.watsup:971.1-981.66 +;; A-binary.watsup:992.1-1006.73 grammar Binstr : instr ;; A-binary.watsup:214.5-214.24 prod 0x00 => UNREACHABLE_instr @@ -7563,430 +7827,462 @@ grammar Binstr : instr prod{`b*` : byte*} {0xFD `%`_u32(12):Bu32 b:Bbyte^16{b <- `b*`}} => VCONST_instr(V128_vectype, $invibytes_(128, b^16{b <- `b*`})) ;; A-binary.watsup:625.5-625.58 prod{l : labelidx} {0xFD `%`_u32(13):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx^16{}} => VSHUFFLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), [`%`_uN(l!`%`_labelidx.0)]) - ;; A-binary.watsup:626.5-626.40 - prod {0xFD `%`_u32(14):Bu32} => VSWIZZLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:630.5-630.38 - prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) + ;; A-binary.watsup:626.5-626.49 + prod {0xFD `%`_u32(14):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SWIZZLE_vswizzlop_) + ;; A-binary.watsup:627.5-627.58 + prod {0xFD `%`_u32(256):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), RELAXED_SWIZZLE_vswizzlop_) ;; A-binary.watsup:631.5-631.38 - prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) + prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) ;; A-binary.watsup:632.5-632.38 - prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) ;; A-binary.watsup:633.5-633.38 - prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) + prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) ;; A-binary.watsup:634.5-634.38 - prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) ;; A-binary.watsup:635.5-635.38 + prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + ;; A-binary.watsup:636.5-636.38 prod {0xFD `%`_u32(20):Bu32} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2))) - ;; A-binary.watsup:639.5-639.60 - prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:640.5-640.60 + prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:641.5-641.60 prod{l : labelidx} {0xFD `%`_u32(22):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:641.5-641.58 + ;; A-binary.watsup:642.5-642.58 prod{l : labelidx} {0xFD `%`_u32(23):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:642.5-642.60 - prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:643.5-643.60 + prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:644.5-644.60 prod{l : labelidx} {0xFD `%`_u32(25):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:644.5-644.58 - prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:645.5-645.58 - prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:646.5-646.58 - prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:647.5-647.58 - prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:648.5-648.58 - prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:649.5-649.58 - prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:650.5-650.58 - prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:651.5-651.58 - prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:652.5-652.58 + prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:653.5-653.58 prod{l : labelidx} {0xFD `%`_u32(34):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:656.5-656.41 - prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) ;; A-binary.watsup:657.5-657.41 + prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) + ;; A-binary.watsup:658.5-658.41 prod {0xFD `%`_u32(36):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NE_vrelop_) - ;; A-binary.watsup:658.5-658.45 - prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:659.5-659.45 - prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:660.5-660.45 - prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) ;; A-binary.watsup:661.5-661.45 - prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) ;; A-binary.watsup:662.5-662.45 - prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) ;; A-binary.watsup:663.5-663.45 - prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) ;; A-binary.watsup:664.5-664.45 - prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) ;; A-binary.watsup:665.5-665.45 + prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:666.5-666.45 prod {0xFD `%`_u32(44):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:669.5-669.41 - prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) ;; A-binary.watsup:670.5-670.41 + prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) + ;; A-binary.watsup:671.5-671.41 prod {0xFD `%`_u32(46):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NE_vrelop_) - ;; A-binary.watsup:671.5-671.45 - prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:672.5-672.45 - prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:673.5-673.45 - prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) ;; A-binary.watsup:674.5-674.45 - prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) ;; A-binary.watsup:675.5-675.45 - prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) ;; A-binary.watsup:676.5-676.45 - prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) ;; A-binary.watsup:677.5-677.45 - prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) ;; A-binary.watsup:678.5-678.45 + prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:679.5-679.45 prod {0xFD `%`_u32(54):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:682.5-682.41 - prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:683.5-683.41 + prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) + ;; A-binary.watsup:684.5-684.41 prod {0xFD `%`_u32(56):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NE_vrelop_) - ;; A-binary.watsup:684.5-684.45 - prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:685.5-685.45 - prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:686.5-686.45 - prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) ;; A-binary.watsup:687.5-687.45 - prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) ;; A-binary.watsup:688.5-688.45 - prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) ;; A-binary.watsup:689.5-689.45 - prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) ;; A-binary.watsup:690.5-690.45 - prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) ;; A-binary.watsup:691.5-691.45 + prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:692.5-692.45 prod {0xFD `%`_u32(64):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:695.5-695.41 - prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:696.5-696.41 - prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) + prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:697.5-697.41 - prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) + prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) ;; A-binary.watsup:698.5-698.41 - prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) + prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) ;; A-binary.watsup:699.5-699.41 - prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) ;; A-binary.watsup:700.5-700.41 + prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + ;; A-binary.watsup:701.5-701.41 prod {0xFD `%`_u32(70):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GE_vrelop_) - ;; A-binary.watsup:704.5-704.41 - prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:705.5-705.41 - prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) + prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:706.5-706.41 - prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) + prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) ;; A-binary.watsup:707.5-707.41 - prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) + prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) ;; A-binary.watsup:708.5-708.41 - prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) ;; A-binary.watsup:709.5-709.41 + prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + ;; A-binary.watsup:710.5-710.41 prod {0xFD `%`_u32(76):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GE_vrelop_) - ;; A-binary.watsup:713.5-713.36 + ;; A-binary.watsup:714.5-714.36 prod {0xFD `%`_u32(77):Bu32} => VVUNOP_instr(V128_vectype, NOT_vvunop) - ;; A-binary.watsup:717.5-717.37 + ;; A-binary.watsup:718.5-718.37 prod {0xFD `%`_u32(78):Bu32} => VVBINOP_instr(V128_vectype, AND_vvbinop) - ;; A-binary.watsup:718.5-718.40 + ;; A-binary.watsup:719.5-719.40 prod {0xFD `%`_u32(79):Bu32} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) - ;; A-binary.watsup:719.5-719.36 + ;; A-binary.watsup:720.5-720.36 prod {0xFD `%`_u32(80):Bu32} => VVBINOP_instr(V128_vectype, OR_vvbinop) - ;; A-binary.watsup:720.5-720.37 + ;; A-binary.watsup:721.5-721.37 prod {0xFD `%`_u32(81):Bu32} => VVBINOP_instr(V128_vectype, XOR_vvbinop) - ;; A-binary.watsup:724.5-724.44 + ;; A-binary.watsup:725.5-725.44 prod {0xFD `%`_u32(82):Bu32} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) - ;; A-binary.watsup:728.5-728.43 + ;; A-binary.watsup:729.5-729.43 prod {0xFD `%`_u32(83):Bu32} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) - ;; A-binary.watsup:732.5-732.41 - prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) ;; A-binary.watsup:733.5-733.41 + prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) + ;; A-binary.watsup:734.5-734.41 prod {0xFD `%`_u32(97):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NEG_vunop_) - ;; A-binary.watsup:734.5-734.44 + ;; A-binary.watsup:735.5-735.44 prod {0xFD `%`_u32(98):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), POPCNT_vunop_) - ;; A-binary.watsup:738.5-738.48 + ;; A-binary.watsup:739.5-739.48 prod {0xFD `%`_u32(99):Bu32} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:742.5-742.41 + ;; A-binary.watsup:743.5-743.41 prod {0xFD `%`_u32(100):Bu32} => VBITMASK_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:746.5-746.53 - prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) ;; A-binary.watsup:747.5-747.53 + prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) + ;; A-binary.watsup:748.5-748.53 prod {0xFD `%`_u32(102):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), U_sx) - ;; A-binary.watsup:751.5-751.45 + ;; A-binary.watsup:752.5-752.45 prod {0xFD `%`_u32(107):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHL_vshiftop_) - ;; A-binary.watsup:752.5-752.49 - prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) ;; A-binary.watsup:753.5-753.49 + prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) + ;; A-binary.watsup:754.5-754.49 prod {0xFD `%`_u32(109):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:757.5-757.43 + ;; A-binary.watsup:758.5-758.43 prod {0xFD `%`_u32(110):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_vbinop_) - ;; A-binary.watsup:758.5-758.51 - prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) ;; A-binary.watsup:759.5-759.51 + prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:760.5-760.51 prod {0xFD `%`_u32(112):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:760.5-760.43 + ;; A-binary.watsup:761.5-761.43 prod {0xFD `%`_u32(113):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_vbinop_) - ;; A-binary.watsup:761.5-761.51 - prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) ;; A-binary.watsup:762.5-762.51 + prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:763.5-763.51 prod {0xFD `%`_u32(115):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:763.5-763.47 - prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:764.5-764.47 - prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) + prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:765.5-765.47 - prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) ;; A-binary.watsup:766.5-766.47 + prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + ;; A-binary.watsup:767.5-767.47 prod {0xFD `%`_u32(121):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:767.5-767.48 + ;; A-binary.watsup:768.5-768.48 prod {0xFD `%`_u32(123):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `AVGRU`_vbinop_) - ;; A-binary.watsup:771.5-771.72 - prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) ;; A-binary.watsup:772.5-772.72 + prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; A-binary.watsup:773.5-773.72 prod {0xFD `%`_u32(125):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:776.5-776.42 - prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) ;; A-binary.watsup:777.5-777.42 + prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) + ;; A-binary.watsup:778.5-778.42 prod {0xFD `%`_u32(129):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NEG_vunop_) - ;; A-binary.watsup:781.5-781.55 + ;; A-binary.watsup:782.5-782.55 prod {0xFD `%`_u32(130):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `Q15MULR_SATS`_vbinop_) - ;; A-binary.watsup:785.5-785.49 + ;; A-binary.watsup:783.5-783.59 + prod {0xFD `%`_u32(273):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `RELAXED_Q15MULRS`_vbinop_) + ;; A-binary.watsup:787.5-787.49 prod {0xFD `%`_u32(131):Bu32} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:789.5-789.41 + ;; A-binary.watsup:791.5-791.41 prod {0xFD `%`_u32(132):Bu32} => VBITMASK_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8))) - ;; A-binary.watsup:793.5-793.53 + ;; A-binary.watsup:795.5-795.53 prod {0xFD `%`_u32(133):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), S_sx) - ;; A-binary.watsup:794.5-794.53 + ;; A-binary.watsup:796.5-796.53 prod {0xFD `%`_u32(134):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), U_sx) - ;; A-binary.watsup:798.5-798.65 + ;; A-binary.watsup:800.5-800.65 prod {0xFD `%`_u32(135):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:799.5-799.66 + ;; A-binary.watsup:801.5-801.66 prod {0xFD `%`_u32(136):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:800.5-800.65 + ;; A-binary.watsup:802.5-802.65 prod {0xFD `%`_u32(137):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:801.5-801.66 + ;; A-binary.watsup:803.5-803.66 prod {0xFD `%`_u32(138):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:805.5-805.45 + ;; A-binary.watsup:807.5-807.45 prod {0xFD `%`_u32(139):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHL_vshiftop_) - ;; A-binary.watsup:806.5-806.49 + ;; A-binary.watsup:808.5-808.49 prod {0xFD `%`_u32(140):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:807.5-807.49 + ;; A-binary.watsup:809.5-809.49 prod {0xFD `%`_u32(141):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:811.5-811.43 + ;; A-binary.watsup:813.5-813.43 prod {0xFD `%`_u32(142):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_vbinop_) - ;; A-binary.watsup:812.5-812.51 + ;; A-binary.watsup:814.5-814.51 prod {0xFD `%`_u32(143):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:813.5-813.51 + ;; A-binary.watsup:815.5-815.51 prod {0xFD `%`_u32(144):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:814.5-814.43 + ;; A-binary.watsup:816.5-816.43 prod {0xFD `%`_u32(145):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_vbinop_) - ;; A-binary.watsup:815.5-815.51 + ;; A-binary.watsup:817.5-817.51 prod {0xFD `%`_u32(146):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:816.5-816.51 + ;; A-binary.watsup:818.5-818.51 prod {0xFD `%`_u32(147):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:817.5-817.43 + ;; A-binary.watsup:819.5-819.43 prod {0xFD `%`_u32(149):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MUL_vbinop_) - ;; A-binary.watsup:818.5-818.47 + ;; A-binary.watsup:820.5-820.47 prod {0xFD `%`_u32(150):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:819.5-819.47 + ;; A-binary.watsup:821.5-821.47 prod {0xFD `%`_u32(151):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:820.5-820.47 + ;; A-binary.watsup:822.5-822.47 prod {0xFD `%`_u32(152):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:821.5-821.47 + ;; A-binary.watsup:823.5-823.47 prod {0xFD `%`_u32(153):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:822.5-822.48 + ;; A-binary.watsup:824.5-824.48 prod {0xFD `%`_u32(155):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `AVGRU`_vbinop_) - ;; A-binary.watsup:826.5-826.68 + ;; A-binary.watsup:828.5-828.68 prod {0xFD `%`_u32(156):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:827.5-827.69 + ;; A-binary.watsup:829.5-829.69 prod {0xFD `%`_u32(157):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:828.5-828.68 + ;; A-binary.watsup:830.5-830.68 prod {0xFD `%`_u32(158):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:829.5-829.69 + ;; A-binary.watsup:831.5-831.69 prod {0xFD `%`_u32(159):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:833.5-833.72 + ;; A-binary.watsup:832.5-832.69 + prod {0xFD `%`_u32(274):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), `RELAXED_DOTS`_vextbinop__) + ;; A-binary.watsup:836.5-836.72 prod {0xFD `%`_u32(126):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; A-binary.watsup:834.5-834.72 + ;; A-binary.watsup:837.5-837.72 prod {0xFD `%`_u32(127):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:838.5-838.42 + ;; A-binary.watsup:841.5-841.42 prod {0xFD `%`_u32(160):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:839.5-839.42 + ;; A-binary.watsup:842.5-842.42 prod {0xFD `%`_u32(161):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:843.5-843.49 + ;; A-binary.watsup:846.5-846.49 prod {0xFD `%`_u32(163):Bu32} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:847.5-847.41 + ;; A-binary.watsup:850.5-850.41 prod {0xFD `%`_u32(164):Bu32} => VBITMASK_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4))) - ;; A-binary.watsup:851.5-851.65 + ;; A-binary.watsup:854.5-854.65 prod {0xFD `%`_u32(167):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:852.5-852.66 + ;; A-binary.watsup:855.5-855.66 prod {0xFD `%`_u32(168):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:853.5-853.65 + ;; A-binary.watsup:856.5-856.65 prod {0xFD `%`_u32(169):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:854.5-854.66 + ;; A-binary.watsup:857.5-857.66 prod {0xFD `%`_u32(170):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:858.5-858.45 + ;; A-binary.watsup:861.5-861.45 prod {0xFD `%`_u32(171):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHL_vshiftop_) - ;; A-binary.watsup:859.5-859.49 + ;; A-binary.watsup:862.5-862.49 prod {0xFD `%`_u32(172):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:860.5-860.49 + ;; A-binary.watsup:863.5-863.49 prod {0xFD `%`_u32(173):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:864.5-864.43 + ;; A-binary.watsup:867.5-867.43 prod {0xFD `%`_u32(174):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:865.5-865.43 + ;; A-binary.watsup:868.5-868.43 prod {0xFD `%`_u32(177):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:866.5-866.43 + ;; A-binary.watsup:869.5-869.43 prod {0xFD `%`_u32(181):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:867.5-867.47 + ;; A-binary.watsup:870.5-870.47 prod {0xFD `%`_u32(182):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:868.5-868.47 + ;; A-binary.watsup:871.5-871.47 prod {0xFD `%`_u32(183):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:869.5-869.47 + ;; A-binary.watsup:872.5-872.47 prod {0xFD `%`_u32(184):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:870.5-870.47 + ;; A-binary.watsup:873.5-873.47 prod {0xFD `%`_u32(185):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:874.5-874.61 + ;; A-binary.watsup:877.5-877.61 prod {0xFD `%`_u32(186):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `DOTS`_vextbinop__) - ;; A-binary.watsup:875.5-875.68 + ;; A-binary.watsup:878.5-878.68 prod {0xFD `%`_u32(188):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:876.5-876.69 + ;; A-binary.watsup:879.5-879.69 prod {0xFD `%`_u32(189):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:877.5-877.68 + ;; A-binary.watsup:880.5-880.68 prod {0xFD `%`_u32(190):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:878.5-878.69 + ;; A-binary.watsup:881.5-881.69 prod {0xFD `%`_u32(191):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:882.5-882.42 + ;; A-binary.watsup:885.5-885.74 + prod {0xFD `%`_u32(275):Bu32} => VEXTTERNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `RELAXED_DOT_ADDS`_vextternop__) + ;; A-binary.watsup:889.5-889.42 prod {0xFD `%`_u32(192):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:883.5-883.42 + ;; A-binary.watsup:890.5-890.42 prod {0xFD `%`_u32(193):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:887.5-887.49 + ;; A-binary.watsup:894.5-894.49 prod {0xFD `%`_u32(195):Bu32} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:891.5-891.41 + ;; A-binary.watsup:898.5-898.41 prod {0xFD `%`_u32(196):Bu32} => VBITMASK_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2))) - ;; A-binary.watsup:895.5-895.65 + ;; A-binary.watsup:902.5-902.65 prod {0xFD `%`_u32(199):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:896.5-896.66 + ;; A-binary.watsup:903.5-903.66 prod {0xFD `%`_u32(200):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:897.5-897.65 + ;; A-binary.watsup:904.5-904.65 prod {0xFD `%`_u32(201):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:898.5-898.66 + ;; A-binary.watsup:905.5-905.66 prod {0xFD `%`_u32(202):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:902.5-902.45 + ;; A-binary.watsup:909.5-909.45 prod {0xFD `%`_u32(203):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHL_vshiftop_) - ;; A-binary.watsup:903.5-903.49 + ;; A-binary.watsup:910.5-910.49 prod {0xFD `%`_u32(204):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:904.5-904.49 + ;; A-binary.watsup:911.5-911.49 prod {0xFD `%`_u32(205):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:908.5-908.43 + ;; A-binary.watsup:915.5-915.43 prod {0xFD `%`_u32(206):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:909.5-909.43 + ;; A-binary.watsup:916.5-916.43 prod {0xFD `%`_u32(209):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:910.5-910.43 + ;; A-binary.watsup:917.5-917.43 prod {0xFD `%`_u32(213):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:914.5-914.42 + ;; A-binary.watsup:921.5-921.42 prod {0xFD `%`_u32(214):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), EQ_vrelop_) - ;; A-binary.watsup:915.5-915.42 + ;; A-binary.watsup:922.5-922.42 prod {0xFD `%`_u32(215):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NE_vrelop_) - ;; A-binary.watsup:916.5-916.46 + ;; A-binary.watsup:923.5-923.46 prod {0xFD `%`_u32(216):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LT_vrelop_(S_sx)) - ;; A-binary.watsup:917.5-917.46 + ;; A-binary.watsup:924.5-924.46 prod {0xFD `%`_u32(217):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GT_vrelop_(S_sx)) - ;; A-binary.watsup:918.5-918.46 + ;; A-binary.watsup:925.5-925.46 prod {0xFD `%`_u32(218):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LE_vrelop_(S_sx)) - ;; A-binary.watsup:919.5-919.46 + ;; A-binary.watsup:926.5-926.46 prod {0xFD `%`_u32(219):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GE_vrelop_(S_sx)) - ;; A-binary.watsup:923.5-923.68 + ;; A-binary.watsup:930.5-930.68 prod {0xFD `%`_u32(220):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:924.5-924.69 + ;; A-binary.watsup:931.5-931.69 prod {0xFD `%`_u32(221):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:925.5-925.68 + ;; A-binary.watsup:932.5-932.68 prod {0xFD `%`_u32(222):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:926.5-926.69 + ;; A-binary.watsup:933.5-933.69 prod {0xFD `%`_u32(223):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:930.5-930.43 + ;; A-binary.watsup:937.5-937.43 prod {0xFD `%`_u32(103):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), CEIL_vunop_) - ;; A-binary.watsup:931.5-931.44 + ;; A-binary.watsup:938.5-938.44 prod {0xFD `%`_u32(104):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), FLOOR_vunop_) - ;; A-binary.watsup:932.5-932.44 + ;; A-binary.watsup:939.5-939.44 prod {0xFD `%`_u32(105):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_vunop_) - ;; A-binary.watsup:933.5-933.46 + ;; A-binary.watsup:940.5-940.46 prod {0xFD `%`_u32(106):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEAREST_vunop_) - ;; A-binary.watsup:934.5-934.42 + ;; A-binary.watsup:941.5-941.42 prod {0xFD `%`_u32(224):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:935.5-935.42 + ;; A-binary.watsup:942.5-942.42 prod {0xFD `%`_u32(225):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:936.5-936.43 + ;; A-binary.watsup:943.5-943.43 prod {0xFD `%`_u32(227):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SQRT_vunop_) - ;; A-binary.watsup:940.5-940.43 + ;; A-binary.watsup:947.5-947.43 prod {0xFD `%`_u32(228):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:941.5-941.43 + ;; A-binary.watsup:948.5-948.43 prod {0xFD `%`_u32(229):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:942.5-942.43 + ;; A-binary.watsup:949.5-949.43 prod {0xFD `%`_u32(230):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:943.5-943.43 + ;; A-binary.watsup:950.5-950.43 prod {0xFD `%`_u32(231):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), DIV_vbinop_) - ;; A-binary.watsup:944.5-944.43 + ;; A-binary.watsup:951.5-951.43 prod {0xFD `%`_u32(232):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MIN_vbinop_) - ;; A-binary.watsup:945.5-945.43 + ;; A-binary.watsup:952.5-952.43 prod {0xFD `%`_u32(233):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MAX_vbinop_) - ;; A-binary.watsup:946.5-946.44 + ;; A-binary.watsup:953.5-953.44 prod {0xFD `%`_u32(234):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMIN_vbinop_) - ;; A-binary.watsup:947.5-947.44 + ;; A-binary.watsup:954.5-954.44 prod {0xFD `%`_u32(235):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMAX_vbinop_) - ;; A-binary.watsup:951.5-951.43 + ;; A-binary.watsup:955.5-955.51 + prod {0xFD `%`_u32(269):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:956.5-956.51 + prod {0xFD `%`_u32(270):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:960.5-960.53 + prod {0xFD `%`_u32(261):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:961.5-961.54 + prod {0xFD `%`_u32(262):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:965.5-965.43 prod {0xFD `%`_u32(116):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), CEIL_vunop_) - ;; A-binary.watsup:952.5-952.44 + ;; A-binary.watsup:966.5-966.44 prod {0xFD `%`_u32(117):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), FLOOR_vunop_) - ;; A-binary.watsup:953.5-953.44 + ;; A-binary.watsup:967.5-967.44 prod {0xFD `%`_u32(122):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_vunop_) - ;; A-binary.watsup:954.5-954.46 + ;; A-binary.watsup:968.5-968.46 prod {0xFD `%`_u32(148):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEAREST_vunop_) - ;; A-binary.watsup:955.5-955.42 + ;; A-binary.watsup:969.5-969.42 prod {0xFD `%`_u32(236):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:956.5-956.42 + ;; A-binary.watsup:970.5-970.42 prod {0xFD `%`_u32(237):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:957.5-957.43 + ;; A-binary.watsup:971.5-971.43 prod {0xFD `%`_u32(239):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SQRT_vunop_) - ;; A-binary.watsup:961.5-961.43 + ;; A-binary.watsup:975.5-975.43 prod {0xFD `%`_u32(240):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:962.5-962.43 + ;; A-binary.watsup:976.5-976.43 prod {0xFD `%`_u32(241):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:963.5-963.43 + ;; A-binary.watsup:977.5-977.43 prod {0xFD `%`_u32(242):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:964.5-964.43 + ;; A-binary.watsup:978.5-978.43 prod {0xFD `%`_u32(243):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), DIV_vbinop_) - ;; A-binary.watsup:965.5-965.43 + ;; A-binary.watsup:979.5-979.43 prod {0xFD `%`_u32(244):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MIN_vbinop_) - ;; A-binary.watsup:966.5-966.43 + ;; A-binary.watsup:980.5-980.43 prod {0xFD `%`_u32(245):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MAX_vbinop_) - ;; A-binary.watsup:967.5-967.44 + ;; A-binary.watsup:981.5-981.44 prod {0xFD `%`_u32(246):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMIN_vbinop_) - ;; A-binary.watsup:968.5-968.44 + ;; A-binary.watsup:982.5-982.44 prod {0xFD `%`_u32(247):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMAX_vbinop_) - ;; A-binary.watsup:972.5-972.61 + ;; A-binary.watsup:983.5-983.51 + prod {0xFD `%`_u32(271):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:984.5-984.51 + prod {0xFD `%`_u32(272):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:988.5-988.53 + prod {0xFD `%`_u32(263):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:989.5-989.54 + prod {0xFD `%`_u32(264):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:993.5-993.61 prod {0xFD `%`_u32(94):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), DEMOTE_vcvtop__, ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:973.5-973.61 + ;; A-binary.watsup:994.5-994.61 prod {0xFD `%`_u32(95):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(F32_lanetype, `%`_dim(4)), PROMOTE_vcvtop__, ?(LOW_half__), ?()) - ;; A-binary.watsup:974.5-974.64 + ;; A-binary.watsup:995.5-995.64 prod {0xFD `%`_u32(248):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:975.5-975.64 + ;; A-binary.watsup:996.5-996.64 prod {0xFD `%`_u32(249):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:976.5-976.62 + ;; A-binary.watsup:997.5-997.62 prod {0xFD `%`_u32(250):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:977.5-977.62 + ;; A-binary.watsup:998.5-998.62 prod {0xFD `%`_u32(251):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:978.5-978.69 + ;; A-binary.watsup:999.5-999.69 prod {0xFD `%`_u32(252):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:979.5-979.69 + ;; A-binary.watsup:1000.5-1000.69 prod {0xFD `%`_u32(253):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:980.5-980.66 + ;; A-binary.watsup:1001.5-1001.66 prod {0xFD `%`_u32(254):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:981.5-981.66 + ;; A-binary.watsup:1002.5-1002.66 prod {0xFD `%`_u32(255):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(LOW_half__), ?()) + ;; A-binary.watsup:1003.5-1003.68 + prod {0xFD `%`_u32(257):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?()) + ;; A-binary.watsup:1004.5-1004.68 + prod {0xFD `%`_u32(258):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?()) + ;; A-binary.watsup:1005.5-1005.73 + prod {0xFD `%`_u32(259):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) + ;; A-binary.watsup:1006.5-1006.73 + prod {0xFD `%`_u32(260):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) } ;; A-binary.watsup @@ -8390,6 +8686,17 @@ def $sum(nat*) : nat def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) } +;; 0-aux.watsup +rec { + +;; 0-aux.watsup:37.1-37.57 +def $prod(nat*) : nat + ;; 0-aux.watsup:38.1-38.19 + def $prod([]) = 1 + ;; 0-aux.watsup:39.1-39.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + ;; 0-aux.watsup def $opt_(syntax X, X*) : X? ;; 0-aux.watsup @@ -8407,47 +8714,47 @@ def $list_(syntax X, X?) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:49.1-49.55 +;; 0-aux.watsup:53.1-53.55 def $concat_(syntax X, X**) : X* - ;; 0-aux.watsup:50.1-50.34 + ;; 0-aux.watsup:54.1-54.34 def $concat_{syntax X}(syntax X, []) = [] - ;; 0-aux.watsup:51.1-51.64 + ;; 0-aux.watsup:55.1-55.64 def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:53.1-53.61 +;; 0-aux.watsup:57.1-57.61 def $concatn_(syntax X, X**, nat : nat) : X* - ;; 0-aux.watsup:54.1-54.38 + ;; 0-aux.watsup:58.1-58.38 def $concatn_{syntax X, n : n}(syntax X, [], n) = [] - ;; 0-aux.watsup:55.1-55.73 + ;; 0-aux.watsup:59.1-59.73 def $concatn_{syntax X, `w*` : X*, n : n, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:57.1-57.78 +;; 0-aux.watsup:61.1-61.78 def $disjoint_(syntax X, X*) : bool - ;; 0-aux.watsup:58.1-58.37 + ;; 0-aux.watsup:62.1-62.37 def $disjoint_{syntax X}(syntax X, []) = true - ;; 0-aux.watsup:59.1-59.68 + ;; 0-aux.watsup:63.1-63.68 def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ w <- w'*{w' <- `w'*`} /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:62.1-62.38 +;; 0-aux.watsup:66.1-66.38 def $setminus1_(syntax X, X : X, X*) : X* - ;; 0-aux.watsup:66.1-66.38 + ;; 0-aux.watsup:70.1-70.38 def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] - ;; 0-aux.watsup:67.1-67.78 + ;; 0-aux.watsup:71.1-71.78 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = [] -- if (w = w_1) - ;; 0-aux.watsup:68.1-68.77 + ;; 0-aux.watsup:72.1-72.77 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = $setminus1_(syntax X, w, w'*{w' <- `w'*`}) -- otherwise } @@ -8455,47 +8762,50 @@ def $setminus1_(syntax X, X : X, X*) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:61.1-61.56 +;; 0-aux.watsup:65.1-65.56 def $setminus_(syntax X, X*, X*) : X* - ;; 0-aux.watsup:64.1-64.40 + ;; 0-aux.watsup:68.1-68.40 def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] - ;; 0-aux.watsup:65.1-65.90 + ;; 0-aux.watsup:69.1-69.90 def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:73.1-73.46 +;; 0-aux.watsup:77.1-77.46 def $setproduct2_(syntax X, X : X, X**) : X** - ;; 0-aux.watsup:79.1-79.44 + ;; 0-aux.watsup:83.1-83.44 def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] - ;; 0-aux.watsup:80.1-80.90 + ;; 0-aux.watsup:84.1-84.90 def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:72.1-72.47 +;; 0-aux.watsup:76.1-76.47 def $setproduct1_(syntax X, X*, X**) : X** - ;; 0-aux.watsup:77.1-77.46 + ;; 0-aux.watsup:81.1-81.46 def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] - ;; 0-aux.watsup:78.1-78.107 + ;; 0-aux.watsup:82.1-82.107 def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:71.1-71.82 +;; 0-aux.watsup:75.1-75.82 def $setproduct_(syntax X, X**) : X** - ;; 0-aux.watsup:75.1-75.40 + ;; 0-aux.watsup:79.1-79.40 def $setproduct_{syntax X}(syntax X, []) = [[]] - ;; 0-aux.watsup:76.1-76.90 + ;; 0-aux.watsup:80.1-80.90 def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) } +;; 1-syntax.watsup +def $ND : bool + ;; 1-syntax.watsup syntax list{syntax X}(syntax X) = | `%`{`X*` : X*}(X*{X <- `X*`} : X*) @@ -8622,7 +8932,7 @@ def $cont(byte : byte) : nat ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:87.1-87.25 +;; 1-syntax.watsup:94.1-94.25 def $utf8(char*) : byte* ;; A-binary.watsup:53.1-53.44 def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8([ch])*{ch <- `ch*`}) @@ -8746,13 +9056,13 @@ syntax fin = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:155.1-156.26 +;; 1-syntax.watsup:162.1-163.26 syntax typeuse = | _IDX{typeidx : typeidx}(typeidx : typeidx) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) | REC{n : n}(n : n) -;; 1-syntax.watsup:158.1-159.26 +;; 1-syntax.watsup:165.1-166.26 syntax heaptype = | ANY | EQ @@ -8771,7 +9081,7 @@ syntax heaptype = | REC{n : n}(n : n) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) -;; 1-syntax.watsup:166.1-167.14 +;; 1-syntax.watsup:173.1-174.14 syntax valtype = | I32 | I64 @@ -8781,10 +9091,10 @@ syntax valtype = | REF{nul : nul, heaptype : heaptype}(nul : nul, heaptype : heaptype) | BOT -;; 1-syntax.watsup:196.1-197.16 +;; 1-syntax.watsup:203.1-204.16 syntax resulttype = list(syntax valtype) -;; 1-syntax.watsup:204.1-204.66 +;; 1-syntax.watsup:211.1-211.66 syntax storagetype = | BOT | I32 @@ -8796,31 +9106,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:220.1-220.60 +;; 1-syntax.watsup:227.1-227.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:222.1-222.90 +;; 1-syntax.watsup:229.1-229.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:223.1-223.64 +;; 1-syntax.watsup:230.1-230.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:224.1-224.54 +;; 1-syntax.watsup:231.1-231.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:226.1-229.18 +;; 1-syntax.watsup:233.1-236.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:231.1-232.30 +;; 1-syntax.watsup:238.1-239.30 syntax subtype = | SUB{fin : fin, `typeuse*` : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse <- `typeuse*`} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:234.1-235.22 +;; 1-syntax.watsup:241.1-242.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -9270,6 +9580,26 @@ def $shsize(shape : shape) : nat ;; 2-syntax-aux.watsup def $shsize{Lnn : Lnn, N : N}(`%X%`_shape(Lnn, `%`_dim(N))) = ($lsize(Lnn) * N) +;; 1-syntax.watsup +syntax half__(shape_1 : shape, shape_2 : shape) + ;; 1-syntax.watsup + syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = + | LOW + | HIGH + -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) + + + ;; 1-syntax.watsup + syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = + | LOW + -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) + + +;; 1-syntax.watsup +syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = + | ZERO + -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) + ;; 1-syntax.watsup syntax vvunop = | NOT @@ -9326,6 +9656,8 @@ syntax vbinop_(shape : shape) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) | `Q15MULR_SATS` -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | `RELAXED_Q15MULRS` + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) | MIN{sx : sx}(sx : sx) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) | MAX{sx : sx}(sx : sx) @@ -9342,6 +9674,21 @@ syntax vbinop_(shape : shape) | MAX | PMIN | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; 1-syntax.watsup +syntax vternop_(shape : shape) + ;; 1-syntax.watsup + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))) = + | RELAXED_LANESELECT + + + ;; 1-syntax.watsup + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))) = + | RELAXED_MADD + | RELAXED_NMADD ;; 1-syntax.watsup @@ -9392,6 +9739,8 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = | TRUNC_SAT{sx : sx}(sx : sx) -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_TRUNC{sx : sx}(sx : sx) + -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup @@ -9403,24 +9752,9 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) ;; 1-syntax.watsup -syntax half__(shape_1 : shape, shape_2 : shape) - ;; 1-syntax.watsup - syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = - | LOW - | HIGH - -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) - - - ;; 1-syntax.watsup - syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = - | LOW - -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) - - -;; 1-syntax.watsup -syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = - | ZERO - -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) +syntax vswizzlop_{M : M}(`%X%`_ishape(I8_Jnn, `%`_dim(M))) = + | SWIZZLE + | RELAXED_SWIZZLE ;; 1-syntax.watsup syntax vshiftop_{Jnn : Jnn, M : M}(`%X%`_ishape(Jnn, `%`_dim(M))) = @@ -9438,6 +9772,13 @@ syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_ -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) | `DOTS` -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | `RELAXED_DOTS` + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; 1-syntax.watsup +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2))) = + | `RELAXED_DOT_ADDS` + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup syntax memarg = @@ -9612,20 +9953,20 @@ syntax instr = | VVTESTOP{vectype : vectype, vvtestop : vvtestop}(vectype : vectype, vvtestop : vvtestop) | VUNOP{shape : shape, vunop_ : vunop_(shape)}(shape : shape, vunop_ : vunop_(shape)) | VBINOP{shape : shape, vbinop_ : vbinop_(shape)}(shape : shape, vbinop_ : vbinop_(shape)) + | VTERNOP{shape : shape, vternop_ : vternop_(shape)}(shape : shape, vternop_ : vternop_(shape)) | VTESTOP{shape : shape, vtestop_ : vtestop_(shape)}(shape : shape, vtestop_ : vtestop_(shape)) | VRELOP{shape : shape, vrelop_ : vrelop_(shape)}(shape : shape, vrelop_ : vrelop_(shape)) | VSHIFTOP{ishape : ishape, vshiftop_ : vshiftop_(ishape)}(ishape : ishape, vshiftop_ : vshiftop_(ishape)) | VBITMASK{ishape : ishape}(ishape : ishape) - | VSWIZZLE{ishape : ishape}(ishape : ishape) - -- if (ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) + | VSWIZZLOP{ishape : ishape, vswizzlop_ : vswizzlop_(ishape)}(ishape : ishape, vswizzlop_ : vswizzlop_(ishape)) | VSHUFFLE{ishape : ishape, `laneidx*` : laneidx*}(ishape : ishape, laneidx*{laneidx <- `laneidx*`} : laneidx*) -- if ((ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) /\ (|laneidx*{laneidx <- `laneidx*`}| = 16)) | VEXTUNOP{ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)) | VEXTBINOP{ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP{ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)) | VNARROW{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(ishape_1 : ishape, ishape_2 : ishape, sx : sx) -- if (($lsize($lanetype((ishape_2 : ishape <: shape))) = (2 * $lsize($lanetype((ishape_1 : ishape <: shape))))) /\ ((2 * $lsize($lanetype((ishape_1 : ishape <: shape)))) <= 32)) | VCVTOP{shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), `half__?` : half__(shape_2, shape_1)?, `zero__?` : zero__(shape_2, shape_1)?}(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), half__?{half__ <- `half__?`} : half__(shape_2, shape_1)?, zero__?{zero__ <- `zero__?`} : zero__(shape_2, shape_1)?) - -- if ($lanetype(shape_1) =/= $lanetype(shape_2)) | VSPLAT{shape : shape}(shape : shape) | VEXTRACT_LANE{shape : shape, `sx?` : sx?, laneidx : laneidx, numtype : numtype}(shape : shape, sx?{sx <- `sx?`} : sx?, laneidx : laneidx) -- if ((sx?{sx <- `sx?`} = ?()) <=> ($lanetype(shape) = (numtype : numtype <: lanetype))) @@ -10133,13 +10474,13 @@ def $free_shape(shape : shape) : free ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:443.1-443.44 +;; 2-syntax-aux.watsup:444.1-444.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; 2-syntax-aux.watsup:444.1-444.32 + ;; 2-syntax-aux.watsup:445.1-445.32 def $shift_labelidxs([]) = [] - ;; 2-syntax-aux.watsup:445.1-445.66 + ;; 2-syntax-aux.watsup:446.1-446.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_uN(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; 2-syntax-aux.watsup:446.1-446.91 + ;; 2-syntax-aux.watsup:447.1-447.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_uN((labelidx!`%`_labelidx.0 - 1))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } @@ -10148,7 +10489,7 @@ rec { ;; 2-syntax-aux.watsup:299.1-299.31 def $free_block(instr*) : free - ;; 2-syntax-aux.watsup:449.1-450.47 + ;; 2-syntax-aux.watsup:450.1-451.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) @@ -10223,134 +10564,136 @@ def $free_instr(instr : instr) : free ;; 2-syntax-aux.watsup:347.1-347.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) ;; 2-syntax-aux.watsup:348.1-348.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; 2-syntax-aux.watsup:349.1-349.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:349.1-349.58 + ;; 2-syntax-aux.watsup:350.1-350.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:350.1-350.64 + ;; 2-syntax-aux.watsup:351.1-351.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:351.1-351.55 - def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) ;; 2-syntax-aux.watsup:352.1-352.55 - def $free_instr{ishape : ishape}(VSWIZZLE_instr(ishape)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:353.1-353.64 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:353.1-353.66 + def $free_instr{ishape : ishape, vswizzlop : vswizzlop_(ishape)}(VSWIZZLOP_instr(ishape, vswizzlop)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:354.1-354.64 def $free_instr{ishape : ishape, `laneidx*` : laneidx*}(VSHUFFLE_instr(ishape, laneidx*{laneidx <- `laneidx*`})) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:354.1-355.49 + ;; 2-syntax-aux.watsup:355.1-356.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:356.1-357.49 + ;; 2-syntax-aux.watsup:357.1-358.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:358.1-359.49 + ;; 2-syntax-aux.watsup:359.1-360.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:360.1-361.47 + ;; 2-syntax-aux.watsup:361.1-362.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1), `half?` : half__(shape_2, shape_1)?, `zero?` : zero__(shape_2, shape_1)?}(VCVTOP_instr(shape_1, shape_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`})) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; 2-syntax-aux.watsup:362.1-362.51 + ;; 2-syntax-aux.watsup:363.1-363.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:363.1-363.70 + ;; 2-syntax-aux.watsup:364.1-364.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:364.1-364.66 + ;; 2-syntax-aux.watsup:365.1-365.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:366.1-366.62 + ;; 2-syntax-aux.watsup:367.1-367.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; 2-syntax-aux.watsup:367.1-367.34 + ;; 2-syntax-aux.watsup:368.1-368.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:368.1-368.38 + ;; 2-syntax-aux.watsup:369.1-369.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:369.1-369.29 + ;; 2-syntax-aux.watsup:370.1-370.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:370.1-370.59 - def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:371.1-371.59 - def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:372.1-372.59 + def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + ;; 2-syntax-aux.watsup:373.1-373.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; 2-syntax-aux.watsup:373.1-373.30 + ;; 2-syntax-aux.watsup:374.1-374.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:375.1-375.33 + ;; 2-syntax-aux.watsup:376.1-376.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:377.1-377.41 + ;; 2-syntax-aux.watsup:378.1-378.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:378.1-378.69 - def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) ;; 2-syntax-aux.watsup:379.1-379.69 + def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) + ;; 2-syntax-aux.watsup:380.1-380.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:380.1-380.65 + ;; 2-syntax-aux.watsup:381.1-381.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:382.1-382.60 + ;; 2-syntax-aux.watsup:383.1-383.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:383.1-383.68 + ;; 2-syntax-aux.watsup:384.1-384.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:384.1-384.70 + ;; 2-syntax-aux.watsup:385.1-385.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:385.1-386.51 + ;; 2-syntax-aux.watsup:386.1-387.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:387.1-388.51 + ;; 2-syntax-aux.watsup:388.1-389.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:389.1-389.64 + ;; 2-syntax-aux.watsup:390.1-390.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:390.1-390.60 + ;; 2-syntax-aux.watsup:391.1-391.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:391.1-391.32 + ;; 2-syntax-aux.watsup:392.1-392.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:392.1-392.61 + ;; 2-syntax-aux.watsup:393.1-393.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:393.1-394.55 + ;; 2-syntax-aux.watsup:394.1-395.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; 2-syntax-aux.watsup:395.1-396.51 + ;; 2-syntax-aux.watsup:396.1-397.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:397.1-398.51 + ;; 2-syntax-aux.watsup:398.1-399.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:400.1-400.41 - def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} ;; 2-syntax-aux.watsup:401.1-401.41 + def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} + ;; 2-syntax-aux.watsup:402.1-402.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:403.1-403.63 - def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:404.1-404.63 - def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:405.1-405.63 + def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + ;; 2-syntax-aux.watsup:406.1-406.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; 2-syntax-aux.watsup:407.1-407.67 - def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) ;; 2-syntax-aux.watsup:408.1-408.67 + def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) + ;; 2-syntax-aux.watsup:409.1-409.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; 2-syntax-aux.watsup:410.1-410.63 - def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:411.1-411.63 + def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:412.1-412.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:412.1-412.64 - def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:413.1-413.64 - def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:414.1-414.64 + def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:415.1-415.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:415.1-416.59 + ;; 2-syntax-aux.watsup:416.1-417.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; 2-syntax-aux.watsup:417.1-418.53 + ;; 2-syntax-aux.watsup:418.1-419.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:419.1-419.60 + ;; 2-syntax-aux.watsup:420.1-420.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:421.1-422.49 + ;; 2-syntax-aux.watsup:422.1-423.49 def $free_instr{numtype : numtype, loadop : loadop_(numtype), memidx : memidx, memarg : memarg}(LOAD_instr(numtype, ?(loadop), memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:423.1-424.49 + ;; 2-syntax-aux.watsup:424.1-425.49 def $free_instr{numtype : numtype, `sz?` : sz?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, sz?{sz <- `sz?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:425.1-426.49 + ;; 2-syntax-aux.watsup:426.1-427.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:427.1-428.49 + ;; 2-syntax-aux.watsup:428.1-429.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:429.1-430.49 + ;; 2-syntax-aux.watsup:430.1-431.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:431.1-432.49 + ;; 2-syntax-aux.watsup:432.1-433.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:433.1-433.59 - def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:434.1-434.59 - def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:435.1-435.59 + def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + ;; 2-syntax-aux.watsup:436.1-436.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; 2-syntax-aux.watsup:436.1-437.51 + ;; 2-syntax-aux.watsup:437.1-438.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; 2-syntax-aux.watsup:438.1-439.49 + ;; 2-syntax-aux.watsup:439.1-440.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:440.1-440.60 + ;; 2-syntax-aux.watsup:441.1-441.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) } @@ -10453,14 +10796,14 @@ def $dataidx_funcs(func*) : dataidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:532.1-532.112 +;; 2-syntax-aux.watsup:533.1-533.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:559.1-559.38 + ;; 2-syntax-aux.watsup:560.1-560.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; 2-syntax-aux.watsup:560.1-560.95 + ;; 2-syntax-aux.watsup:561.1-561.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; 2-syntax-aux.watsup:561.1-561.92 + ;; 2-syntax-aux.watsup:562.1-562.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -10483,78 +10826,78 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:533.1-533.112 +;; 2-syntax-aux.watsup:534.1-534.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:563.1-563.66 + ;; 2-syntax-aux.watsup:564.1-564.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; 2-syntax-aux.watsup:564.1-564.64 + ;; 2-syntax-aux.watsup:565.1-565.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; 2-syntax-aux.watsup:537.1-537.112 +;; 2-syntax-aux.watsup:538.1-538.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; 2-syntax-aux.watsup:569.1-569.67 + ;; 2-syntax-aux.watsup:570.1-570.67 def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) - ;; 2-syntax-aux.watsup:570.1-570.65 + ;; 2-syntax-aux.watsup:571.1-571.65 def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) - ;; 2-syntax-aux.watsup:571.1-571.53 + ;; 2-syntax-aux.watsup:572.1-572.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; 2-syntax-aux.watsup:538.1-538.112 +;; 2-syntax-aux.watsup:539.1-539.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; 2-syntax-aux.watsup:573.1-573.83 + ;; 2-syntax-aux.watsup:574.1-574.83 def $subst_reftype{nul : nul, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(nul, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(nul, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:539.1-539.112 +;; 2-syntax-aux.watsup:540.1-540.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; 2-syntax-aux.watsup:575.1-575.64 - def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:576.1-576.64 - def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:577.1-577.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; 2-syntax-aux.watsup:578.1-578.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; 2-syntax-aux.watsup:578.1-578.40 + ;; 2-syntax-aux.watsup:579.1-579.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; 2-syntax-aux.watsup:542.1-542.112 +;; 2-syntax-aux.watsup:543.1-543.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; 2-syntax-aux.watsup:582.1-582.66 + ;; 2-syntax-aux.watsup:583.1-583.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; 2-syntax-aux.watsup:583.1-583.69 + ;; 2-syntax-aux.watsup:584.1-584.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; 2-syntax-aux.watsup:543.1-543.112 +;; 2-syntax-aux.watsup:544.1-544.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; 2-syntax-aux.watsup:585.1-585.80 + ;; 2-syntax-aux.watsup:586.1-586.80 def $subst_fieldtype{mut : mut, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:545.1-545.112 +;; 2-syntax-aux.watsup:546.1-546.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; 2-syntax-aux.watsup:587.1-587.85 + ;; 2-syntax-aux.watsup:588.1-588.85 def $subst_comptype{`yt*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_structtype(yt*{yt <- `yt*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_structtype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{yt <- `yt*`})) - ;; 2-syntax-aux.watsup:588.1-588.81 + ;; 2-syntax-aux.watsup:589.1-589.81 def $subst_comptype{yt : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(yt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; 2-syntax-aux.watsup:589.1-589.78 + ;; 2-syntax-aux.watsup:590.1-590.78 def $subst_comptype{ft : functype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_comptype($subst_functype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:546.1-546.112 +;; 2-syntax-aux.watsup:547.1-547.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; 2-syntax-aux.watsup:591.1-592.71 + ;; 2-syntax-aux.watsup:592.1-593.71 def $subst_subtype{fin : fin, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(fin, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(fin, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:547.1-547.112 +;; 2-syntax-aux.watsup:548.1-548.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; 2-syntax-aux.watsup:594.1-594.76 + ;; 2-syntax-aux.watsup:595.1-595.76 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{st <- `st*`})) -;; 2-syntax-aux.watsup:548.1-548.112 +;; 2-syntax-aux.watsup:549.1-549.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; 2-syntax-aux.watsup:596.1-596.78 + ;; 2-syntax-aux.watsup:597.1-597.78 def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) -;; 2-syntax-aux.watsup:551.1-551.112 +;; 2-syntax-aux.watsup:552.1-552.112 def $subst_functype(functype : functype, typevar*, typeuse*) : functype - ;; 2-syntax-aux.watsup:599.1-599.113 + ;; 2-syntax-aux.watsup:600.1-600.113 def $subst_functype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_functype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_functype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`}), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`})) } @@ -10627,11 +10970,11 @@ def $subst_all_moduletype(moduletype : moduletype, heaptype*) : moduletype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:627.1-627.98 +;; 2-syntax-aux.watsup:628.1-628.98 def $subst_all_deftypes(deftype*, heaptype*) : deftype* - ;; 2-syntax-aux.watsup:628.1-628.40 + ;; 2-syntax-aux.watsup:629.1-629.40 def $subst_all_deftypes{`tu*` : typeuse*}([], (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [] - ;; 2-syntax-aux.watsup:629.1-629.101 + ;; 2-syntax-aux.watsup:630.1-630.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, (tu : typeuse <: heaptype)*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) } @@ -10675,13 +11018,13 @@ relation Expand: `%~~%`(deftype, comptype) ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:661.1-661.86 +;; 2-syntax-aux.watsup:662.1-662.86 def $funcsxx(externidx*) : typeidx* - ;; 2-syntax-aux.watsup:667.1-667.24 + ;; 2-syntax-aux.watsup:668.1-668.24 def $funcsxx([]) = [] - ;; 2-syntax-aux.watsup:668.1-668.45 + ;; 2-syntax-aux.watsup:669.1-669.45 def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:669.1-669.58 + ;; 2-syntax-aux.watsup:670.1-670.58 def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -10689,13 +11032,13 @@ def $funcsxx(externidx*) : typeidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:662.1-662.88 +;; 2-syntax-aux.watsup:663.1-663.88 def $globalsxx(externidx*) : globalidx* - ;; 2-syntax-aux.watsup:671.1-671.26 + ;; 2-syntax-aux.watsup:672.1-672.26 def $globalsxx([]) = [] - ;; 2-syntax-aux.watsup:672.1-672.51 + ;; 2-syntax-aux.watsup:673.1-673.51 def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:673.1-673.62 + ;; 2-syntax-aux.watsup:674.1-674.62 def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -10703,13 +11046,13 @@ def $globalsxx(externidx*) : globalidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:663.1-663.87 +;; 2-syntax-aux.watsup:664.1-664.87 def $tablesxx(externidx*) : tableidx* - ;; 2-syntax-aux.watsup:675.1-675.25 + ;; 2-syntax-aux.watsup:676.1-676.25 def $tablesxx([]) = [] - ;; 2-syntax-aux.watsup:676.1-676.48 + ;; 2-syntax-aux.watsup:677.1-677.48 def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:677.1-677.60 + ;; 2-syntax-aux.watsup:678.1-678.60 def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) -- otherwise } @@ -10717,13 +11060,13 @@ def $tablesxx(externidx*) : tableidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:664.1-664.85 +;; 2-syntax-aux.watsup:665.1-665.85 def $memsxx(externidx*) : memidx* - ;; 2-syntax-aux.watsup:679.1-679.23 + ;; 2-syntax-aux.watsup:680.1-680.23 def $memsxx([]) = [] - ;; 2-syntax-aux.watsup:680.1-680.42 + ;; 2-syntax-aux.watsup:681.1-681.42 def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:681.1-681.56 + ;; 2-syntax-aux.watsup:682.1-682.56 def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -10731,13 +11074,13 @@ def $memsxx(externidx*) : memidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:665.1-665.85 +;; 2-syntax-aux.watsup:666.1-666.85 def $tagsxx(externidx*) : tagidx* - ;; 2-syntax-aux.watsup:683.1-683.23 + ;; 2-syntax-aux.watsup:684.1-684.23 def $tagsxx([]) = [] - ;; 2-syntax-aux.watsup:684.1-684.42 + ;; 2-syntax-aux.watsup:685.1-685.42 def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:685.1-685.56 + ;; 2-syntax-aux.watsup:686.1-686.56 def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -10745,13 +11088,13 @@ def $tagsxx(externidx*) : tagidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:688.1-688.88 +;; 2-syntax-aux.watsup:689.1-689.88 def $funcsxt(externtype*) : deftype* - ;; 2-syntax-aux.watsup:694.1-694.24 + ;; 2-syntax-aux.watsup:695.1-695.24 def $funcsxt([]) = [] - ;; 2-syntax-aux.watsup:695.1-695.47 + ;; 2-syntax-aux.watsup:696.1-696.47 def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:696.1-696.59 + ;; 2-syntax-aux.watsup:697.1-697.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -10759,13 +11102,13 @@ def $funcsxt(externtype*) : deftype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:689.1-689.90 +;; 2-syntax-aux.watsup:690.1-690.90 def $globalsxt(externtype*) : globaltype* - ;; 2-syntax-aux.watsup:698.1-698.26 + ;; 2-syntax-aux.watsup:699.1-699.26 def $globalsxt([]) = [] - ;; 2-syntax-aux.watsup:699.1-699.53 + ;; 2-syntax-aux.watsup:700.1-700.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:700.1-700.63 + ;; 2-syntax-aux.watsup:701.1-701.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -10773,13 +11116,13 @@ def $globalsxt(externtype*) : globaltype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:690.1-690.89 +;; 2-syntax-aux.watsup:691.1-691.89 def $tablesxt(externtype*) : tabletype* - ;; 2-syntax-aux.watsup:702.1-702.25 + ;; 2-syntax-aux.watsup:703.1-703.25 def $tablesxt([]) = [] - ;; 2-syntax-aux.watsup:703.1-703.50 + ;; 2-syntax-aux.watsup:704.1-704.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:704.1-704.61 + ;; 2-syntax-aux.watsup:705.1-705.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -10787,13 +11130,13 @@ def $tablesxt(externtype*) : tabletype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:691.1-691.87 +;; 2-syntax-aux.watsup:692.1-692.87 def $memsxt(externtype*) : memtype* - ;; 2-syntax-aux.watsup:706.1-706.23 + ;; 2-syntax-aux.watsup:707.1-707.23 def $memsxt([]) = [] - ;; 2-syntax-aux.watsup:707.1-707.44 + ;; 2-syntax-aux.watsup:708.1-708.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:708.1-708.57 + ;; 2-syntax-aux.watsup:709.1-709.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -10801,13 +11144,13 @@ def $memsxt(externtype*) : memtype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:692.1-692.87 +;; 2-syntax-aux.watsup:693.1-693.87 def $tagsxt(externtype*) : tagtype* - ;; 2-syntax-aux.watsup:710.1-710.23 + ;; 2-syntax-aux.watsup:711.1-711.23 def $tagsxt([]) = [] - ;; 2-syntax-aux.watsup:711.1-711.44 + ;; 2-syntax-aux.watsup:712.1-712.44 def $tagsxt{at : tagtype, `xt*` : externtype*}([TAG_externtype((at : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [at] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:712.1-712.57 + ;; 2-syntax-aux.watsup:713.1-713.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -10818,213 +11161,233 @@ def $memarg0 : memarg def $memarg0 = {ALIGN `%`_u32(0), OFFSET `%`_u32(0)} ;; 3-numerics.watsup -def $s33_to_u32(s33 : s33) : u32 +syntax relaxed2 = + | `%`{i : nat}(i : nat) + -- if ((i = 0) \/ (i = 1)) ;; 3-numerics.watsup -def $signed_(N : N, nat : nat) : int +syntax relaxed4 = + | `%`{i : nat}(i : nat) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; 3-numerics.watsup +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) - -- if (0 <= (2 ^ (N - 1))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][i] + -- if $ND ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) - -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][0] + -- otherwise ;; 3-numerics.watsup -def $invsigned_(N : N, int : int) : nat +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X ;; 3-numerics.watsup - def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j - -- if ($signed_(N, j) = (i : nat <: int)) + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][i] + -- if $ND + ;; 3-numerics.watsup + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][0] + -- otherwise ;; 3-numerics.watsup -def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $R_fmadd : relaxed2 ;; 3-numerics.watsup -def $fabs_(N : N, fN : fN(N)) : fN(N)* +def $R_fmin : relaxed4 ;; 3-numerics.watsup -def $fceil_(N : N, fN : fN(N)) : fN(N)* +def $R_fmax : relaxed4 ;; 3-numerics.watsup -def $ffloor_(N : N, fN : fN(N)) : fN(N)* +def $R_idot : relaxed2 ;; 3-numerics.watsup -def $fnearest_(N : N, fN : fN(N)) : fN(N)* +def $R_iq15mulr : relaxed2 ;; 3-numerics.watsup -def $fneg_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_u : relaxed4 ;; 3-numerics.watsup -def $fsqrt_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_s : relaxed2 ;; 3-numerics.watsup -def $ftrunc_(N : N, fN : fN(N)) : fN(N)* +def $R_swizzle : relaxed2 ;; 3-numerics.watsup -def $iclz_(N : N, iN : iN(N)) : iN(N) +def $R_laneselect : relaxed2 ;; 3-numerics.watsup -def $ictz_(N : N, iN : iN(N)) : iN(N) +def $s33_to_u32(s33 : s33) : u32 ;; 3-numerics.watsup -def $ipopcnt_(N : N, iN : iN(N)) : iN(N) +def $signed_(N : N, nat : nat) : int + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) + -- if (0 <= (2 ^ (N - 1))) + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) + -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) ;; 3-numerics.watsup -def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) +def $invsigned_(N : N, int : int) : nat + ;; 3-numerics.watsup + def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j + -- if ($signed_(N, j) = (i : nat <: int)) ;; 3-numerics.watsup -def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] +def $sat_u_(N : N, nat : nat) : nat ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = 0 + -- if (i < 0) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = ((2 ^ N) - 1) + -- if (i > ((2 ^ N) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = i + -- otherwise + +;; 3-numerics.watsup +def $sat_s_(N : N, int : int) : int ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = - ((2 ^ (N - 1)) : nat <: int) + -- if ((i : nat <: int) < - ((2 ^ (N - 1)) : nat <: int)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (((2 ^ (N - 1)) - 1) : nat <: int) + -- if (i > ((2 ^ (N - 1)) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (i : nat <: int) + -- otherwise ;; 3-numerics.watsup -def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $relaxed_trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) ;; 3-numerics.watsup -def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) ;; 3-numerics.watsup -def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $ibits_(N : N, iN : iN(N)) : bit* ;; 3-numerics.watsup -def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbits_(N : N, fN : fN(N)) : bit* ;; 3-numerics.watsup -def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $ibytes_(N : N, iN : iN(N)) : byte* ;; 3-numerics.watsup -def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbytes_(N : N, fN : fN(N)) : byte* ;; 3-numerics.watsup -def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* ;; 3-numerics.watsup -def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* ;; 3-numerics.watsup -def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; 3-numerics.watsup +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; 3-numerics.watsup +def $invibytes_(N : N, byte*) : iN(N) + ;; 3-numerics.watsup + def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) + -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) + +;; 3-numerics.watsup +def $invfbytes_(N : N, byte*) : fN(N) + ;; 3-numerics.watsup + def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p + -- if ($fbytes_(N, p) = b*{b <- `b*`}) + +;; 3-numerics.watsup +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +;; 3-numerics.watsup +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + +;; 3-numerics.watsup +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + +;; 3-numerics.watsup +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; 3-numerics.watsup def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) ;; 3-numerics.watsup -def $ieqz_(N : N, iN : iN(N)) : u32 +def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) ;; 3-numerics.watsup -def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iclz_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ictz_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ieqz_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup -def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $inez_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 @@ -11033,156 +11396,118 @@ def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) +def $iabs_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $ineg_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] - -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] - -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $ibits_(N : N, iN : iN(N)) : bit* +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $fbits_(N : N, fN : fN(N)) : bit* +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibytes_(N : N, iN : iN(N)) : byte* +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $fbytes_(N : N, fN : fN(N)) : byte* +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invibytes_(N : N, byte*) : iN(N) - ;; 3-numerics.watsup - def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) - -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invfbytes_(N : N, byte*) : fN(N) - ;; 3-numerics.watsup - def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p - -- if ($fbytes_(N, p) = b*{b <- `b*`}) +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $inot_(N : N, iN : iN(N)) : iN(N) +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) +def $fabs_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iabs_(N : N, iN : iN(N)) : iN(N) +def $fneg_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ineg_(N : N, iN : iN(N)) : iN(N) +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fceil_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ffloor_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fnearest_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; 3-numerics.watsup +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) @@ -11231,35 +11556,156 @@ def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i ;; 3-numerics.watsup -def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* ;; 3-numerics.watsup - def $vvunop_{v128 : vec_(V128_Vnn)}(V128_vectype, NOT_vvunop, v128) = [$inot_($vsize(V128_vectype), v128)] - -;; 3-numerics.watsup -def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, AND_vvbinop, v128_1, v128_2) = [$iand_($vsize(V128_vectype), v128_1, v128_2)] + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, ANDNOT_vvbinop, v128_1, v128_2) = [$iandnot_($vsize(V128_vectype), v128_1, v128_2)] + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, OR_vvbinop, v128_1, v128_2) = [$ior_($vsize(V128_vectype), v128_1, v128_2)] + def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] ;; 3-numerics.watsup - def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, XOR_vvbinop, v128_1, v128_2) = [$ixor_($vsize(V128_vectype), v128_1, v128_2)] - -;; 3-numerics.watsup -def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) ;; 3-numerics.watsup - def $vvternop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn), v128_3 : vec_(V128_Vnn)}(V128_vectype, BITSELECT_vvternop, v128_1, v128_2, v128_3) = [$ibitselect_($vsize(V128_vectype), v128_1, v128_2, v128_3)] - -;; 3-numerics.watsup -def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) ;; 3-numerics.watsup - def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} - -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) - -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`})) - -;; 3-numerics.watsup -def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + +;; 3-numerics.watsup +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) + +;; 3-numerics.watsup +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] + -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) + +;; 3-numerics.watsup +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* + ;; 3-numerics.watsup + def $vvunop_{v128 : vec_(V128_Vnn)}(V128_vectype, NOT_vvunop, v128) = [$inot_($vsize(V128_vectype), v128)] + +;; 3-numerics.watsup +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, AND_vvbinop, v128_1, v128_2) = [$iand_($vsize(V128_vectype), v128_1, v128_2)] + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, ANDNOT_vvbinop, v128_1, v128_2) = [$iandnot_($vsize(V128_vectype), v128_1, v128_2)] + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, OR_vvbinop, v128_1, v128_2) = [$ior_($vsize(V128_vectype), v128_1, v128_2)] + ;; 3-numerics.watsup + def $vvbinop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn)}(V128_vectype, XOR_vvbinop, v128_1, v128_2) = [$ixor_($vsize(V128_vectype), v128_1, v128_2)] + +;; 3-numerics.watsup +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; 3-numerics.watsup + def $vvternop_{v128_1 : vec_(V128_Vnn), v128_2 : vec_(V128_Vnn), v128_3 : vec_(V128_Vnn)}(V128_vectype, BITSELECT_vvternop, v128_1, v128_2, v128_3) = [$ibitselect_($vsize(V128_vectype), v128_1, v128_2, v128_3)] + +;; 3-numerics.watsup +def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`})) + +;; 3-numerics.watsup +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* ;; 3-numerics.watsup def $ivunop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : iN(N), vN_1 : vec_(V128_Vnn), `c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = [$invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})] -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) @@ -11267,12 +11713,6 @@ def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128 ;; 3-numerics.watsup def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fabs_, vN_1) ;; 3-numerics.watsup @@ -11287,6 +11727,12 @@ def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_ def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), TRUNC_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ftrunc_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEAREST_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fnearest_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* @@ -11312,6 +11758,14 @@ def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) +;; 3-numerics.watsup +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, sx, vN_1, vN_2) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + ;; 3-numerics.watsup def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* ;; 3-numerics.watsup @@ -11333,6 +11787,8 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec ;; 3-numerics.watsup def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `Q15MULR_SATS`_vbinop_, vN_1, vN_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iq15mulr_sat_, S_sx, vN_1, vN_2) ;; 3-numerics.watsup + def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `RELAXED_Q15MULRS`_vbinop_, vN_1, vN_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_q15mulr_, S_sx, vN_1, vN_2) + ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ADD_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fadd_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SUB_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsub_, vN_1, vN_2) @@ -11348,6 +11804,49 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmin_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmax_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_min_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_max_, vN_1, vN_2) + +;; 3-numerics.watsup +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $vternop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), RELAXED_LANESELECT_vternop_, vN_1, vN_2, vN_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_laneselect_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_madd_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_NMADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_nmadd_, vN_1, vN_2, vN_3) + +;; 3-numerics.watsup +def $ivtestop_(shape : shape, def $f_(N : N, iN : iN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $ivtestop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + +;; 3-numerics.watsup +def $vtestop_(shape : shape, vtestop_ : vtestop_(shape), vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $vtestop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_, vN_1) = $ivtestop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $inez_, vN_1) ;; 3-numerics.watsup def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) @@ -11413,6 +11912,9 @@ def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, sha def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), TRUNC_SAT_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) -- if (iN_2?{iN_2 <- `iN_2?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) ;; 3-numerics.watsup + def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), RELAXED_TRUNC_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) + -- if (iN_2?{iN_2 <- `iN_2?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) + ;; 3-numerics.watsup def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `fN_2*` : lane_($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), DEMOTE_vcvtop__, fN_1) = fN_2*{fN_2 <- `fN_2*`} -- if (fN_2*{fN_2 <- `fN_2*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), fN_1)) ;; 3-numerics.watsup @@ -11435,11 +11937,38 @@ def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__ -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)[$half__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), half, 0, M_2) : M_2]) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`})) ;; 3-numerics.watsup - def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) - -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`}) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + ;; 3-numerics.watsup + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOTS`_vextbinop__, c_1, c_2) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_sat_($lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + +;; 3-numerics.watsup +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_3*` : lane_($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))))*, Jnn : Jnn, `ci'_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOT_ADDS`_vextternop__, c_1, c_2, c_3) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci_3*{ci_3 <- `ci_3*`} = $lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), c_3)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [`%`_uN(cj_1!`%`_iN.0) `%`_uN(cj_2!`%`_iN.0)]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn((Jnn : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [ck_1 ck_2]*{ck_1 <- `ck_1*`, ck_2 <- `ck_2*`}) = $iadd_sat_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN(cj_1!`%`_iN.0), `%`_iN(cj_2!`%`_iN.0))*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) + -- if (ck'_1*{ck'_1 <- `ck'_1*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_1)*{ck_1 <- `ck_1*`}) + -- if (ck'_2*{ck'_2 <- `ck'_2*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_2)*{ck_2 <- `ck_2*`}) + -- if (ck*{ck <- `ck*`} = $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck'_1, ck'_2)*{ck'_1 <- `ck'_1*`, ck'_2 <- `ck'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck, ci_3)*{ci_3 <- `ci_3*`, ck <- `ck*`})) ;; 3-numerics.watsup def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($lanetype((ishape : ishape <: shape))), u32 : u32) : lane_($lanetype((ishape : ishape <: shape))) @@ -11448,6 +11977,13 @@ def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($la ;; 3-numerics.watsup def $vshiftop_{Jnn : Jnn, M : M, sx : sx, lane : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)))), n : n}(`%X%`_ishape(Jnn, `%`_dim(M)), SHR_vshiftop_(sx), lane, `%`_u32(n)) = $ishr_($lsizenn((Jnn : Jnn <: lanetype)), sx, lane, `%`_u32(n)) +;; 3-numerics.watsup +def $fvtestop_(shape : shape, def $f_(N : N, fN : fN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $fvtestop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($sizenn((Fnn : Fnn <: numtype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + ;; 4-runtime.watsup syntax num = | CONST{numtype : numtype, num_ : num_(numtype)}(numtype : numtype, num_ : num_(numtype)) @@ -12969,224 +13505,232 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:948.1-949.40 + ;; 6-typing.watsup:948.1-949.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:951.1-952.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:951.1-952.44 + ;; 6-typing.watsup:954.1-955.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:954.1-955.47 + ;; 6-typing.watsup:957.1-958.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:957.1-958.33 + ;; 6-typing.watsup:960.1-961.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:960.1-961.39 - rule vswizzle{C : context, sh : ishape}: - `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + ;; 6-typing.watsup:963.1-964.50 + rule vswizzlop{C : context, sh : ishape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:963.1-965.29 + ;; 6-typing.watsup:966.1-968.29 rule vshuffle{C : context, sh : ishape, `i*` : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i <- `i*`} - ;; 6-typing.watsup:967.1-968.44 + ;; 6-typing.watsup:970.1-971.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:970.1-972.21 + ;; 6-typing.watsup:973.1-975.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:974.1-976.21 + ;; 6-typing.watsup:977.1-979.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:978.1-979.50 + ;; 6-typing.watsup:981.1-982.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:981.1-982.57 + ;; 6-typing.watsup:984.1-985.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:984.1-985.48 + ;; 6-typing.watsup:987.1-988.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:990.1-991.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:987.1-988.58 + ;; 6-typing.watsup:993.1-994.58 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1), `half?` : half__(sh_2, sh_1)?, `zero?` : zero__(sh_2, sh_1)?}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:993.1-995.28 + ;; 6-typing.watsup:999.1-1001.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:997.1-999.29 + ;; 6-typing.watsup:1003.1-1005.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1001.1-1003.29 + ;; 6-typing.watsup:1007.1-1009.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1008.1-1010.29 + ;; 6-typing.watsup:1014.1-1016.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:1012.1-1014.29 + ;; 6-typing.watsup:1018.1-1020.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:1019.1-1021.29 + ;; 6-typing.watsup:1025.1-1027.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1023.1-1025.29 + ;; 6-typing.watsup:1029.1-1031.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1027.1-1029.29 + ;; 6-typing.watsup:1033.1-1035.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1031.1-1033.29 + ;; 6-typing.watsup:1037.1-1039.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1035.1-1037.29 + ;; 6-typing.watsup:1041.1-1043.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1039.1-1043.36 + ;; 6-typing.watsup:1045.1-1049.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1045.1-1049.36 + ;; 6-typing.watsup:1051.1-1055.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1051.1-1053.24 + ;; 6-typing.watsup:1057.1-1059.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1058.1-1060.23 + ;; 6-typing.watsup:1064.1-1066.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1062.1-1064.23 + ;; 6-typing.watsup:1068.1-1070.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1066.1-1068.23 + ;; 6-typing.watsup:1072.1-1074.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1070.1-1073.27 + ;; 6-typing.watsup:1076.1-1079.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1075.1-1078.24 + ;; 6-typing.watsup:1081.1-1084.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1080.1-1082.24 + ;; 6-typing.watsup:1086.1-1088.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1093.1-1096.43 + ;; 6-typing.watsup:1099.1-1102.43 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1098.1-1101.35 + ;; 6-typing.watsup:1104.1-1107.35 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1112.1-1115.43 + ;; 6-typing.watsup:1118.1-1121.43 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1117.1-1120.35 + ;; 6-typing.watsup:1123.1-1126.35 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1122.1-1125.46 + ;; 6-typing.watsup:1128.1-1131.46 rule `vload-val`{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1127.1-1130.39 + ;; 6-typing.watsup:1133.1-1136.39 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1132.1-1135.35 + ;; 6-typing.watsup:1138.1-1141.35 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1137.1-1140.35 + ;; 6-typing.watsup:1143.1-1146.35 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1142.1-1146.21 + ;; 6-typing.watsup:1148.1-1152.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1148.1-1151.46 + ;; 6-typing.watsup:1154.1-1157.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1153.1-1157.21 + ;; 6-typing.watsup:1159.1-1163.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) @@ -13461,13 +14005,13 @@ relation Export_ok: `%|-%:%%`(context, export, name, externtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1358.1-1358.100 +;; 6-typing.watsup:1364.1-1364.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1402.1-1403.17 + ;; 6-typing.watsup:1408.1-1409.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1405.1-1408.54 + ;; 6-typing.watsup:1411.1-1414.54 rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) -- Global_ok: `%|-%:%`(C, global_1, gt_1) @@ -13477,13 +14021,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1357.1-1357.98 +;; 6-typing.watsup:1363.1-1363.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1394.1-1395.17 + ;; 6-typing.watsup:1400.1-1401.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1397.1-1400.49 + ;; 6-typing.watsup:1403.1-1406.49 rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) @@ -13920,15 +14464,19 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) ;; 8-reduction.watsup - rule `vtestop-true`{c : vec_(V128_Vnn), Jnn : Jnn, M : M, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(1))]) - -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)) - -- (if (ci_1 =/= `%`_lane_(0)))*{ci_1 <- `ci_1*`} + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if c <- $vternop_(sh, vternop, c_1, c_2, c_3) ;; 8-reduction.watsup - rule `vtestop-false`{c : vec_(V128_Vnn), Jnn : Jnn, M : M}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(0))]) - -- otherwise + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; 8-reduction.watsup + rule vtestop{c_1 : vec_(V128_Vnn), sh : shape, vtestop : vtestop_(sh), i : nat}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(sh, vtestop)], [CONST_instr(I32_numtype, `%`_num_(i))]) + -- if ($vtestop_(sh, vtestop, c_1) = `%`_u32(i)) ;; 8-reduction.watsup rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: @@ -13948,11 +14496,18 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($ibits_(32, ci) = `%`_bit($ilt_($lsize((Jnn : Jnn <: lanetype)), S_sx, ci_1, `%`_iN(0))!`%`_u32.0)*{ci_1 <- `ci_1*`}) ;; 8-reduction.watsup - rule vswizzle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Pnn : Pnn, M : M, c : vec_(V128_Vnn), `c'*` : iN($lsize((Pnn : Pnn <: lanetype)))*, `ci*` : lane_($lanetype(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M))))*, `k*` : nat*}: - `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLE_instr(`%X%`_ishape((Pnn : Pnn <: Jnn), `%`_dim(M)))], [VCONST_instr(V128_vectype, c)]) - -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_2)) - -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) - -- if (c = $invlanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), RELAXED_SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`(instr*, instr*) `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + ;; 8-reduction.watsup + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + ;; 8-reduction.watsup rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Jnn_2 : Jnn, M_2 : M, Jnn_1 : Jnn, M_1 : M, sx : sx, c : vec_(V128_Vnn), `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}: `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(`%X%`_ishape(Jnn_2, `%`_dim(M_2)), `%X%`_ishape(Jnn_1, `%`_dim(M_1)), sx)], [VCONST_instr(V128_vectype, c)]) @@ -14647,89 +15207,89 @@ relation Step: `%~>%`(config, config) `%~>%`(`%;%`_config(z, [REF.ARRAY_ADDR_instr(a) CONST_instr(I32_numtype, `%`_num_(i)) (val : val <: instr) ARRAY.SET_instr(x)]), `%;%`_config($with_array(z, a, i, $packfield_(zt, val)), [])) -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 8-reduction.watsup:806.1-807.56 + ;; 8-reduction.watsup:823.1-824.56 rule local.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) LOCAL.SET_instr(x)]), `%;%`_config($with_local(z, x, val), [])) - ;; 8-reduction.watsup:819.1-820.58 + ;; 8-reduction.watsup:836.1-837.58 rule global.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) GLOBAL.SET_instr(x)]), `%;%`_config($with_global(z, x, val), [])) - ;; 8-reduction.watsup:833.1-835.33 + ;; 8-reduction.watsup:850.1-852.33 rule `table.set-oob`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config(z, [TRAP_instr])) -- if (i >= |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:837.1-839.32 + ;; 8-reduction.watsup:854.1-856.32 rule `table.set-val`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config($with_table(z, x, i, ref), [])) -- if (i < |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:847.1-850.46 + ;; 8-reduction.watsup:864.1-867.46 rule `table.grow-succeed`{z : state, ref : ref, n : n, x : idx, ti : tableinst}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr(I32_numtype, `%`_num_(|$table(z, x).REFS_tableinst|))])) -- if (ti = !($growtable($table(z, x), n, ref))) - ;; 8-reduction.watsup:852.1-853.81 + ;; 8-reduction.watsup:869.1-870.81 rule `table.grow-fail`{z : state, ref : ref, n : n, x : idx}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:913.1-914.51 + ;; 8-reduction.watsup:930.1-931.51 rule elem.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [ELEM.DROP_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) - ;; 8-reduction.watsup:997.1-1000.60 + ;; 8-reduction.watsup:1014.1-1017.60 rule `store-num-oob`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($size(nt) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1002.1-1006.29 + ;; 8-reduction.watsup:1019.1-1023.29 rule `store-num-val`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($size(nt) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $nbytes_(nt, c)) - ;; 8-reduction.watsup:1008.1-1011.52 + ;; 8-reduction.watsup:1025.1-1028.52 rule `store-pack-oob`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + (n / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1013.1-1017.52 + ;; 8-reduction.watsup:1030.1-1034.52 rule `store-pack-val`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (n / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : Inn <: numtype)), n, c))) - ;; 8-reduction.watsup:1019.1-1021.63 + ;; 8-reduction.watsup:1036.1-1038.63 rule `vstore-oob`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($vsize(V128_vectype) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1023.1-1025.31 + ;; 8-reduction.watsup:1040.1-1042.31 rule `vstore-val`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($vsize(V128_vectype) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) - ;; 8-reduction.watsup:1028.1-1030.50 + ;; 8-reduction.watsup:1045.1-1047.50 rule `vstore_lane-oob`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + N) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1032.1-1036.49 + ;; 8-reduction.watsup:1049.1-1053.49 rule `vstore_lane-val`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat, `b*` : byte*, Jnn : Jnn, M : M}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (N / 8), b*{b <- `b*`}), [])) -- if (N = $lsize((Jnn : Jnn <: lanetype))) -- if (M = (128 / N)) -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)[j]!`%`_lane_.0))) - ;; 8-reduction.watsup:1044.1-1047.37 + ;; 8-reduction.watsup:1061.1-1064.37 rule `memory.grow-succeed`{z : state, n : n, x : idx, mi : meminst}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr(I32_numtype, `%`_num_((|$mem(z, x).BYTES_meminst| / (64 * $Ki))))])) -- if (mi = !($growmem($mem(z, x), n))) - ;; 8-reduction.watsup:1049.1-1050.78 + ;; 8-reduction.watsup:1066.1-1067.78 rule `memory.grow-fail`{z : state, n : n, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:1110.1-1111.51 + ;; 8-reduction.watsup:1127.1-1128.51 rule data.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [DATA.DROP_instr(x)]), `%;%`_config($with_data(z, x, []), [])) } @@ -15379,7 +15939,7 @@ grammar Blaneidx : laneidx ;; A-binary.watsup rec { -;; A-binary.watsup:971.1-981.66 +;; A-binary.watsup:992.1-1006.73 grammar Binstr : instr ;; A-binary.watsup:214.5-214.24 prod 0x00 => UNREACHABLE_instr @@ -15909,430 +16469,462 @@ grammar Binstr : instr prod{`b*` : byte*} {0xFD `%`_u32(12):Bu32 b:Bbyte^16{b <- `b*`}} => VCONST_instr(V128_vectype, $invibytes_(128, b^16{b <- `b*`})) ;; A-binary.watsup:625.5-625.58 prod{l : labelidx} {0xFD `%`_u32(13):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx^16{}} => VSHUFFLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), [`%`_uN(l!`%`_labelidx.0)]) - ;; A-binary.watsup:626.5-626.40 - prod {0xFD `%`_u32(14):Bu32} => VSWIZZLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:630.5-630.38 - prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) + ;; A-binary.watsup:626.5-626.49 + prod {0xFD `%`_u32(14):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SWIZZLE_vswizzlop_) + ;; A-binary.watsup:627.5-627.58 + prod {0xFD `%`_u32(256):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), RELAXED_SWIZZLE_vswizzlop_) ;; A-binary.watsup:631.5-631.38 - prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) + prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) ;; A-binary.watsup:632.5-632.38 - prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) ;; A-binary.watsup:633.5-633.38 - prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) + prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) ;; A-binary.watsup:634.5-634.38 - prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) ;; A-binary.watsup:635.5-635.38 + prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + ;; A-binary.watsup:636.5-636.38 prod {0xFD `%`_u32(20):Bu32} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2))) - ;; A-binary.watsup:639.5-639.60 - prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:640.5-640.60 + prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:641.5-641.60 prod{l : labelidx} {0xFD `%`_u32(22):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:641.5-641.58 + ;; A-binary.watsup:642.5-642.58 prod{l : labelidx} {0xFD `%`_u32(23):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:642.5-642.60 - prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:643.5-643.60 + prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:644.5-644.60 prod{l : labelidx} {0xFD `%`_u32(25):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:644.5-644.58 - prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:645.5-645.58 - prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:646.5-646.58 - prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:647.5-647.58 - prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:648.5-648.58 - prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:649.5-649.58 - prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:650.5-650.58 - prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:651.5-651.58 - prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:652.5-652.58 + prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:653.5-653.58 prod{l : labelidx} {0xFD `%`_u32(34):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:656.5-656.41 - prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) ;; A-binary.watsup:657.5-657.41 + prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) + ;; A-binary.watsup:658.5-658.41 prod {0xFD `%`_u32(36):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NE_vrelop_) - ;; A-binary.watsup:658.5-658.45 - prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:659.5-659.45 - prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:660.5-660.45 - prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) ;; A-binary.watsup:661.5-661.45 - prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) ;; A-binary.watsup:662.5-662.45 - prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) ;; A-binary.watsup:663.5-663.45 - prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) ;; A-binary.watsup:664.5-664.45 - prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) ;; A-binary.watsup:665.5-665.45 + prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:666.5-666.45 prod {0xFD `%`_u32(44):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:669.5-669.41 - prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) ;; A-binary.watsup:670.5-670.41 + prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) + ;; A-binary.watsup:671.5-671.41 prod {0xFD `%`_u32(46):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NE_vrelop_) - ;; A-binary.watsup:671.5-671.45 - prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:672.5-672.45 - prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:673.5-673.45 - prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) ;; A-binary.watsup:674.5-674.45 - prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) ;; A-binary.watsup:675.5-675.45 - prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) ;; A-binary.watsup:676.5-676.45 - prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) ;; A-binary.watsup:677.5-677.45 - prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) ;; A-binary.watsup:678.5-678.45 + prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:679.5-679.45 prod {0xFD `%`_u32(54):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:682.5-682.41 - prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:683.5-683.41 + prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) + ;; A-binary.watsup:684.5-684.41 prod {0xFD `%`_u32(56):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NE_vrelop_) - ;; A-binary.watsup:684.5-684.45 - prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:685.5-685.45 - prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:686.5-686.45 - prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) ;; A-binary.watsup:687.5-687.45 - prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) ;; A-binary.watsup:688.5-688.45 - prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) ;; A-binary.watsup:689.5-689.45 - prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) ;; A-binary.watsup:690.5-690.45 - prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) ;; A-binary.watsup:691.5-691.45 + prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:692.5-692.45 prod {0xFD `%`_u32(64):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:695.5-695.41 - prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:696.5-696.41 - prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) + prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:697.5-697.41 - prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) + prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) ;; A-binary.watsup:698.5-698.41 - prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) + prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) ;; A-binary.watsup:699.5-699.41 - prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) ;; A-binary.watsup:700.5-700.41 + prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + ;; A-binary.watsup:701.5-701.41 prod {0xFD `%`_u32(70):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GE_vrelop_) - ;; A-binary.watsup:704.5-704.41 - prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:705.5-705.41 - prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) + prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:706.5-706.41 - prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) + prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) ;; A-binary.watsup:707.5-707.41 - prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) + prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) ;; A-binary.watsup:708.5-708.41 - prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) ;; A-binary.watsup:709.5-709.41 + prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + ;; A-binary.watsup:710.5-710.41 prod {0xFD `%`_u32(76):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GE_vrelop_) - ;; A-binary.watsup:713.5-713.36 + ;; A-binary.watsup:714.5-714.36 prod {0xFD `%`_u32(77):Bu32} => VVUNOP_instr(V128_vectype, NOT_vvunop) - ;; A-binary.watsup:717.5-717.37 + ;; A-binary.watsup:718.5-718.37 prod {0xFD `%`_u32(78):Bu32} => VVBINOP_instr(V128_vectype, AND_vvbinop) - ;; A-binary.watsup:718.5-718.40 + ;; A-binary.watsup:719.5-719.40 prod {0xFD `%`_u32(79):Bu32} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) - ;; A-binary.watsup:719.5-719.36 + ;; A-binary.watsup:720.5-720.36 prod {0xFD `%`_u32(80):Bu32} => VVBINOP_instr(V128_vectype, OR_vvbinop) - ;; A-binary.watsup:720.5-720.37 + ;; A-binary.watsup:721.5-721.37 prod {0xFD `%`_u32(81):Bu32} => VVBINOP_instr(V128_vectype, XOR_vvbinop) - ;; A-binary.watsup:724.5-724.44 + ;; A-binary.watsup:725.5-725.44 prod {0xFD `%`_u32(82):Bu32} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) - ;; A-binary.watsup:728.5-728.43 + ;; A-binary.watsup:729.5-729.43 prod {0xFD `%`_u32(83):Bu32} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) - ;; A-binary.watsup:732.5-732.41 - prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) ;; A-binary.watsup:733.5-733.41 + prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) + ;; A-binary.watsup:734.5-734.41 prod {0xFD `%`_u32(97):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NEG_vunop_) - ;; A-binary.watsup:734.5-734.44 + ;; A-binary.watsup:735.5-735.44 prod {0xFD `%`_u32(98):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), POPCNT_vunop_) - ;; A-binary.watsup:738.5-738.48 + ;; A-binary.watsup:739.5-739.48 prod {0xFD `%`_u32(99):Bu32} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:742.5-742.41 + ;; A-binary.watsup:743.5-743.41 prod {0xFD `%`_u32(100):Bu32} => VBITMASK_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:746.5-746.53 - prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) ;; A-binary.watsup:747.5-747.53 + prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) + ;; A-binary.watsup:748.5-748.53 prod {0xFD `%`_u32(102):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), U_sx) - ;; A-binary.watsup:751.5-751.45 + ;; A-binary.watsup:752.5-752.45 prod {0xFD `%`_u32(107):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHL_vshiftop_) - ;; A-binary.watsup:752.5-752.49 - prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) ;; A-binary.watsup:753.5-753.49 + prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) + ;; A-binary.watsup:754.5-754.49 prod {0xFD `%`_u32(109):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:757.5-757.43 + ;; A-binary.watsup:758.5-758.43 prod {0xFD `%`_u32(110):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_vbinop_) - ;; A-binary.watsup:758.5-758.51 - prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) ;; A-binary.watsup:759.5-759.51 + prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:760.5-760.51 prod {0xFD `%`_u32(112):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:760.5-760.43 + ;; A-binary.watsup:761.5-761.43 prod {0xFD `%`_u32(113):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_vbinop_) - ;; A-binary.watsup:761.5-761.51 - prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) ;; A-binary.watsup:762.5-762.51 + prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:763.5-763.51 prod {0xFD `%`_u32(115):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:763.5-763.47 - prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:764.5-764.47 - prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) + prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:765.5-765.47 - prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) ;; A-binary.watsup:766.5-766.47 + prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + ;; A-binary.watsup:767.5-767.47 prod {0xFD `%`_u32(121):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:767.5-767.48 + ;; A-binary.watsup:768.5-768.48 prod {0xFD `%`_u32(123):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `AVGRU`_vbinop_) - ;; A-binary.watsup:771.5-771.72 - prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) ;; A-binary.watsup:772.5-772.72 + prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; A-binary.watsup:773.5-773.72 prod {0xFD `%`_u32(125):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:776.5-776.42 - prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) ;; A-binary.watsup:777.5-777.42 + prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) + ;; A-binary.watsup:778.5-778.42 prod {0xFD `%`_u32(129):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NEG_vunop_) - ;; A-binary.watsup:781.5-781.55 + ;; A-binary.watsup:782.5-782.55 prod {0xFD `%`_u32(130):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `Q15MULR_SATS`_vbinop_) - ;; A-binary.watsup:785.5-785.49 + ;; A-binary.watsup:783.5-783.59 + prod {0xFD `%`_u32(273):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `RELAXED_Q15MULRS`_vbinop_) + ;; A-binary.watsup:787.5-787.49 prod {0xFD `%`_u32(131):Bu32} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:789.5-789.41 + ;; A-binary.watsup:791.5-791.41 prod {0xFD `%`_u32(132):Bu32} => VBITMASK_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8))) - ;; A-binary.watsup:793.5-793.53 + ;; A-binary.watsup:795.5-795.53 prod {0xFD `%`_u32(133):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), S_sx) - ;; A-binary.watsup:794.5-794.53 + ;; A-binary.watsup:796.5-796.53 prod {0xFD `%`_u32(134):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), U_sx) - ;; A-binary.watsup:798.5-798.65 + ;; A-binary.watsup:800.5-800.65 prod {0xFD `%`_u32(135):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:799.5-799.66 + ;; A-binary.watsup:801.5-801.66 prod {0xFD `%`_u32(136):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:800.5-800.65 + ;; A-binary.watsup:802.5-802.65 prod {0xFD `%`_u32(137):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:801.5-801.66 + ;; A-binary.watsup:803.5-803.66 prod {0xFD `%`_u32(138):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:805.5-805.45 + ;; A-binary.watsup:807.5-807.45 prod {0xFD `%`_u32(139):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHL_vshiftop_) - ;; A-binary.watsup:806.5-806.49 + ;; A-binary.watsup:808.5-808.49 prod {0xFD `%`_u32(140):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:807.5-807.49 + ;; A-binary.watsup:809.5-809.49 prod {0xFD `%`_u32(141):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:811.5-811.43 + ;; A-binary.watsup:813.5-813.43 prod {0xFD `%`_u32(142):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_vbinop_) - ;; A-binary.watsup:812.5-812.51 + ;; A-binary.watsup:814.5-814.51 prod {0xFD `%`_u32(143):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:813.5-813.51 + ;; A-binary.watsup:815.5-815.51 prod {0xFD `%`_u32(144):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:814.5-814.43 + ;; A-binary.watsup:816.5-816.43 prod {0xFD `%`_u32(145):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_vbinop_) - ;; A-binary.watsup:815.5-815.51 + ;; A-binary.watsup:817.5-817.51 prod {0xFD `%`_u32(146):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:816.5-816.51 + ;; A-binary.watsup:818.5-818.51 prod {0xFD `%`_u32(147):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:817.5-817.43 + ;; A-binary.watsup:819.5-819.43 prod {0xFD `%`_u32(149):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MUL_vbinop_) - ;; A-binary.watsup:818.5-818.47 + ;; A-binary.watsup:820.5-820.47 prod {0xFD `%`_u32(150):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:819.5-819.47 + ;; A-binary.watsup:821.5-821.47 prod {0xFD `%`_u32(151):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:820.5-820.47 + ;; A-binary.watsup:822.5-822.47 prod {0xFD `%`_u32(152):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:821.5-821.47 + ;; A-binary.watsup:823.5-823.47 prod {0xFD `%`_u32(153):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:822.5-822.48 + ;; A-binary.watsup:824.5-824.48 prod {0xFD `%`_u32(155):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `AVGRU`_vbinop_) - ;; A-binary.watsup:826.5-826.68 + ;; A-binary.watsup:828.5-828.68 prod {0xFD `%`_u32(156):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:827.5-827.69 + ;; A-binary.watsup:829.5-829.69 prod {0xFD `%`_u32(157):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:828.5-828.68 + ;; A-binary.watsup:830.5-830.68 prod {0xFD `%`_u32(158):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:829.5-829.69 + ;; A-binary.watsup:831.5-831.69 prod {0xFD `%`_u32(159):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:833.5-833.72 + ;; A-binary.watsup:832.5-832.69 + prod {0xFD `%`_u32(274):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), `RELAXED_DOTS`_vextbinop__) + ;; A-binary.watsup:836.5-836.72 prod {0xFD `%`_u32(126):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; A-binary.watsup:834.5-834.72 + ;; A-binary.watsup:837.5-837.72 prod {0xFD `%`_u32(127):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:838.5-838.42 + ;; A-binary.watsup:841.5-841.42 prod {0xFD `%`_u32(160):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:839.5-839.42 + ;; A-binary.watsup:842.5-842.42 prod {0xFD `%`_u32(161):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:843.5-843.49 + ;; A-binary.watsup:846.5-846.49 prod {0xFD `%`_u32(163):Bu32} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:847.5-847.41 + ;; A-binary.watsup:850.5-850.41 prod {0xFD `%`_u32(164):Bu32} => VBITMASK_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4))) - ;; A-binary.watsup:851.5-851.65 + ;; A-binary.watsup:854.5-854.65 prod {0xFD `%`_u32(167):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:852.5-852.66 + ;; A-binary.watsup:855.5-855.66 prod {0xFD `%`_u32(168):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:853.5-853.65 + ;; A-binary.watsup:856.5-856.65 prod {0xFD `%`_u32(169):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:854.5-854.66 + ;; A-binary.watsup:857.5-857.66 prod {0xFD `%`_u32(170):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:858.5-858.45 + ;; A-binary.watsup:861.5-861.45 prod {0xFD `%`_u32(171):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHL_vshiftop_) - ;; A-binary.watsup:859.5-859.49 + ;; A-binary.watsup:862.5-862.49 prod {0xFD `%`_u32(172):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:860.5-860.49 + ;; A-binary.watsup:863.5-863.49 prod {0xFD `%`_u32(173):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:864.5-864.43 + ;; A-binary.watsup:867.5-867.43 prod {0xFD `%`_u32(174):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:865.5-865.43 + ;; A-binary.watsup:868.5-868.43 prod {0xFD `%`_u32(177):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:866.5-866.43 + ;; A-binary.watsup:869.5-869.43 prod {0xFD `%`_u32(181):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:867.5-867.47 + ;; A-binary.watsup:870.5-870.47 prod {0xFD `%`_u32(182):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:868.5-868.47 + ;; A-binary.watsup:871.5-871.47 prod {0xFD `%`_u32(183):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:869.5-869.47 + ;; A-binary.watsup:872.5-872.47 prod {0xFD `%`_u32(184):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:870.5-870.47 + ;; A-binary.watsup:873.5-873.47 prod {0xFD `%`_u32(185):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:874.5-874.61 + ;; A-binary.watsup:877.5-877.61 prod {0xFD `%`_u32(186):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `DOTS`_vextbinop__) - ;; A-binary.watsup:875.5-875.68 + ;; A-binary.watsup:878.5-878.68 prod {0xFD `%`_u32(188):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:876.5-876.69 + ;; A-binary.watsup:879.5-879.69 prod {0xFD `%`_u32(189):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:877.5-877.68 + ;; A-binary.watsup:880.5-880.68 prod {0xFD `%`_u32(190):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:878.5-878.69 + ;; A-binary.watsup:881.5-881.69 prod {0xFD `%`_u32(191):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:882.5-882.42 + ;; A-binary.watsup:885.5-885.74 + prod {0xFD `%`_u32(275):Bu32} => VEXTTERNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `RELAXED_DOT_ADDS`_vextternop__) + ;; A-binary.watsup:889.5-889.42 prod {0xFD `%`_u32(192):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:883.5-883.42 + ;; A-binary.watsup:890.5-890.42 prod {0xFD `%`_u32(193):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:887.5-887.49 + ;; A-binary.watsup:894.5-894.49 prod {0xFD `%`_u32(195):Bu32} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:891.5-891.41 + ;; A-binary.watsup:898.5-898.41 prod {0xFD `%`_u32(196):Bu32} => VBITMASK_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2))) - ;; A-binary.watsup:895.5-895.65 + ;; A-binary.watsup:902.5-902.65 prod {0xFD `%`_u32(199):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:896.5-896.66 + ;; A-binary.watsup:903.5-903.66 prod {0xFD `%`_u32(200):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:897.5-897.65 + ;; A-binary.watsup:904.5-904.65 prod {0xFD `%`_u32(201):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:898.5-898.66 + ;; A-binary.watsup:905.5-905.66 prod {0xFD `%`_u32(202):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:902.5-902.45 + ;; A-binary.watsup:909.5-909.45 prod {0xFD `%`_u32(203):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHL_vshiftop_) - ;; A-binary.watsup:903.5-903.49 + ;; A-binary.watsup:910.5-910.49 prod {0xFD `%`_u32(204):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:904.5-904.49 + ;; A-binary.watsup:911.5-911.49 prod {0xFD `%`_u32(205):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:908.5-908.43 + ;; A-binary.watsup:915.5-915.43 prod {0xFD `%`_u32(206):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:909.5-909.43 + ;; A-binary.watsup:916.5-916.43 prod {0xFD `%`_u32(209):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:910.5-910.43 + ;; A-binary.watsup:917.5-917.43 prod {0xFD `%`_u32(213):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:914.5-914.42 + ;; A-binary.watsup:921.5-921.42 prod {0xFD `%`_u32(214):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), EQ_vrelop_) - ;; A-binary.watsup:915.5-915.42 + ;; A-binary.watsup:922.5-922.42 prod {0xFD `%`_u32(215):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NE_vrelop_) - ;; A-binary.watsup:916.5-916.46 + ;; A-binary.watsup:923.5-923.46 prod {0xFD `%`_u32(216):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LT_vrelop_(S_sx)) - ;; A-binary.watsup:917.5-917.46 + ;; A-binary.watsup:924.5-924.46 prod {0xFD `%`_u32(217):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GT_vrelop_(S_sx)) - ;; A-binary.watsup:918.5-918.46 + ;; A-binary.watsup:925.5-925.46 prod {0xFD `%`_u32(218):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LE_vrelop_(S_sx)) - ;; A-binary.watsup:919.5-919.46 + ;; A-binary.watsup:926.5-926.46 prod {0xFD `%`_u32(219):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GE_vrelop_(S_sx)) - ;; A-binary.watsup:923.5-923.68 + ;; A-binary.watsup:930.5-930.68 prod {0xFD `%`_u32(220):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:924.5-924.69 + ;; A-binary.watsup:931.5-931.69 prod {0xFD `%`_u32(221):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:925.5-925.68 + ;; A-binary.watsup:932.5-932.68 prod {0xFD `%`_u32(222):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:926.5-926.69 + ;; A-binary.watsup:933.5-933.69 prod {0xFD `%`_u32(223):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:930.5-930.43 + ;; A-binary.watsup:937.5-937.43 prod {0xFD `%`_u32(103):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), CEIL_vunop_) - ;; A-binary.watsup:931.5-931.44 + ;; A-binary.watsup:938.5-938.44 prod {0xFD `%`_u32(104):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), FLOOR_vunop_) - ;; A-binary.watsup:932.5-932.44 + ;; A-binary.watsup:939.5-939.44 prod {0xFD `%`_u32(105):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_vunop_) - ;; A-binary.watsup:933.5-933.46 + ;; A-binary.watsup:940.5-940.46 prod {0xFD `%`_u32(106):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEAREST_vunop_) - ;; A-binary.watsup:934.5-934.42 + ;; A-binary.watsup:941.5-941.42 prod {0xFD `%`_u32(224):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:935.5-935.42 + ;; A-binary.watsup:942.5-942.42 prod {0xFD `%`_u32(225):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:936.5-936.43 + ;; A-binary.watsup:943.5-943.43 prod {0xFD `%`_u32(227):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SQRT_vunop_) - ;; A-binary.watsup:940.5-940.43 + ;; A-binary.watsup:947.5-947.43 prod {0xFD `%`_u32(228):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:941.5-941.43 + ;; A-binary.watsup:948.5-948.43 prod {0xFD `%`_u32(229):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:942.5-942.43 + ;; A-binary.watsup:949.5-949.43 prod {0xFD `%`_u32(230):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:943.5-943.43 + ;; A-binary.watsup:950.5-950.43 prod {0xFD `%`_u32(231):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), DIV_vbinop_) - ;; A-binary.watsup:944.5-944.43 + ;; A-binary.watsup:951.5-951.43 prod {0xFD `%`_u32(232):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MIN_vbinop_) - ;; A-binary.watsup:945.5-945.43 + ;; A-binary.watsup:952.5-952.43 prod {0xFD `%`_u32(233):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MAX_vbinop_) - ;; A-binary.watsup:946.5-946.44 + ;; A-binary.watsup:953.5-953.44 prod {0xFD `%`_u32(234):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMIN_vbinop_) - ;; A-binary.watsup:947.5-947.44 + ;; A-binary.watsup:954.5-954.44 prod {0xFD `%`_u32(235):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMAX_vbinop_) - ;; A-binary.watsup:951.5-951.43 + ;; A-binary.watsup:955.5-955.51 + prod {0xFD `%`_u32(269):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:956.5-956.51 + prod {0xFD `%`_u32(270):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:960.5-960.53 + prod {0xFD `%`_u32(261):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:961.5-961.54 + prod {0xFD `%`_u32(262):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:965.5-965.43 prod {0xFD `%`_u32(116):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), CEIL_vunop_) - ;; A-binary.watsup:952.5-952.44 + ;; A-binary.watsup:966.5-966.44 prod {0xFD `%`_u32(117):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), FLOOR_vunop_) - ;; A-binary.watsup:953.5-953.44 + ;; A-binary.watsup:967.5-967.44 prod {0xFD `%`_u32(122):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_vunop_) - ;; A-binary.watsup:954.5-954.46 + ;; A-binary.watsup:968.5-968.46 prod {0xFD `%`_u32(148):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEAREST_vunop_) - ;; A-binary.watsup:955.5-955.42 + ;; A-binary.watsup:969.5-969.42 prod {0xFD `%`_u32(236):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:956.5-956.42 + ;; A-binary.watsup:970.5-970.42 prod {0xFD `%`_u32(237):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:957.5-957.43 + ;; A-binary.watsup:971.5-971.43 prod {0xFD `%`_u32(239):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SQRT_vunop_) - ;; A-binary.watsup:961.5-961.43 + ;; A-binary.watsup:975.5-975.43 prod {0xFD `%`_u32(240):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:962.5-962.43 + ;; A-binary.watsup:976.5-976.43 prod {0xFD `%`_u32(241):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:963.5-963.43 + ;; A-binary.watsup:977.5-977.43 prod {0xFD `%`_u32(242):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:964.5-964.43 + ;; A-binary.watsup:978.5-978.43 prod {0xFD `%`_u32(243):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), DIV_vbinop_) - ;; A-binary.watsup:965.5-965.43 + ;; A-binary.watsup:979.5-979.43 prod {0xFD `%`_u32(244):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MIN_vbinop_) - ;; A-binary.watsup:966.5-966.43 + ;; A-binary.watsup:980.5-980.43 prod {0xFD `%`_u32(245):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MAX_vbinop_) - ;; A-binary.watsup:967.5-967.44 + ;; A-binary.watsup:981.5-981.44 prod {0xFD `%`_u32(246):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMIN_vbinop_) - ;; A-binary.watsup:968.5-968.44 + ;; A-binary.watsup:982.5-982.44 prod {0xFD `%`_u32(247):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMAX_vbinop_) - ;; A-binary.watsup:972.5-972.61 + ;; A-binary.watsup:983.5-983.51 + prod {0xFD `%`_u32(271):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:984.5-984.51 + prod {0xFD `%`_u32(272):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:988.5-988.53 + prod {0xFD `%`_u32(263):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:989.5-989.54 + prod {0xFD `%`_u32(264):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:993.5-993.61 prod {0xFD `%`_u32(94):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), DEMOTE_vcvtop__, ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:973.5-973.61 + ;; A-binary.watsup:994.5-994.61 prod {0xFD `%`_u32(95):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(F32_lanetype, `%`_dim(4)), PROMOTE_vcvtop__, ?(LOW_half__), ?()) - ;; A-binary.watsup:974.5-974.64 + ;; A-binary.watsup:995.5-995.64 prod {0xFD `%`_u32(248):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:975.5-975.64 + ;; A-binary.watsup:996.5-996.64 prod {0xFD `%`_u32(249):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:976.5-976.62 + ;; A-binary.watsup:997.5-997.62 prod {0xFD `%`_u32(250):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:977.5-977.62 + ;; A-binary.watsup:998.5-998.62 prod {0xFD `%`_u32(251):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:978.5-978.69 + ;; A-binary.watsup:999.5-999.69 prod {0xFD `%`_u32(252):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:979.5-979.69 + ;; A-binary.watsup:1000.5-1000.69 prod {0xFD `%`_u32(253):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:980.5-980.66 + ;; A-binary.watsup:1001.5-1001.66 prod {0xFD `%`_u32(254):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:981.5-981.66 + ;; A-binary.watsup:1002.5-1002.66 prod {0xFD `%`_u32(255):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(LOW_half__), ?()) + ;; A-binary.watsup:1003.5-1003.68 + prod {0xFD `%`_u32(257):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?()) + ;; A-binary.watsup:1004.5-1004.68 + prod {0xFD `%`_u32(258):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?()) + ;; A-binary.watsup:1005.5-1005.73 + prod {0xFD `%`_u32(259):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) + ;; A-binary.watsup:1006.5-1006.73 + prod {0xFD `%`_u32(260):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) } ;; A-binary.watsup @@ -16736,6 +17328,17 @@ def $sum(nat*) : nat def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) } +;; 0-aux.watsup +rec { + +;; 0-aux.watsup:37.1-37.57 +def $prod(nat*) : nat + ;; 0-aux.watsup:38.1-38.19 + def $prod([]) = 1 + ;; 0-aux.watsup:39.1-39.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + ;; 0-aux.watsup def $opt_(syntax X, X*) : X? ;; 0-aux.watsup @@ -16753,47 +17356,47 @@ def $list_(syntax X, X?) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:49.1-49.55 +;; 0-aux.watsup:53.1-53.55 def $concat_(syntax X, X**) : X* - ;; 0-aux.watsup:50.1-50.34 + ;; 0-aux.watsup:54.1-54.34 def $concat_{syntax X}(syntax X, []) = [] - ;; 0-aux.watsup:51.1-51.64 + ;; 0-aux.watsup:55.1-55.64 def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:53.1-53.61 +;; 0-aux.watsup:57.1-57.61 def $concatn_(syntax X, X**, nat : nat) : X* - ;; 0-aux.watsup:54.1-54.38 + ;; 0-aux.watsup:58.1-58.38 def $concatn_{syntax X, n : n}(syntax X, [], n) = [] - ;; 0-aux.watsup:55.1-55.73 + ;; 0-aux.watsup:59.1-59.73 def $concatn_{syntax X, `w*` : X*, n : n, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:57.1-57.78 +;; 0-aux.watsup:61.1-61.78 def $disjoint_(syntax X, X*) : bool - ;; 0-aux.watsup:58.1-58.37 + ;; 0-aux.watsup:62.1-62.37 def $disjoint_{syntax X}(syntax X, []) = true - ;; 0-aux.watsup:59.1-59.68 + ;; 0-aux.watsup:63.1-63.68 def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ w <- w'*{w' <- `w'*`} /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:62.1-62.38 +;; 0-aux.watsup:66.1-66.38 def $setminus1_(syntax X, X : X, X*) : X* - ;; 0-aux.watsup:66.1-66.38 + ;; 0-aux.watsup:70.1-70.38 def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] - ;; 0-aux.watsup:67.1-67.78 + ;; 0-aux.watsup:71.1-71.78 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = [] -- if (w = w_1) - ;; 0-aux.watsup:68.1-68.77 + ;; 0-aux.watsup:72.1-72.77 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = $setminus1_(syntax X, w, w'*{w' <- `w'*`}) -- otherwise } @@ -16801,47 +17404,50 @@ def $setminus1_(syntax X, X : X, X*) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:61.1-61.56 +;; 0-aux.watsup:65.1-65.56 def $setminus_(syntax X, X*, X*) : X* - ;; 0-aux.watsup:64.1-64.40 + ;; 0-aux.watsup:68.1-68.40 def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] - ;; 0-aux.watsup:65.1-65.90 + ;; 0-aux.watsup:69.1-69.90 def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:73.1-73.46 +;; 0-aux.watsup:77.1-77.46 def $setproduct2_(syntax X, X : X, X**) : X** - ;; 0-aux.watsup:79.1-79.44 + ;; 0-aux.watsup:83.1-83.44 def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] - ;; 0-aux.watsup:80.1-80.90 + ;; 0-aux.watsup:84.1-84.90 def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:72.1-72.47 +;; 0-aux.watsup:76.1-76.47 def $setproduct1_(syntax X, X*, X**) : X** - ;; 0-aux.watsup:77.1-77.46 + ;; 0-aux.watsup:81.1-81.46 def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] - ;; 0-aux.watsup:78.1-78.107 + ;; 0-aux.watsup:82.1-82.107 def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:71.1-71.82 +;; 0-aux.watsup:75.1-75.82 def $setproduct_(syntax X, X**) : X** - ;; 0-aux.watsup:75.1-75.40 + ;; 0-aux.watsup:79.1-79.40 def $setproduct_{syntax X}(syntax X, []) = [[]] - ;; 0-aux.watsup:76.1-76.90 + ;; 0-aux.watsup:80.1-80.90 def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) } +;; 1-syntax.watsup +def $ND : bool + ;; 1-syntax.watsup syntax list{syntax X}(syntax X) = | `%`{`X*` : X*}(X*{X <- `X*`} : X*) @@ -16968,7 +17574,7 @@ def $cont(byte : byte) : nat ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:87.1-87.25 +;; 1-syntax.watsup:94.1-94.25 def $utf8(char*) : byte* ;; A-binary.watsup:53.1-53.44 def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8([ch])*{ch <- `ch*`}) @@ -17092,13 +17698,13 @@ syntax fin = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:155.1-156.26 +;; 1-syntax.watsup:162.1-163.26 syntax typeuse = | _IDX{typeidx : typeidx}(typeidx : typeidx) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) | REC{n : n}(n : n) -;; 1-syntax.watsup:158.1-159.26 +;; 1-syntax.watsup:165.1-166.26 syntax heaptype = | ANY | EQ @@ -17117,7 +17723,7 @@ syntax heaptype = | REC{n : n}(n : n) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) -;; 1-syntax.watsup:166.1-167.14 +;; 1-syntax.watsup:173.1-174.14 syntax valtype = | I32 | I64 @@ -17127,10 +17733,10 @@ syntax valtype = | REF{nul : nul, heaptype : heaptype}(nul : nul, heaptype : heaptype) | BOT -;; 1-syntax.watsup:196.1-197.16 +;; 1-syntax.watsup:203.1-204.16 syntax resulttype = list(syntax valtype) -;; 1-syntax.watsup:204.1-204.66 +;; 1-syntax.watsup:211.1-211.66 syntax storagetype = | BOT | I32 @@ -17142,31 +17748,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:220.1-220.60 +;; 1-syntax.watsup:227.1-227.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:222.1-222.90 +;; 1-syntax.watsup:229.1-229.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:223.1-223.64 +;; 1-syntax.watsup:230.1-230.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:224.1-224.54 +;; 1-syntax.watsup:231.1-231.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:226.1-229.18 +;; 1-syntax.watsup:233.1-236.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:231.1-232.30 +;; 1-syntax.watsup:238.1-239.30 syntax subtype = | SUB{fin : fin, `typeuse*` : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse <- `typeuse*`} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:234.1-235.22 +;; 1-syntax.watsup:241.1-242.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -17616,6 +18222,26 @@ def $shsize(shape : shape) : nat ;; 2-syntax-aux.watsup def $shsize{Lnn : Lnn, N : N}(`%X%`_shape(Lnn, `%`_dim(N))) = ($lsize(Lnn) * N) +;; 1-syntax.watsup +syntax half__(shape_1 : shape, shape_2 : shape) + ;; 1-syntax.watsup + syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = + | LOW + | HIGH + -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) + + + ;; 1-syntax.watsup + syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = + | LOW + -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) + + +;; 1-syntax.watsup +syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = + | ZERO + -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) + ;; 1-syntax.watsup syntax vvunop = | NOT @@ -17672,6 +18298,8 @@ syntax vbinop_(shape : shape) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) | `Q15MULR_SATS` -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | `RELAXED_Q15MULRS` + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) | MIN{sx : sx}(sx : sx) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) | MAX{sx : sx}(sx : sx) @@ -17688,6 +18316,21 @@ syntax vbinop_(shape : shape) | MAX | PMIN | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; 1-syntax.watsup +syntax vternop_(shape : shape) + ;; 1-syntax.watsup + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))) = + | RELAXED_LANESELECT + + + ;; 1-syntax.watsup + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))) = + | RELAXED_MADD + | RELAXED_NMADD ;; 1-syntax.watsup @@ -17738,6 +18381,8 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = | TRUNC_SAT{sx : sx}(sx : sx) -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_TRUNC{sx : sx}(sx : sx) + -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup @@ -17749,24 +18394,9 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) ;; 1-syntax.watsup -syntax half__(shape_1 : shape, shape_2 : shape) - ;; 1-syntax.watsup - syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = - | LOW - | HIGH - -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) - - - ;; 1-syntax.watsup - syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = - | LOW - -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) - - -;; 1-syntax.watsup -syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = - | ZERO - -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) +syntax vswizzlop_{M : M}(`%X%`_ishape(I8_Jnn, `%`_dim(M))) = + | SWIZZLE + | RELAXED_SWIZZLE ;; 1-syntax.watsup syntax vshiftop_{Jnn : Jnn, M : M}(`%X%`_ishape(Jnn, `%`_dim(M))) = @@ -17784,6 +18414,13 @@ syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_ -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) | `DOTS` -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | `RELAXED_DOTS` + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; 1-syntax.watsup +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2))) = + | `RELAXED_DOT_ADDS` + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup syntax memarg = @@ -17958,20 +18595,20 @@ syntax instr = | VVTESTOP{vectype : vectype, vvtestop : vvtestop}(vectype : vectype, vvtestop : vvtestop) | VUNOP{shape : shape, vunop_ : vunop_(shape)}(shape : shape, vunop_ : vunop_(shape)) | VBINOP{shape : shape, vbinop_ : vbinop_(shape)}(shape : shape, vbinop_ : vbinop_(shape)) + | VTERNOP{shape : shape, vternop_ : vternop_(shape)}(shape : shape, vternop_ : vternop_(shape)) | VTESTOP{shape : shape, vtestop_ : vtestop_(shape)}(shape : shape, vtestop_ : vtestop_(shape)) | VRELOP{shape : shape, vrelop_ : vrelop_(shape)}(shape : shape, vrelop_ : vrelop_(shape)) | VSHIFTOP{ishape : ishape, vshiftop_ : vshiftop_(ishape)}(ishape : ishape, vshiftop_ : vshiftop_(ishape)) | VBITMASK{ishape : ishape}(ishape : ishape) - | VSWIZZLE{ishape : ishape}(ishape : ishape) - -- if (ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) + | VSWIZZLOP{ishape : ishape, vswizzlop_ : vswizzlop_(ishape)}(ishape : ishape, vswizzlop_ : vswizzlop_(ishape)) | VSHUFFLE{ishape : ishape, `laneidx*` : laneidx*}(ishape : ishape, laneidx*{laneidx <- `laneidx*`} : laneidx*) -- if ((ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) /\ (|laneidx*{laneidx <- `laneidx*`}| = 16)) | VEXTUNOP{ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)) | VEXTBINOP{ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP{ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)) | VNARROW{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(ishape_1 : ishape, ishape_2 : ishape, sx : sx) -- if (($lsize($lanetype((ishape_2 : ishape <: shape))) = (2 * $lsize($lanetype((ishape_1 : ishape <: shape))))) /\ ((2 * $lsize($lanetype((ishape_1 : ishape <: shape)))) <= 32)) | VCVTOP{shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), `half__?` : half__(shape_2, shape_1)?, `zero__?` : zero__(shape_2, shape_1)?}(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), half__?{half__ <- `half__?`} : half__(shape_2, shape_1)?, zero__?{zero__ <- `zero__?`} : zero__(shape_2, shape_1)?) - -- if ($lanetype(shape_1) =/= $lanetype(shape_2)) | VSPLAT{shape : shape}(shape : shape) | VEXTRACT_LANE{shape : shape, `sx?` : sx?, laneidx : laneidx, numtype : numtype}(shape : shape, sx?{sx <- `sx?`} : sx?, laneidx : laneidx) -- if ((sx?{sx <- `sx?`} = ?()) <=> ($lanetype(shape) = (numtype : numtype <: lanetype))) @@ -18479,13 +19116,13 @@ def $free_shape(shape : shape) : free ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:443.1-443.44 +;; 2-syntax-aux.watsup:444.1-444.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; 2-syntax-aux.watsup:444.1-444.32 + ;; 2-syntax-aux.watsup:445.1-445.32 def $shift_labelidxs([]) = [] - ;; 2-syntax-aux.watsup:445.1-445.66 + ;; 2-syntax-aux.watsup:446.1-446.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_uN(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; 2-syntax-aux.watsup:446.1-446.91 + ;; 2-syntax-aux.watsup:447.1-447.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_uN((labelidx!`%`_labelidx.0 - 1))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } @@ -18494,7 +19131,7 @@ rec { ;; 2-syntax-aux.watsup:299.1-299.31 def $free_block(instr*) : free - ;; 2-syntax-aux.watsup:449.1-450.47 + ;; 2-syntax-aux.watsup:450.1-451.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) @@ -18569,134 +19206,136 @@ def $free_instr(instr : instr) : free ;; 2-syntax-aux.watsup:347.1-347.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) ;; 2-syntax-aux.watsup:348.1-348.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; 2-syntax-aux.watsup:349.1-349.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:349.1-349.58 + ;; 2-syntax-aux.watsup:350.1-350.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:350.1-350.64 + ;; 2-syntax-aux.watsup:351.1-351.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:351.1-351.55 - def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) ;; 2-syntax-aux.watsup:352.1-352.55 - def $free_instr{ishape : ishape}(VSWIZZLE_instr(ishape)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:353.1-353.64 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:353.1-353.66 + def $free_instr{ishape : ishape, vswizzlop : vswizzlop_(ishape)}(VSWIZZLOP_instr(ishape, vswizzlop)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:354.1-354.64 def $free_instr{ishape : ishape, `laneidx*` : laneidx*}(VSHUFFLE_instr(ishape, laneidx*{laneidx <- `laneidx*`})) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:354.1-355.49 + ;; 2-syntax-aux.watsup:355.1-356.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:356.1-357.49 + ;; 2-syntax-aux.watsup:357.1-358.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:358.1-359.49 + ;; 2-syntax-aux.watsup:359.1-360.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:360.1-361.47 + ;; 2-syntax-aux.watsup:361.1-362.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1), `half?` : half__(shape_2, shape_1)?, `zero?` : zero__(shape_2, shape_1)?}(VCVTOP_instr(shape_1, shape_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`})) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; 2-syntax-aux.watsup:362.1-362.51 + ;; 2-syntax-aux.watsup:363.1-363.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:363.1-363.70 + ;; 2-syntax-aux.watsup:364.1-364.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:364.1-364.66 + ;; 2-syntax-aux.watsup:365.1-365.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:366.1-366.62 + ;; 2-syntax-aux.watsup:367.1-367.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; 2-syntax-aux.watsup:367.1-367.34 + ;; 2-syntax-aux.watsup:368.1-368.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:368.1-368.38 + ;; 2-syntax-aux.watsup:369.1-369.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:369.1-369.29 + ;; 2-syntax-aux.watsup:370.1-370.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:370.1-370.59 - def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:371.1-371.59 - def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:372.1-372.59 + def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + ;; 2-syntax-aux.watsup:373.1-373.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; 2-syntax-aux.watsup:373.1-373.30 + ;; 2-syntax-aux.watsup:374.1-374.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:375.1-375.33 + ;; 2-syntax-aux.watsup:376.1-376.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:377.1-377.41 + ;; 2-syntax-aux.watsup:378.1-378.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:378.1-378.69 - def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) ;; 2-syntax-aux.watsup:379.1-379.69 + def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) + ;; 2-syntax-aux.watsup:380.1-380.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:380.1-380.65 + ;; 2-syntax-aux.watsup:381.1-381.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:382.1-382.60 + ;; 2-syntax-aux.watsup:383.1-383.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:383.1-383.68 + ;; 2-syntax-aux.watsup:384.1-384.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:384.1-384.70 + ;; 2-syntax-aux.watsup:385.1-385.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:385.1-386.51 + ;; 2-syntax-aux.watsup:386.1-387.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:387.1-388.51 + ;; 2-syntax-aux.watsup:388.1-389.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:389.1-389.64 + ;; 2-syntax-aux.watsup:390.1-390.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:390.1-390.60 + ;; 2-syntax-aux.watsup:391.1-391.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:391.1-391.32 + ;; 2-syntax-aux.watsup:392.1-392.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:392.1-392.61 + ;; 2-syntax-aux.watsup:393.1-393.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:393.1-394.55 + ;; 2-syntax-aux.watsup:394.1-395.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; 2-syntax-aux.watsup:395.1-396.51 + ;; 2-syntax-aux.watsup:396.1-397.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:397.1-398.51 + ;; 2-syntax-aux.watsup:398.1-399.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:400.1-400.41 - def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} ;; 2-syntax-aux.watsup:401.1-401.41 + def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} + ;; 2-syntax-aux.watsup:402.1-402.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:403.1-403.63 - def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:404.1-404.63 - def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:405.1-405.63 + def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + ;; 2-syntax-aux.watsup:406.1-406.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; 2-syntax-aux.watsup:407.1-407.67 - def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) ;; 2-syntax-aux.watsup:408.1-408.67 + def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) + ;; 2-syntax-aux.watsup:409.1-409.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; 2-syntax-aux.watsup:410.1-410.63 - def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:411.1-411.63 + def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:412.1-412.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:412.1-412.64 - def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:413.1-413.64 - def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:414.1-414.64 + def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:415.1-415.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:415.1-416.59 + ;; 2-syntax-aux.watsup:416.1-417.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; 2-syntax-aux.watsup:417.1-418.53 + ;; 2-syntax-aux.watsup:418.1-419.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:419.1-419.60 + ;; 2-syntax-aux.watsup:420.1-420.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:421.1-422.49 + ;; 2-syntax-aux.watsup:422.1-423.49 def $free_instr{numtype : numtype, loadop : loadop_(numtype), memidx : memidx, memarg : memarg}(LOAD_instr(numtype, ?(loadop), memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:423.1-424.49 + ;; 2-syntax-aux.watsup:424.1-425.49 def $free_instr{numtype : numtype, `sz?` : sz?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, sz?{sz <- `sz?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:425.1-426.49 + ;; 2-syntax-aux.watsup:426.1-427.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:427.1-428.49 + ;; 2-syntax-aux.watsup:428.1-429.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:429.1-430.49 + ;; 2-syntax-aux.watsup:430.1-431.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:431.1-432.49 + ;; 2-syntax-aux.watsup:432.1-433.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:433.1-433.59 - def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:434.1-434.59 - def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:435.1-435.59 + def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + ;; 2-syntax-aux.watsup:436.1-436.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; 2-syntax-aux.watsup:436.1-437.51 + ;; 2-syntax-aux.watsup:437.1-438.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; 2-syntax-aux.watsup:438.1-439.49 + ;; 2-syntax-aux.watsup:439.1-440.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:440.1-440.60 + ;; 2-syntax-aux.watsup:441.1-441.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) } @@ -18799,14 +19438,14 @@ def $dataidx_funcs(func*) : dataidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:532.1-532.112 +;; 2-syntax-aux.watsup:533.1-533.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:559.1-559.38 + ;; 2-syntax-aux.watsup:560.1-560.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; 2-syntax-aux.watsup:560.1-560.95 + ;; 2-syntax-aux.watsup:561.1-561.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; 2-syntax-aux.watsup:561.1-561.92 + ;; 2-syntax-aux.watsup:562.1-562.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -18829,78 +19468,78 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:533.1-533.112 +;; 2-syntax-aux.watsup:534.1-534.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:563.1-563.66 + ;; 2-syntax-aux.watsup:564.1-564.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; 2-syntax-aux.watsup:564.1-564.64 + ;; 2-syntax-aux.watsup:565.1-565.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; 2-syntax-aux.watsup:537.1-537.112 +;; 2-syntax-aux.watsup:538.1-538.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; 2-syntax-aux.watsup:569.1-569.67 + ;; 2-syntax-aux.watsup:570.1-570.67 def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) - ;; 2-syntax-aux.watsup:570.1-570.65 + ;; 2-syntax-aux.watsup:571.1-571.65 def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) - ;; 2-syntax-aux.watsup:571.1-571.53 + ;; 2-syntax-aux.watsup:572.1-572.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; 2-syntax-aux.watsup:538.1-538.112 +;; 2-syntax-aux.watsup:539.1-539.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; 2-syntax-aux.watsup:573.1-573.83 + ;; 2-syntax-aux.watsup:574.1-574.83 def $subst_reftype{nul : nul, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(nul, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(nul, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:539.1-539.112 +;; 2-syntax-aux.watsup:540.1-540.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; 2-syntax-aux.watsup:575.1-575.64 - def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:576.1-576.64 - def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:577.1-577.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; 2-syntax-aux.watsup:578.1-578.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; 2-syntax-aux.watsup:578.1-578.40 + ;; 2-syntax-aux.watsup:579.1-579.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; 2-syntax-aux.watsup:542.1-542.112 +;; 2-syntax-aux.watsup:543.1-543.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; 2-syntax-aux.watsup:582.1-582.66 + ;; 2-syntax-aux.watsup:583.1-583.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; 2-syntax-aux.watsup:583.1-583.69 + ;; 2-syntax-aux.watsup:584.1-584.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; 2-syntax-aux.watsup:543.1-543.112 +;; 2-syntax-aux.watsup:544.1-544.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; 2-syntax-aux.watsup:585.1-585.80 + ;; 2-syntax-aux.watsup:586.1-586.80 def $subst_fieldtype{mut : mut, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:545.1-545.112 +;; 2-syntax-aux.watsup:546.1-546.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; 2-syntax-aux.watsup:587.1-587.85 + ;; 2-syntax-aux.watsup:588.1-588.85 def $subst_comptype{`yt*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_structtype(yt*{yt <- `yt*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_structtype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{yt <- `yt*`})) - ;; 2-syntax-aux.watsup:588.1-588.81 + ;; 2-syntax-aux.watsup:589.1-589.81 def $subst_comptype{yt : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(yt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; 2-syntax-aux.watsup:589.1-589.78 + ;; 2-syntax-aux.watsup:590.1-590.78 def $subst_comptype{ft : functype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_comptype($subst_functype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:546.1-546.112 +;; 2-syntax-aux.watsup:547.1-547.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; 2-syntax-aux.watsup:591.1-592.71 + ;; 2-syntax-aux.watsup:592.1-593.71 def $subst_subtype{fin : fin, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(fin, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(fin, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:547.1-547.112 +;; 2-syntax-aux.watsup:548.1-548.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; 2-syntax-aux.watsup:594.1-594.76 + ;; 2-syntax-aux.watsup:595.1-595.76 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{st <- `st*`})) -;; 2-syntax-aux.watsup:548.1-548.112 +;; 2-syntax-aux.watsup:549.1-549.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; 2-syntax-aux.watsup:596.1-596.78 + ;; 2-syntax-aux.watsup:597.1-597.78 def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) -;; 2-syntax-aux.watsup:551.1-551.112 +;; 2-syntax-aux.watsup:552.1-552.112 def $subst_functype(functype : functype, typevar*, typeuse*) : functype - ;; 2-syntax-aux.watsup:599.1-599.113 + ;; 2-syntax-aux.watsup:600.1-600.113 def $subst_functype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_functype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_functype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`}), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`})) } @@ -18973,11 +19612,11 @@ def $subst_all_moduletype(moduletype : moduletype, heaptype*) : moduletype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:627.1-627.98 +;; 2-syntax-aux.watsup:628.1-628.98 def $subst_all_deftypes(deftype*, heaptype*) : deftype* - ;; 2-syntax-aux.watsup:628.1-628.40 + ;; 2-syntax-aux.watsup:629.1-629.40 def $subst_all_deftypes{`tu*` : typeuse*}([], (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [] - ;; 2-syntax-aux.watsup:629.1-629.101 + ;; 2-syntax-aux.watsup:630.1-630.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, (tu : typeuse <: heaptype)*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) } @@ -19021,13 +19660,13 @@ relation Expand: `%~~%`(deftype, comptype) ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:661.1-661.86 +;; 2-syntax-aux.watsup:662.1-662.86 def $funcsxx(externidx*) : typeidx* - ;; 2-syntax-aux.watsup:667.1-667.24 + ;; 2-syntax-aux.watsup:668.1-668.24 def $funcsxx([]) = [] - ;; 2-syntax-aux.watsup:668.1-668.45 + ;; 2-syntax-aux.watsup:669.1-669.45 def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:669.1-669.58 + ;; 2-syntax-aux.watsup:670.1-670.58 def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -19035,13 +19674,13 @@ def $funcsxx(externidx*) : typeidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:662.1-662.88 +;; 2-syntax-aux.watsup:663.1-663.88 def $globalsxx(externidx*) : globalidx* - ;; 2-syntax-aux.watsup:671.1-671.26 + ;; 2-syntax-aux.watsup:672.1-672.26 def $globalsxx([]) = [] - ;; 2-syntax-aux.watsup:672.1-672.51 + ;; 2-syntax-aux.watsup:673.1-673.51 def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:673.1-673.62 + ;; 2-syntax-aux.watsup:674.1-674.62 def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -19049,13 +19688,13 @@ def $globalsxx(externidx*) : globalidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:663.1-663.87 +;; 2-syntax-aux.watsup:664.1-664.87 def $tablesxx(externidx*) : tableidx* - ;; 2-syntax-aux.watsup:675.1-675.25 + ;; 2-syntax-aux.watsup:676.1-676.25 def $tablesxx([]) = [] - ;; 2-syntax-aux.watsup:676.1-676.48 + ;; 2-syntax-aux.watsup:677.1-677.48 def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:677.1-677.60 + ;; 2-syntax-aux.watsup:678.1-678.60 def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) -- otherwise } @@ -19063,13 +19702,13 @@ def $tablesxx(externidx*) : tableidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:664.1-664.85 +;; 2-syntax-aux.watsup:665.1-665.85 def $memsxx(externidx*) : memidx* - ;; 2-syntax-aux.watsup:679.1-679.23 + ;; 2-syntax-aux.watsup:680.1-680.23 def $memsxx([]) = [] - ;; 2-syntax-aux.watsup:680.1-680.42 + ;; 2-syntax-aux.watsup:681.1-681.42 def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:681.1-681.56 + ;; 2-syntax-aux.watsup:682.1-682.56 def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -19077,13 +19716,13 @@ def $memsxx(externidx*) : memidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:665.1-665.85 +;; 2-syntax-aux.watsup:666.1-666.85 def $tagsxx(externidx*) : tagidx* - ;; 2-syntax-aux.watsup:683.1-683.23 + ;; 2-syntax-aux.watsup:684.1-684.23 def $tagsxx([]) = [] - ;; 2-syntax-aux.watsup:684.1-684.42 + ;; 2-syntax-aux.watsup:685.1-685.42 def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:685.1-685.56 + ;; 2-syntax-aux.watsup:686.1-686.56 def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -19091,13 +19730,13 @@ def $tagsxx(externidx*) : tagidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:688.1-688.88 +;; 2-syntax-aux.watsup:689.1-689.88 def $funcsxt(externtype*) : deftype* - ;; 2-syntax-aux.watsup:694.1-694.24 + ;; 2-syntax-aux.watsup:695.1-695.24 def $funcsxt([]) = [] - ;; 2-syntax-aux.watsup:695.1-695.47 + ;; 2-syntax-aux.watsup:696.1-696.47 def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:696.1-696.59 + ;; 2-syntax-aux.watsup:697.1-697.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -19105,13 +19744,13 @@ def $funcsxt(externtype*) : deftype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:689.1-689.90 +;; 2-syntax-aux.watsup:690.1-690.90 def $globalsxt(externtype*) : globaltype* - ;; 2-syntax-aux.watsup:698.1-698.26 + ;; 2-syntax-aux.watsup:699.1-699.26 def $globalsxt([]) = [] - ;; 2-syntax-aux.watsup:699.1-699.53 + ;; 2-syntax-aux.watsup:700.1-700.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:700.1-700.63 + ;; 2-syntax-aux.watsup:701.1-701.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -19119,13 +19758,13 @@ def $globalsxt(externtype*) : globaltype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:690.1-690.89 +;; 2-syntax-aux.watsup:691.1-691.89 def $tablesxt(externtype*) : tabletype* - ;; 2-syntax-aux.watsup:702.1-702.25 + ;; 2-syntax-aux.watsup:703.1-703.25 def $tablesxt([]) = [] - ;; 2-syntax-aux.watsup:703.1-703.50 + ;; 2-syntax-aux.watsup:704.1-704.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:704.1-704.61 + ;; 2-syntax-aux.watsup:705.1-705.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -19133,13 +19772,13 @@ def $tablesxt(externtype*) : tabletype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:691.1-691.87 +;; 2-syntax-aux.watsup:692.1-692.87 def $memsxt(externtype*) : memtype* - ;; 2-syntax-aux.watsup:706.1-706.23 + ;; 2-syntax-aux.watsup:707.1-707.23 def $memsxt([]) = [] - ;; 2-syntax-aux.watsup:707.1-707.44 + ;; 2-syntax-aux.watsup:708.1-708.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:708.1-708.57 + ;; 2-syntax-aux.watsup:709.1-709.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -19147,13 +19786,13 @@ def $memsxt(externtype*) : memtype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:692.1-692.87 +;; 2-syntax-aux.watsup:693.1-693.87 def $tagsxt(externtype*) : tagtype* - ;; 2-syntax-aux.watsup:710.1-710.23 + ;; 2-syntax-aux.watsup:711.1-711.23 def $tagsxt([]) = [] - ;; 2-syntax-aux.watsup:711.1-711.44 + ;; 2-syntax-aux.watsup:712.1-712.44 def $tagsxt{at : tagtype, `xt*` : externtype*}([TAG_externtype((at : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [at] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:712.1-712.57 + ;; 2-syntax-aux.watsup:713.1-713.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -19164,213 +19803,233 @@ def $memarg0 : memarg def $memarg0 = {ALIGN `%`_u32(0), OFFSET `%`_u32(0)} ;; 3-numerics.watsup -def $s33_to_u32(s33 : s33) : u32 +syntax relaxed2 = + | `%`{i : nat}(i : nat) + -- if ((i = 0) \/ (i = 1)) ;; 3-numerics.watsup -def $signed_(N : N, nat : nat) : int +syntax relaxed4 = + | `%`{i : nat}(i : nat) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; 3-numerics.watsup +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) - -- if (0 <= (2 ^ (N - 1))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][i] + -- if $ND ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) - -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][0] + -- otherwise ;; 3-numerics.watsup -def $invsigned_(N : N, int : int) : nat +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X ;; 3-numerics.watsup - def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j - -- if ($signed_(N, j) = (i : nat <: int)) + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][i] + -- if $ND + ;; 3-numerics.watsup + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][0] + -- otherwise ;; 3-numerics.watsup -def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $R_fmadd : relaxed2 ;; 3-numerics.watsup -def $fabs_(N : N, fN : fN(N)) : fN(N)* +def $R_fmin : relaxed4 ;; 3-numerics.watsup -def $fceil_(N : N, fN : fN(N)) : fN(N)* +def $R_fmax : relaxed4 ;; 3-numerics.watsup -def $ffloor_(N : N, fN : fN(N)) : fN(N)* +def $R_idot : relaxed2 ;; 3-numerics.watsup -def $fnearest_(N : N, fN : fN(N)) : fN(N)* +def $R_iq15mulr : relaxed2 ;; 3-numerics.watsup -def $fneg_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_u : relaxed4 ;; 3-numerics.watsup -def $fsqrt_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_s : relaxed2 ;; 3-numerics.watsup -def $ftrunc_(N : N, fN : fN(N)) : fN(N)* +def $R_swizzle : relaxed2 ;; 3-numerics.watsup -def $iclz_(N : N, iN : iN(N)) : iN(N) +def $R_laneselect : relaxed2 ;; 3-numerics.watsup -def $ictz_(N : N, iN : iN(N)) : iN(N) +def $s33_to_u32(s33 : s33) : u32 ;; 3-numerics.watsup -def $ipopcnt_(N : N, iN : iN(N)) : iN(N) +def $signed_(N : N, nat : nat) : int + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) + -- if (0 <= (2 ^ (N - 1))) + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) + -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) ;; 3-numerics.watsup -def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) +def $invsigned_(N : N, int : int) : nat + ;; 3-numerics.watsup + def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j + -- if ($signed_(N, j) = (i : nat <: int)) ;; 3-numerics.watsup -def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] +def $sat_u_(N : N, nat : nat) : nat ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = 0 + -- if (i < 0) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = ((2 ^ N) - 1) + -- if (i > ((2 ^ N) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = i + -- otherwise + +;; 3-numerics.watsup +def $sat_s_(N : N, int : int) : int ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = - ((2 ^ (N - 1)) : nat <: int) + -- if ((i : nat <: int) < - ((2 ^ (N - 1)) : nat <: int)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (((2 ^ (N - 1)) - 1) : nat <: int) + -- if (i > ((2 ^ (N - 1)) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (i : nat <: int) + -- otherwise ;; 3-numerics.watsup -def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $relaxed_trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) ;; 3-numerics.watsup -def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) ;; 3-numerics.watsup -def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $ibits_(N : N, iN : iN(N)) : bit* ;; 3-numerics.watsup -def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbits_(N : N, fN : fN(N)) : bit* ;; 3-numerics.watsup -def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $ibytes_(N : N, iN : iN(N)) : byte* ;; 3-numerics.watsup -def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbytes_(N : N, fN : fN(N)) : byte* ;; 3-numerics.watsup -def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* ;; 3-numerics.watsup -def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* ;; 3-numerics.watsup -def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; 3-numerics.watsup +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; 3-numerics.watsup +def $invibytes_(N : N, byte*) : iN(N) + ;; 3-numerics.watsup + def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) + -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) + +;; 3-numerics.watsup +def $invfbytes_(N : N, byte*) : fN(N) + ;; 3-numerics.watsup + def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p + -- if ($fbytes_(N, p) = b*{b <- `b*`}) + +;; 3-numerics.watsup +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +;; 3-numerics.watsup +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + +;; 3-numerics.watsup +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + +;; 3-numerics.watsup +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; 3-numerics.watsup def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) ;; 3-numerics.watsup -def $ieqz_(N : N, iN : iN(N)) : u32 +def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) ;; 3-numerics.watsup -def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iclz_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ictz_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ieqz_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup -def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $inez_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 @@ -19379,156 +20038,118 @@ def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) +def $iabs_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $ineg_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] - -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] - -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $ibits_(N : N, iN : iN(N)) : bit* +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $fbits_(N : N, fN : fN(N)) : bit* +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibytes_(N : N, iN : iN(N)) : byte* +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $fbytes_(N : N, fN : fN(N)) : byte* +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invibytes_(N : N, byte*) : iN(N) - ;; 3-numerics.watsup - def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) - -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invfbytes_(N : N, byte*) : fN(N) - ;; 3-numerics.watsup - def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p - -- if ($fbytes_(N, p) = b*{b <- `b*`}) +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $inot_(N : N, iN : iN(N)) : iN(N) +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) +def $fabs_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iabs_(N : N, iN : iN(N)) : iN(N) +def $fneg_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ineg_(N : N, iN : iN(N)) : iN(N) +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fceil_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ffloor_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fnearest_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; 3-numerics.watsup +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) @@ -19576,6 +20197,127 @@ def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), ;; 3-numerics.watsup def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i +;; 3-numerics.watsup +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + +;; 3-numerics.watsup +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) + +;; 3-numerics.watsup +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] + -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) + ;; 3-numerics.watsup def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* ;; 3-numerics.watsup @@ -19613,12 +20355,6 @@ def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128 ;; 3-numerics.watsup def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fabs_, vN_1) ;; 3-numerics.watsup @@ -19633,6 +20369,12 @@ def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_ def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), TRUNC_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ftrunc_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEAREST_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fnearest_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* @@ -19658,6 +20400,14 @@ def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) +;; 3-numerics.watsup +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, sx, vN_1, vN_2) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + ;; 3-numerics.watsup def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* ;; 3-numerics.watsup @@ -19679,6 +20429,8 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec ;; 3-numerics.watsup def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `Q15MULR_SATS`_vbinop_, vN_1, vN_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iq15mulr_sat_, S_sx, vN_1, vN_2) ;; 3-numerics.watsup + def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `RELAXED_Q15MULRS`_vbinop_, vN_1, vN_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_q15mulr_, S_sx, vN_1, vN_2) + ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ADD_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fadd_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SUB_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsub_, vN_1, vN_2) @@ -19694,6 +20446,49 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmin_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmax_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_min_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_max_, vN_1, vN_2) + +;; 3-numerics.watsup +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $vternop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), RELAXED_LANESELECT_vternop_, vN_1, vN_2, vN_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_laneselect_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_madd_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_NMADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_nmadd_, vN_1, vN_2, vN_3) + +;; 3-numerics.watsup +def $ivtestop_(shape : shape, def $f_(N : N, iN : iN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $ivtestop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + +;; 3-numerics.watsup +def $vtestop_(shape : shape, vtestop_ : vtestop_(shape), vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $vtestop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_, vN_1) = $ivtestop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $inez_, vN_1) ;; 3-numerics.watsup def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) @@ -19759,6 +20554,9 @@ def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, sha def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), TRUNC_SAT_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) -- if (iN_2?{iN_2 <- `iN_2?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) ;; 3-numerics.watsup + def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), RELAXED_TRUNC_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) + -- if (iN_2?{iN_2 <- `iN_2?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) + ;; 3-numerics.watsup def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `fN_2*` : lane_($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), DEMOTE_vcvtop__, fN_1) = fN_2*{fN_2 <- `fN_2*`} -- if (fN_2*{fN_2 <- `fN_2*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), fN_1)) ;; 3-numerics.watsup @@ -19781,11 +20579,38 @@ def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__ -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)[$half__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), half, 0, M_2) : M_2]) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`})) ;; 3-numerics.watsup - def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) - -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`}) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + ;; 3-numerics.watsup + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOTS`_vextbinop__, c_1, c_2) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_sat_($lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + +;; 3-numerics.watsup +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_3*` : lane_($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))))*, Jnn : Jnn, `ci'_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOT_ADDS`_vextternop__, c_1, c_2, c_3) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci_3*{ci_3 <- `ci_3*`} = $lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), c_3)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [`%`_uN(cj_1!`%`_iN.0) `%`_uN(cj_2!`%`_iN.0)]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn((Jnn : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [ck_1 ck_2]*{ck_1 <- `ck_1*`, ck_2 <- `ck_2*`}) = $iadd_sat_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN(cj_1!`%`_iN.0), `%`_iN(cj_2!`%`_iN.0))*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) + -- if (ck'_1*{ck'_1 <- `ck'_1*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_1)*{ck_1 <- `ck_1*`}) + -- if (ck'_2*{ck'_2 <- `ck'_2*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_2)*{ck_2 <- `ck_2*`}) + -- if (ck*{ck <- `ck*`} = $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck'_1, ck'_2)*{ck'_1 <- `ck'_1*`, ck'_2 <- `ck'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck, ci_3)*{ci_3 <- `ci_3*`, ck <- `ck*`})) ;; 3-numerics.watsup def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($lanetype((ishape : ishape <: shape))), u32 : u32) : lane_($lanetype((ishape : ishape <: shape))) @@ -19794,6 +20619,13 @@ def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($la ;; 3-numerics.watsup def $vshiftop_{Jnn : Jnn, M : M, sx : sx, lane : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)))), n : n}(`%X%`_ishape(Jnn, `%`_dim(M)), SHR_vshiftop_(sx), lane, `%`_u32(n)) = $ishr_($lsizenn((Jnn : Jnn <: lanetype)), sx, lane, `%`_u32(n)) +;; 3-numerics.watsup +def $fvtestop_(shape : shape, def $f_(N : N, fN : fN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $fvtestop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($sizenn((Fnn : Fnn <: numtype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + ;; 4-runtime.watsup syntax num = | CONST{numtype : numtype, num_ : num_(numtype)}(numtype : numtype, num_ : num_(numtype)) @@ -21315,224 +22147,232 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:948.1-949.40 + ;; 6-typing.watsup:948.1-949.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:951.1-952.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:951.1-952.44 + ;; 6-typing.watsup:954.1-955.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:954.1-955.47 + ;; 6-typing.watsup:957.1-958.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:957.1-958.33 + ;; 6-typing.watsup:960.1-961.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:960.1-961.39 - rule vswizzle{C : context, sh : ishape}: - `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + ;; 6-typing.watsup:963.1-964.50 + rule vswizzlop{C : context, sh : ishape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:963.1-965.29 + ;; 6-typing.watsup:966.1-968.29 rule vshuffle{C : context, sh : ishape, `i*` : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i <- `i*`} - ;; 6-typing.watsup:967.1-968.44 + ;; 6-typing.watsup:970.1-971.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:970.1-972.21 + ;; 6-typing.watsup:973.1-975.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:974.1-976.21 + ;; 6-typing.watsup:977.1-979.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:978.1-979.50 + ;; 6-typing.watsup:981.1-982.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:981.1-982.57 + ;; 6-typing.watsup:984.1-985.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:984.1-985.48 + ;; 6-typing.watsup:987.1-988.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:990.1-991.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:987.1-988.58 + ;; 6-typing.watsup:993.1-994.58 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1), `half?` : half__(sh_2, sh_1)?, `zero?` : zero__(sh_2, sh_1)?}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:993.1-995.28 + ;; 6-typing.watsup:999.1-1001.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:997.1-999.29 + ;; 6-typing.watsup:1003.1-1005.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1001.1-1003.29 + ;; 6-typing.watsup:1007.1-1009.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1008.1-1010.29 + ;; 6-typing.watsup:1014.1-1016.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:1012.1-1014.29 + ;; 6-typing.watsup:1018.1-1020.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:1019.1-1021.29 + ;; 6-typing.watsup:1025.1-1027.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1023.1-1025.29 + ;; 6-typing.watsup:1029.1-1031.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1027.1-1029.29 + ;; 6-typing.watsup:1033.1-1035.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1031.1-1033.29 + ;; 6-typing.watsup:1037.1-1039.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1035.1-1037.29 + ;; 6-typing.watsup:1041.1-1043.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1039.1-1043.36 + ;; 6-typing.watsup:1045.1-1049.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%`_tabletype(lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1045.1-1049.36 + ;; 6-typing.watsup:1051.1-1055.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1051.1-1053.24 + ;; 6-typing.watsup:1057.1-1059.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1058.1-1060.23 + ;; 6-typing.watsup:1064.1-1066.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1062.1-1064.23 + ;; 6-typing.watsup:1068.1-1070.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1066.1-1068.23 + ;; 6-typing.watsup:1072.1-1074.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1070.1-1073.27 + ;; 6-typing.watsup:1076.1-1079.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1075.1-1078.24 + ;; 6-typing.watsup:1081.1-1084.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1080.1-1082.24 + ;; 6-typing.watsup:1086.1-1088.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1093.1-1096.43 + ;; 6-typing.watsup:1099.1-1102.43 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1098.1-1101.35 + ;; 6-typing.watsup:1104.1-1107.35 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1112.1-1115.43 + ;; 6-typing.watsup:1118.1-1121.43 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1117.1-1120.35 + ;; 6-typing.watsup:1123.1-1126.35 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1122.1-1125.46 + ;; 6-typing.watsup:1128.1-1131.46 rule `vload-val`{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1127.1-1130.39 + ;; 6-typing.watsup:1133.1-1136.39 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1132.1-1135.35 + ;; 6-typing.watsup:1138.1-1141.35 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1137.1-1140.35 + ;; 6-typing.watsup:1143.1-1146.35 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1142.1-1146.21 + ;; 6-typing.watsup:1148.1-1152.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1148.1-1151.46 + ;; 6-typing.watsup:1154.1-1157.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1153.1-1157.21 + ;; 6-typing.watsup:1159.1-1163.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = mt) @@ -21807,13 +22647,13 @@ relation Export_ok: `%|-%:%%`(context, export, name, externtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1358.1-1358.100 +;; 6-typing.watsup:1364.1-1364.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1402.1-1403.17 + ;; 6-typing.watsup:1408.1-1409.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1405.1-1408.54 + ;; 6-typing.watsup:1411.1-1414.54 rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) -- Global_ok: `%|-%:%`(C, global_1, gt_1) @@ -21823,13 +22663,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1357.1-1357.98 +;; 6-typing.watsup:1363.1-1363.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1394.1-1395.17 + ;; 6-typing.watsup:1400.1-1401.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1397.1-1400.49 + ;; 6-typing.watsup:1403.1-1406.49 rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) @@ -22266,15 +23106,19 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) ;; 8-reduction.watsup - rule `vtestop-true`{c : vec_(V128_Vnn), Jnn : Jnn, M : M, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(1))]) - -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)) - -- (if (ci_1 =/= `%`_lane_(0)))*{ci_1 <- `ci_1*`} + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if c <- $vternop_(sh, vternop, c_1, c_2, c_3) ;; 8-reduction.watsup - rule `vtestop-false`{c : vec_(V128_Vnn), Jnn : Jnn, M : M}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(0))]) - -- otherwise + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; 8-reduction.watsup + rule vtestop{c_1 : vec_(V128_Vnn), sh : shape, vtestop : vtestop_(sh), i : nat}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(sh, vtestop)], [CONST_instr(I32_numtype, `%`_num_(i))]) + -- if ($vtestop_(sh, vtestop, c_1) = `%`_u32(i)) ;; 8-reduction.watsup rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: @@ -22294,11 +23138,18 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($ibits_(32, ci) = `%`_bit($ilt_($lsize((Jnn : Jnn <: lanetype)), S_sx, ci_1, `%`_iN(0))!`%`_u32.0)*{ci_1 <- `ci_1*`}) ;; 8-reduction.watsup - rule vswizzle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Pnn : Pnn, M : M, c : vec_(V128_Vnn), `c'*` : iN($lsize((Pnn : Pnn <: lanetype)))*, `ci*` : lane_($lanetype(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M))))*, `k*` : nat*}: - `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLE_instr(`%X%`_ishape((Pnn : Pnn <: Jnn), `%`_dim(M)))], [VCONST_instr(V128_vectype, c)]) - -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_2)) - -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) - -- if (c = $invlanes_(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), RELAXED_SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- if (ci*{ci <- `ci*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_2)) + -- if (c'*{c' <- `c'*`} = $lanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c_1) ++ `%`_iN(0)^(256 - M){}) + -- if (c = $invlanes_(`%X%`_shape(I8_lanetype, `%`_dim(M)), c'*{c' <- `c'*`}[ci*{ci <- `ci*`}[k]!`%`_lane_.0]^(k%`(instr*, instr*) `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + ;; 8-reduction.watsup + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + ;; 8-reduction.watsup rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Jnn_2 : Jnn, M_2 : M, Jnn_1 : Jnn, M_1 : M, sx : sx, c : vec_(V128_Vnn), `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}: `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(`%X%`_ishape(Jnn_2, `%`_dim(M_2)), `%X%`_ishape(Jnn_1, `%`_dim(M_1)), sx)], [VCONST_instr(V128_vectype, c)]) @@ -22993,89 +23849,89 @@ relation Step: `%~>%`(config, config) `%~>%`(`%;%`_config(z, [REF.ARRAY_ADDR_instr(a) CONST_instr(I32_numtype, `%`_num_(i)) (val : val <: instr) ARRAY.SET_instr(x)]), `%;%`_config($with_array(z, a, i, $packfield_(zt, val)), [])) -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 8-reduction.watsup:806.1-807.56 + ;; 8-reduction.watsup:823.1-824.56 rule local.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) LOCAL.SET_instr(x)]), `%;%`_config($with_local(z, x, val), [])) - ;; 8-reduction.watsup:819.1-820.58 + ;; 8-reduction.watsup:836.1-837.58 rule global.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) GLOBAL.SET_instr(x)]), `%;%`_config($with_global(z, x, val), [])) - ;; 8-reduction.watsup:833.1-835.33 + ;; 8-reduction.watsup:850.1-852.33 rule `table.set-oob`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config(z, [TRAP_instr])) -- if (i >= |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:837.1-839.32 + ;; 8-reduction.watsup:854.1-856.32 rule `table.set-val`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config($with_table(z, x, i, ref), [])) -- if (i < |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:847.1-850.46 + ;; 8-reduction.watsup:864.1-867.46 rule `table.grow-succeed`{z : state, ref : ref, n : n, x : idx, ti : tableinst}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr(I32_numtype, `%`_num_(|$table(z, x).REFS_tableinst|))])) -- if (ti = !($growtable($table(z, x), n, ref))) - ;; 8-reduction.watsup:852.1-853.81 + ;; 8-reduction.watsup:869.1-870.81 rule `table.grow-fail`{z : state, ref : ref, n : n, x : idx}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:913.1-914.51 + ;; 8-reduction.watsup:930.1-931.51 rule elem.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [ELEM.DROP_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) - ;; 8-reduction.watsup:997.1-1000.60 + ;; 8-reduction.watsup:1014.1-1017.60 rule `store-num-oob`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($size(nt) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1002.1-1006.29 + ;; 8-reduction.watsup:1019.1-1023.29 rule `store-num-val`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($size(nt) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $nbytes_(nt, c)) - ;; 8-reduction.watsup:1008.1-1011.52 + ;; 8-reduction.watsup:1025.1-1028.52 rule `store-pack-oob`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + (n / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1013.1-1017.52 + ;; 8-reduction.watsup:1030.1-1034.52 rule `store-pack-val`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (n / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : Inn <: numtype)), n, c))) - ;; 8-reduction.watsup:1019.1-1021.63 + ;; 8-reduction.watsup:1036.1-1038.63 rule `vstore-oob`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($vsize(V128_vectype) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1023.1-1025.31 + ;; 8-reduction.watsup:1040.1-1042.31 rule `vstore-val`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($vsize(V128_vectype) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) - ;; 8-reduction.watsup:1028.1-1030.50 + ;; 8-reduction.watsup:1045.1-1047.50 rule `vstore_lane-oob`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + N) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1032.1-1036.49 + ;; 8-reduction.watsup:1049.1-1053.49 rule `vstore_lane-val`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat, `b*` : byte*, Jnn : Jnn, M : M}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (N / 8), b*{b <- `b*`}), [])) -- if (N = $lsize((Jnn : Jnn <: lanetype))) -- if (M = (128 / N)) -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)[j]!`%`_lane_.0))) - ;; 8-reduction.watsup:1044.1-1047.37 + ;; 8-reduction.watsup:1061.1-1064.37 rule `memory.grow-succeed`{z : state, n : n, x : idx, mi : meminst}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr(I32_numtype, `%`_num_((|$mem(z, x).BYTES_meminst| / (64 * $Ki))))])) -- if (mi = !($growmem($mem(z, x), n))) - ;; 8-reduction.watsup:1049.1-1050.78 + ;; 8-reduction.watsup:1066.1-1067.78 rule `memory.grow-fail`{z : state, n : n, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:1110.1-1111.51 + ;; 8-reduction.watsup:1127.1-1128.51 rule data.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [DATA.DROP_instr(x)]), `%;%`_config($with_data(z, x, []), [])) } @@ -23725,7 +24581,7 @@ grammar Blaneidx : laneidx ;; A-binary.watsup rec { -;; A-binary.watsup:971.1-981.66 +;; A-binary.watsup:992.1-1006.73 grammar Binstr : instr ;; A-binary.watsup:214.5-214.24 prod 0x00 => UNREACHABLE_instr @@ -24255,430 +25111,462 @@ grammar Binstr : instr prod{`b*` : byte*} {0xFD `%`_u32(12):Bu32 b:Bbyte^16{b <- `b*`}} => VCONST_instr(V128_vectype, $invibytes_(128, b^16{b <- `b*`})) ;; A-binary.watsup:625.5-625.58 prod{l : labelidx} {0xFD `%`_u32(13):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx^16{}} => VSHUFFLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), [`%`_uN(l!`%`_labelidx.0)]) - ;; A-binary.watsup:626.5-626.40 - prod {0xFD `%`_u32(14):Bu32} => VSWIZZLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:630.5-630.38 - prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) + ;; A-binary.watsup:626.5-626.49 + prod {0xFD `%`_u32(14):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SWIZZLE_vswizzlop_) + ;; A-binary.watsup:627.5-627.58 + prod {0xFD `%`_u32(256):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), RELAXED_SWIZZLE_vswizzlop_) ;; A-binary.watsup:631.5-631.38 - prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) + prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) ;; A-binary.watsup:632.5-632.38 - prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) ;; A-binary.watsup:633.5-633.38 - prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) + prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) ;; A-binary.watsup:634.5-634.38 - prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) ;; A-binary.watsup:635.5-635.38 + prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + ;; A-binary.watsup:636.5-636.38 prod {0xFD `%`_u32(20):Bu32} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2))) - ;; A-binary.watsup:639.5-639.60 - prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:640.5-640.60 + prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:641.5-641.60 prod{l : labelidx} {0xFD `%`_u32(22):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:641.5-641.58 + ;; A-binary.watsup:642.5-642.58 prod{l : labelidx} {0xFD `%`_u32(23):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:642.5-642.60 - prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:643.5-643.60 + prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:644.5-644.60 prod{l : labelidx} {0xFD `%`_u32(25):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:644.5-644.58 - prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:645.5-645.58 - prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:646.5-646.58 - prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:647.5-647.58 - prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:648.5-648.58 - prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:649.5-649.58 - prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:650.5-650.58 - prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:651.5-651.58 - prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:652.5-652.58 + prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:653.5-653.58 prod{l : labelidx} {0xFD `%`_u32(34):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:656.5-656.41 - prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) ;; A-binary.watsup:657.5-657.41 + prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) + ;; A-binary.watsup:658.5-658.41 prod {0xFD `%`_u32(36):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NE_vrelop_) - ;; A-binary.watsup:658.5-658.45 - prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:659.5-659.45 - prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:660.5-660.45 - prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) ;; A-binary.watsup:661.5-661.45 - prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) ;; A-binary.watsup:662.5-662.45 - prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) ;; A-binary.watsup:663.5-663.45 - prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) ;; A-binary.watsup:664.5-664.45 - prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) ;; A-binary.watsup:665.5-665.45 + prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:666.5-666.45 prod {0xFD `%`_u32(44):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:669.5-669.41 - prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) ;; A-binary.watsup:670.5-670.41 + prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) + ;; A-binary.watsup:671.5-671.41 prod {0xFD `%`_u32(46):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NE_vrelop_) - ;; A-binary.watsup:671.5-671.45 - prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:672.5-672.45 - prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:673.5-673.45 - prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) ;; A-binary.watsup:674.5-674.45 - prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) ;; A-binary.watsup:675.5-675.45 - prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) ;; A-binary.watsup:676.5-676.45 - prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) ;; A-binary.watsup:677.5-677.45 - prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) ;; A-binary.watsup:678.5-678.45 + prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:679.5-679.45 prod {0xFD `%`_u32(54):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:682.5-682.41 - prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:683.5-683.41 + prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) + ;; A-binary.watsup:684.5-684.41 prod {0xFD `%`_u32(56):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NE_vrelop_) - ;; A-binary.watsup:684.5-684.45 - prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:685.5-685.45 - prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:686.5-686.45 - prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) ;; A-binary.watsup:687.5-687.45 - prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) ;; A-binary.watsup:688.5-688.45 - prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) ;; A-binary.watsup:689.5-689.45 - prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) ;; A-binary.watsup:690.5-690.45 - prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) ;; A-binary.watsup:691.5-691.45 + prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:692.5-692.45 prod {0xFD `%`_u32(64):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:695.5-695.41 - prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:696.5-696.41 - prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) + prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:697.5-697.41 - prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) + prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) ;; A-binary.watsup:698.5-698.41 - prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) + prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) ;; A-binary.watsup:699.5-699.41 - prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) ;; A-binary.watsup:700.5-700.41 + prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + ;; A-binary.watsup:701.5-701.41 prod {0xFD `%`_u32(70):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GE_vrelop_) - ;; A-binary.watsup:704.5-704.41 - prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:705.5-705.41 - prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) + prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:706.5-706.41 - prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) + prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) ;; A-binary.watsup:707.5-707.41 - prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) + prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) ;; A-binary.watsup:708.5-708.41 - prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) ;; A-binary.watsup:709.5-709.41 + prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + ;; A-binary.watsup:710.5-710.41 prod {0xFD `%`_u32(76):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GE_vrelop_) - ;; A-binary.watsup:713.5-713.36 + ;; A-binary.watsup:714.5-714.36 prod {0xFD `%`_u32(77):Bu32} => VVUNOP_instr(V128_vectype, NOT_vvunop) - ;; A-binary.watsup:717.5-717.37 + ;; A-binary.watsup:718.5-718.37 prod {0xFD `%`_u32(78):Bu32} => VVBINOP_instr(V128_vectype, AND_vvbinop) - ;; A-binary.watsup:718.5-718.40 + ;; A-binary.watsup:719.5-719.40 prod {0xFD `%`_u32(79):Bu32} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) - ;; A-binary.watsup:719.5-719.36 + ;; A-binary.watsup:720.5-720.36 prod {0xFD `%`_u32(80):Bu32} => VVBINOP_instr(V128_vectype, OR_vvbinop) - ;; A-binary.watsup:720.5-720.37 + ;; A-binary.watsup:721.5-721.37 prod {0xFD `%`_u32(81):Bu32} => VVBINOP_instr(V128_vectype, XOR_vvbinop) - ;; A-binary.watsup:724.5-724.44 + ;; A-binary.watsup:725.5-725.44 prod {0xFD `%`_u32(82):Bu32} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) - ;; A-binary.watsup:728.5-728.43 + ;; A-binary.watsup:729.5-729.43 prod {0xFD `%`_u32(83):Bu32} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) - ;; A-binary.watsup:732.5-732.41 - prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) ;; A-binary.watsup:733.5-733.41 + prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) + ;; A-binary.watsup:734.5-734.41 prod {0xFD `%`_u32(97):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NEG_vunop_) - ;; A-binary.watsup:734.5-734.44 + ;; A-binary.watsup:735.5-735.44 prod {0xFD `%`_u32(98):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), POPCNT_vunop_) - ;; A-binary.watsup:738.5-738.48 + ;; A-binary.watsup:739.5-739.48 prod {0xFD `%`_u32(99):Bu32} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:742.5-742.41 + ;; A-binary.watsup:743.5-743.41 prod {0xFD `%`_u32(100):Bu32} => VBITMASK_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:746.5-746.53 - prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) ;; A-binary.watsup:747.5-747.53 + prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) + ;; A-binary.watsup:748.5-748.53 prod {0xFD `%`_u32(102):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), U_sx) - ;; A-binary.watsup:751.5-751.45 + ;; A-binary.watsup:752.5-752.45 prod {0xFD `%`_u32(107):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHL_vshiftop_) - ;; A-binary.watsup:752.5-752.49 - prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) ;; A-binary.watsup:753.5-753.49 + prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) + ;; A-binary.watsup:754.5-754.49 prod {0xFD `%`_u32(109):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:757.5-757.43 + ;; A-binary.watsup:758.5-758.43 prod {0xFD `%`_u32(110):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_vbinop_) - ;; A-binary.watsup:758.5-758.51 - prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) ;; A-binary.watsup:759.5-759.51 + prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:760.5-760.51 prod {0xFD `%`_u32(112):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:760.5-760.43 + ;; A-binary.watsup:761.5-761.43 prod {0xFD `%`_u32(113):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_vbinop_) - ;; A-binary.watsup:761.5-761.51 - prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) ;; A-binary.watsup:762.5-762.51 + prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:763.5-763.51 prod {0xFD `%`_u32(115):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:763.5-763.47 - prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:764.5-764.47 - prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) + prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:765.5-765.47 - prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) ;; A-binary.watsup:766.5-766.47 + prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + ;; A-binary.watsup:767.5-767.47 prod {0xFD `%`_u32(121):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:767.5-767.48 + ;; A-binary.watsup:768.5-768.48 prod {0xFD `%`_u32(123):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `AVGRU`_vbinop_) - ;; A-binary.watsup:771.5-771.72 - prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) ;; A-binary.watsup:772.5-772.72 + prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; A-binary.watsup:773.5-773.72 prod {0xFD `%`_u32(125):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:776.5-776.42 - prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) ;; A-binary.watsup:777.5-777.42 + prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) + ;; A-binary.watsup:778.5-778.42 prod {0xFD `%`_u32(129):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NEG_vunop_) - ;; A-binary.watsup:781.5-781.55 + ;; A-binary.watsup:782.5-782.55 prod {0xFD `%`_u32(130):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `Q15MULR_SATS`_vbinop_) - ;; A-binary.watsup:785.5-785.49 + ;; A-binary.watsup:783.5-783.59 + prod {0xFD `%`_u32(273):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `RELAXED_Q15MULRS`_vbinop_) + ;; A-binary.watsup:787.5-787.49 prod {0xFD `%`_u32(131):Bu32} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:789.5-789.41 + ;; A-binary.watsup:791.5-791.41 prod {0xFD `%`_u32(132):Bu32} => VBITMASK_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8))) - ;; A-binary.watsup:793.5-793.53 + ;; A-binary.watsup:795.5-795.53 prod {0xFD `%`_u32(133):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), S_sx) - ;; A-binary.watsup:794.5-794.53 + ;; A-binary.watsup:796.5-796.53 prod {0xFD `%`_u32(134):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), U_sx) - ;; A-binary.watsup:798.5-798.65 + ;; A-binary.watsup:800.5-800.65 prod {0xFD `%`_u32(135):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:799.5-799.66 + ;; A-binary.watsup:801.5-801.66 prod {0xFD `%`_u32(136):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:800.5-800.65 + ;; A-binary.watsup:802.5-802.65 prod {0xFD `%`_u32(137):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:801.5-801.66 + ;; A-binary.watsup:803.5-803.66 prod {0xFD `%`_u32(138):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:805.5-805.45 + ;; A-binary.watsup:807.5-807.45 prod {0xFD `%`_u32(139):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHL_vshiftop_) - ;; A-binary.watsup:806.5-806.49 + ;; A-binary.watsup:808.5-808.49 prod {0xFD `%`_u32(140):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:807.5-807.49 + ;; A-binary.watsup:809.5-809.49 prod {0xFD `%`_u32(141):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:811.5-811.43 + ;; A-binary.watsup:813.5-813.43 prod {0xFD `%`_u32(142):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_vbinop_) - ;; A-binary.watsup:812.5-812.51 + ;; A-binary.watsup:814.5-814.51 prod {0xFD `%`_u32(143):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:813.5-813.51 + ;; A-binary.watsup:815.5-815.51 prod {0xFD `%`_u32(144):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:814.5-814.43 + ;; A-binary.watsup:816.5-816.43 prod {0xFD `%`_u32(145):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_vbinop_) - ;; A-binary.watsup:815.5-815.51 + ;; A-binary.watsup:817.5-817.51 prod {0xFD `%`_u32(146):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:816.5-816.51 + ;; A-binary.watsup:818.5-818.51 prod {0xFD `%`_u32(147):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:817.5-817.43 + ;; A-binary.watsup:819.5-819.43 prod {0xFD `%`_u32(149):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MUL_vbinop_) - ;; A-binary.watsup:818.5-818.47 + ;; A-binary.watsup:820.5-820.47 prod {0xFD `%`_u32(150):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:819.5-819.47 + ;; A-binary.watsup:821.5-821.47 prod {0xFD `%`_u32(151):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:820.5-820.47 + ;; A-binary.watsup:822.5-822.47 prod {0xFD `%`_u32(152):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:821.5-821.47 + ;; A-binary.watsup:823.5-823.47 prod {0xFD `%`_u32(153):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:822.5-822.48 + ;; A-binary.watsup:824.5-824.48 prod {0xFD `%`_u32(155):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `AVGRU`_vbinop_) - ;; A-binary.watsup:826.5-826.68 + ;; A-binary.watsup:828.5-828.68 prod {0xFD `%`_u32(156):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:827.5-827.69 + ;; A-binary.watsup:829.5-829.69 prod {0xFD `%`_u32(157):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:828.5-828.68 + ;; A-binary.watsup:830.5-830.68 prod {0xFD `%`_u32(158):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:829.5-829.69 + ;; A-binary.watsup:831.5-831.69 prod {0xFD `%`_u32(159):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:833.5-833.72 + ;; A-binary.watsup:832.5-832.69 + prod {0xFD `%`_u32(274):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), `RELAXED_DOTS`_vextbinop__) + ;; A-binary.watsup:836.5-836.72 prod {0xFD `%`_u32(126):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; A-binary.watsup:834.5-834.72 + ;; A-binary.watsup:837.5-837.72 prod {0xFD `%`_u32(127):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:838.5-838.42 + ;; A-binary.watsup:841.5-841.42 prod {0xFD `%`_u32(160):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:839.5-839.42 + ;; A-binary.watsup:842.5-842.42 prod {0xFD `%`_u32(161):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:843.5-843.49 + ;; A-binary.watsup:846.5-846.49 prod {0xFD `%`_u32(163):Bu32} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:847.5-847.41 + ;; A-binary.watsup:850.5-850.41 prod {0xFD `%`_u32(164):Bu32} => VBITMASK_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4))) - ;; A-binary.watsup:851.5-851.65 + ;; A-binary.watsup:854.5-854.65 prod {0xFD `%`_u32(167):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:852.5-852.66 + ;; A-binary.watsup:855.5-855.66 prod {0xFD `%`_u32(168):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:853.5-853.65 + ;; A-binary.watsup:856.5-856.65 prod {0xFD `%`_u32(169):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:854.5-854.66 + ;; A-binary.watsup:857.5-857.66 prod {0xFD `%`_u32(170):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:858.5-858.45 + ;; A-binary.watsup:861.5-861.45 prod {0xFD `%`_u32(171):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHL_vshiftop_) - ;; A-binary.watsup:859.5-859.49 + ;; A-binary.watsup:862.5-862.49 prod {0xFD `%`_u32(172):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:860.5-860.49 + ;; A-binary.watsup:863.5-863.49 prod {0xFD `%`_u32(173):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:864.5-864.43 + ;; A-binary.watsup:867.5-867.43 prod {0xFD `%`_u32(174):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:865.5-865.43 + ;; A-binary.watsup:868.5-868.43 prod {0xFD `%`_u32(177):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:866.5-866.43 + ;; A-binary.watsup:869.5-869.43 prod {0xFD `%`_u32(181):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:867.5-867.47 + ;; A-binary.watsup:870.5-870.47 prod {0xFD `%`_u32(182):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:868.5-868.47 + ;; A-binary.watsup:871.5-871.47 prod {0xFD `%`_u32(183):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:869.5-869.47 + ;; A-binary.watsup:872.5-872.47 prod {0xFD `%`_u32(184):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:870.5-870.47 + ;; A-binary.watsup:873.5-873.47 prod {0xFD `%`_u32(185):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:874.5-874.61 + ;; A-binary.watsup:877.5-877.61 prod {0xFD `%`_u32(186):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `DOTS`_vextbinop__) - ;; A-binary.watsup:875.5-875.68 + ;; A-binary.watsup:878.5-878.68 prod {0xFD `%`_u32(188):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:876.5-876.69 + ;; A-binary.watsup:879.5-879.69 prod {0xFD `%`_u32(189):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:877.5-877.68 + ;; A-binary.watsup:880.5-880.68 prod {0xFD `%`_u32(190):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:878.5-878.69 + ;; A-binary.watsup:881.5-881.69 prod {0xFD `%`_u32(191):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:882.5-882.42 + ;; A-binary.watsup:885.5-885.74 + prod {0xFD `%`_u32(275):Bu32} => VEXTTERNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `RELAXED_DOT_ADDS`_vextternop__) + ;; A-binary.watsup:889.5-889.42 prod {0xFD `%`_u32(192):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:883.5-883.42 + ;; A-binary.watsup:890.5-890.42 prod {0xFD `%`_u32(193):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:887.5-887.49 + ;; A-binary.watsup:894.5-894.49 prod {0xFD `%`_u32(195):Bu32} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:891.5-891.41 + ;; A-binary.watsup:898.5-898.41 prod {0xFD `%`_u32(196):Bu32} => VBITMASK_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2))) - ;; A-binary.watsup:895.5-895.65 + ;; A-binary.watsup:902.5-902.65 prod {0xFD `%`_u32(199):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:896.5-896.66 + ;; A-binary.watsup:903.5-903.66 prod {0xFD `%`_u32(200):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:897.5-897.65 + ;; A-binary.watsup:904.5-904.65 prod {0xFD `%`_u32(201):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:898.5-898.66 + ;; A-binary.watsup:905.5-905.66 prod {0xFD `%`_u32(202):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:902.5-902.45 + ;; A-binary.watsup:909.5-909.45 prod {0xFD `%`_u32(203):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHL_vshiftop_) - ;; A-binary.watsup:903.5-903.49 + ;; A-binary.watsup:910.5-910.49 prod {0xFD `%`_u32(204):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:904.5-904.49 + ;; A-binary.watsup:911.5-911.49 prod {0xFD `%`_u32(205):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:908.5-908.43 + ;; A-binary.watsup:915.5-915.43 prod {0xFD `%`_u32(206):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:909.5-909.43 + ;; A-binary.watsup:916.5-916.43 prod {0xFD `%`_u32(209):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:910.5-910.43 + ;; A-binary.watsup:917.5-917.43 prod {0xFD `%`_u32(213):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:914.5-914.42 + ;; A-binary.watsup:921.5-921.42 prod {0xFD `%`_u32(214):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), EQ_vrelop_) - ;; A-binary.watsup:915.5-915.42 + ;; A-binary.watsup:922.5-922.42 prod {0xFD `%`_u32(215):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NE_vrelop_) - ;; A-binary.watsup:916.5-916.46 + ;; A-binary.watsup:923.5-923.46 prod {0xFD `%`_u32(216):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LT_vrelop_(S_sx)) - ;; A-binary.watsup:917.5-917.46 + ;; A-binary.watsup:924.5-924.46 prod {0xFD `%`_u32(217):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GT_vrelop_(S_sx)) - ;; A-binary.watsup:918.5-918.46 + ;; A-binary.watsup:925.5-925.46 prod {0xFD `%`_u32(218):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LE_vrelop_(S_sx)) - ;; A-binary.watsup:919.5-919.46 + ;; A-binary.watsup:926.5-926.46 prod {0xFD `%`_u32(219):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GE_vrelop_(S_sx)) - ;; A-binary.watsup:923.5-923.68 + ;; A-binary.watsup:930.5-930.68 prod {0xFD `%`_u32(220):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:924.5-924.69 + ;; A-binary.watsup:931.5-931.69 prod {0xFD `%`_u32(221):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:925.5-925.68 + ;; A-binary.watsup:932.5-932.68 prod {0xFD `%`_u32(222):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:926.5-926.69 + ;; A-binary.watsup:933.5-933.69 prod {0xFD `%`_u32(223):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:930.5-930.43 + ;; A-binary.watsup:937.5-937.43 prod {0xFD `%`_u32(103):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), CEIL_vunop_) - ;; A-binary.watsup:931.5-931.44 + ;; A-binary.watsup:938.5-938.44 prod {0xFD `%`_u32(104):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), FLOOR_vunop_) - ;; A-binary.watsup:932.5-932.44 + ;; A-binary.watsup:939.5-939.44 prod {0xFD `%`_u32(105):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_vunop_) - ;; A-binary.watsup:933.5-933.46 + ;; A-binary.watsup:940.5-940.46 prod {0xFD `%`_u32(106):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEAREST_vunop_) - ;; A-binary.watsup:934.5-934.42 + ;; A-binary.watsup:941.5-941.42 prod {0xFD `%`_u32(224):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:935.5-935.42 + ;; A-binary.watsup:942.5-942.42 prod {0xFD `%`_u32(225):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:936.5-936.43 + ;; A-binary.watsup:943.5-943.43 prod {0xFD `%`_u32(227):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SQRT_vunop_) - ;; A-binary.watsup:940.5-940.43 + ;; A-binary.watsup:947.5-947.43 prod {0xFD `%`_u32(228):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:941.5-941.43 + ;; A-binary.watsup:948.5-948.43 prod {0xFD `%`_u32(229):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:942.5-942.43 + ;; A-binary.watsup:949.5-949.43 prod {0xFD `%`_u32(230):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:943.5-943.43 + ;; A-binary.watsup:950.5-950.43 prod {0xFD `%`_u32(231):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), DIV_vbinop_) - ;; A-binary.watsup:944.5-944.43 + ;; A-binary.watsup:951.5-951.43 prod {0xFD `%`_u32(232):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MIN_vbinop_) - ;; A-binary.watsup:945.5-945.43 + ;; A-binary.watsup:952.5-952.43 prod {0xFD `%`_u32(233):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MAX_vbinop_) - ;; A-binary.watsup:946.5-946.44 + ;; A-binary.watsup:953.5-953.44 prod {0xFD `%`_u32(234):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMIN_vbinop_) - ;; A-binary.watsup:947.5-947.44 + ;; A-binary.watsup:954.5-954.44 prod {0xFD `%`_u32(235):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMAX_vbinop_) - ;; A-binary.watsup:951.5-951.43 + ;; A-binary.watsup:955.5-955.51 + prod {0xFD `%`_u32(269):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:956.5-956.51 + prod {0xFD `%`_u32(270):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:960.5-960.53 + prod {0xFD `%`_u32(261):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:961.5-961.54 + prod {0xFD `%`_u32(262):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:965.5-965.43 prod {0xFD `%`_u32(116):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), CEIL_vunop_) - ;; A-binary.watsup:952.5-952.44 + ;; A-binary.watsup:966.5-966.44 prod {0xFD `%`_u32(117):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), FLOOR_vunop_) - ;; A-binary.watsup:953.5-953.44 + ;; A-binary.watsup:967.5-967.44 prod {0xFD `%`_u32(122):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_vunop_) - ;; A-binary.watsup:954.5-954.46 + ;; A-binary.watsup:968.5-968.46 prod {0xFD `%`_u32(148):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEAREST_vunop_) - ;; A-binary.watsup:955.5-955.42 + ;; A-binary.watsup:969.5-969.42 prod {0xFD `%`_u32(236):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:956.5-956.42 + ;; A-binary.watsup:970.5-970.42 prod {0xFD `%`_u32(237):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:957.5-957.43 + ;; A-binary.watsup:971.5-971.43 prod {0xFD `%`_u32(239):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SQRT_vunop_) - ;; A-binary.watsup:961.5-961.43 + ;; A-binary.watsup:975.5-975.43 prod {0xFD `%`_u32(240):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:962.5-962.43 + ;; A-binary.watsup:976.5-976.43 prod {0xFD `%`_u32(241):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:963.5-963.43 + ;; A-binary.watsup:977.5-977.43 prod {0xFD `%`_u32(242):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:964.5-964.43 + ;; A-binary.watsup:978.5-978.43 prod {0xFD `%`_u32(243):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), DIV_vbinop_) - ;; A-binary.watsup:965.5-965.43 + ;; A-binary.watsup:979.5-979.43 prod {0xFD `%`_u32(244):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MIN_vbinop_) - ;; A-binary.watsup:966.5-966.43 + ;; A-binary.watsup:980.5-980.43 prod {0xFD `%`_u32(245):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MAX_vbinop_) - ;; A-binary.watsup:967.5-967.44 + ;; A-binary.watsup:981.5-981.44 prod {0xFD `%`_u32(246):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMIN_vbinop_) - ;; A-binary.watsup:968.5-968.44 + ;; A-binary.watsup:982.5-982.44 prod {0xFD `%`_u32(247):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMAX_vbinop_) - ;; A-binary.watsup:972.5-972.61 + ;; A-binary.watsup:983.5-983.51 + prod {0xFD `%`_u32(271):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:984.5-984.51 + prod {0xFD `%`_u32(272):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:988.5-988.53 + prod {0xFD `%`_u32(263):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:989.5-989.54 + prod {0xFD `%`_u32(264):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:993.5-993.61 prod {0xFD `%`_u32(94):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), DEMOTE_vcvtop__, ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:973.5-973.61 + ;; A-binary.watsup:994.5-994.61 prod {0xFD `%`_u32(95):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(F32_lanetype, `%`_dim(4)), PROMOTE_vcvtop__, ?(LOW_half__), ?()) - ;; A-binary.watsup:974.5-974.64 + ;; A-binary.watsup:995.5-995.64 prod {0xFD `%`_u32(248):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:975.5-975.64 + ;; A-binary.watsup:996.5-996.64 prod {0xFD `%`_u32(249):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:976.5-976.62 + ;; A-binary.watsup:997.5-997.62 prod {0xFD `%`_u32(250):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:977.5-977.62 + ;; A-binary.watsup:998.5-998.62 prod {0xFD `%`_u32(251):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:978.5-978.69 + ;; A-binary.watsup:999.5-999.69 prod {0xFD `%`_u32(252):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:979.5-979.69 + ;; A-binary.watsup:1000.5-1000.69 prod {0xFD `%`_u32(253):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:980.5-980.66 + ;; A-binary.watsup:1001.5-1001.66 prod {0xFD `%`_u32(254):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:981.5-981.66 + ;; A-binary.watsup:1002.5-1002.66 prod {0xFD `%`_u32(255):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(LOW_half__), ?()) + ;; A-binary.watsup:1003.5-1003.68 + prod {0xFD `%`_u32(257):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?()) + ;; A-binary.watsup:1004.5-1004.68 + prod {0xFD `%`_u32(258):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?()) + ;; A-binary.watsup:1005.5-1005.73 + prod {0xFD `%`_u32(259):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) + ;; A-binary.watsup:1006.5-1006.73 + prod {0xFD `%`_u32(260):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) } ;; A-binary.watsup @@ -25082,6 +25970,17 @@ def $sum(nat*) : nat def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) } +;; 0-aux.watsup +rec { + +;; 0-aux.watsup:37.1-37.57 +def $prod(nat*) : nat + ;; 0-aux.watsup:38.1-38.19 + def $prod([]) = 1 + ;; 0-aux.watsup:39.1-39.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + ;; 0-aux.watsup def $opt_(syntax X, X*) : X? ;; 0-aux.watsup @@ -25099,47 +25998,47 @@ def $list_(syntax X, X?) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:49.1-49.55 +;; 0-aux.watsup:53.1-53.55 def $concat_(syntax X, X**) : X* - ;; 0-aux.watsup:50.1-50.34 + ;; 0-aux.watsup:54.1-54.34 def $concat_{syntax X}(syntax X, []) = [] - ;; 0-aux.watsup:51.1-51.64 + ;; 0-aux.watsup:55.1-55.64 def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:53.1-53.61 +;; 0-aux.watsup:57.1-57.61 def $concatn_(syntax X, X**, nat : nat) : X* - ;; 0-aux.watsup:54.1-54.38 + ;; 0-aux.watsup:58.1-58.38 def $concatn_{syntax X, n : n}(syntax X, [], n) = [] - ;; 0-aux.watsup:55.1-55.73 + ;; 0-aux.watsup:59.1-59.73 def $concatn_{syntax X, `w*` : X*, n : n, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:57.1-57.78 +;; 0-aux.watsup:61.1-61.78 def $disjoint_(syntax X, X*) : bool - ;; 0-aux.watsup:58.1-58.37 + ;; 0-aux.watsup:62.1-62.37 def $disjoint_{syntax X}(syntax X, []) = true - ;; 0-aux.watsup:59.1-59.68 + ;; 0-aux.watsup:63.1-63.68 def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ w <- w'*{w' <- `w'*`} /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:62.1-62.38 +;; 0-aux.watsup:66.1-66.38 def $setminus1_(syntax X, X : X, X*) : X* - ;; 0-aux.watsup:66.1-66.38 + ;; 0-aux.watsup:70.1-70.38 def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] - ;; 0-aux.watsup:67.1-67.78 + ;; 0-aux.watsup:71.1-71.78 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = [] -- if (w = w_1) - ;; 0-aux.watsup:68.1-68.77 + ;; 0-aux.watsup:72.1-72.77 def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = $setminus1_(syntax X, w, w'*{w' <- `w'*`}) -- otherwise } @@ -25147,47 +26046,50 @@ def $setminus1_(syntax X, X : X, X*) : X* ;; 0-aux.watsup rec { -;; 0-aux.watsup:61.1-61.56 +;; 0-aux.watsup:65.1-65.56 def $setminus_(syntax X, X*, X*) : X* - ;; 0-aux.watsup:64.1-64.40 + ;; 0-aux.watsup:68.1-68.40 def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] - ;; 0-aux.watsup:65.1-65.90 + ;; 0-aux.watsup:69.1-69.90 def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:73.1-73.46 +;; 0-aux.watsup:77.1-77.46 def $setproduct2_(syntax X, X : X, X**) : X** - ;; 0-aux.watsup:79.1-79.44 + ;; 0-aux.watsup:83.1-83.44 def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] - ;; 0-aux.watsup:80.1-80.90 + ;; 0-aux.watsup:84.1-84.90 def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:72.1-72.47 +;; 0-aux.watsup:76.1-76.47 def $setproduct1_(syntax X, X*, X**) : X** - ;; 0-aux.watsup:77.1-77.46 + ;; 0-aux.watsup:81.1-81.46 def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] - ;; 0-aux.watsup:78.1-78.107 + ;; 0-aux.watsup:82.1-82.107 def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) } ;; 0-aux.watsup rec { -;; 0-aux.watsup:71.1-71.82 +;; 0-aux.watsup:75.1-75.82 def $setproduct_(syntax X, X**) : X** - ;; 0-aux.watsup:75.1-75.40 + ;; 0-aux.watsup:79.1-79.40 def $setproduct_{syntax X}(syntax X, []) = [[]] - ;; 0-aux.watsup:76.1-76.90 + ;; 0-aux.watsup:80.1-80.90 def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) } +;; 1-syntax.watsup +def $ND : bool + ;; 1-syntax.watsup syntax list{syntax X}(syntax X) = | `%`{`X*` : X*}(X*{X <- `X*`} : X*) @@ -25314,7 +26216,7 @@ def $cont(byte : byte) : nat ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:87.1-87.25 +;; 1-syntax.watsup:94.1-94.25 def $utf8(char*) : byte* ;; A-binary.watsup:53.1-53.44 def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8([ch])*{ch <- `ch*`}) @@ -25438,13 +26340,13 @@ syntax fin = ;; 1-syntax.watsup rec { -;; 1-syntax.watsup:155.1-156.26 +;; 1-syntax.watsup:162.1-163.26 syntax typeuse = | _IDX{typeidx : typeidx}(typeidx : typeidx) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) | REC{n : n}(n : n) -;; 1-syntax.watsup:158.1-159.26 +;; 1-syntax.watsup:165.1-166.26 syntax heaptype = | ANY | EQ @@ -25463,7 +26365,7 @@ syntax heaptype = | REC{n : n}(n : n) | DEF{rectype : rectype, n : n}(rectype : rectype, n : n) -;; 1-syntax.watsup:166.1-167.14 +;; 1-syntax.watsup:173.1-174.14 syntax valtype = | I32 | I64 @@ -25473,10 +26375,10 @@ syntax valtype = | REF{nul : nul, heaptype : heaptype}(nul : nul, heaptype : heaptype) | BOT -;; 1-syntax.watsup:196.1-197.16 +;; 1-syntax.watsup:203.1-204.16 syntax resulttype = list(syntax valtype) -;; 1-syntax.watsup:204.1-204.66 +;; 1-syntax.watsup:211.1-211.66 syntax storagetype = | BOT | I32 @@ -25488,31 +26390,31 @@ syntax storagetype = | I8 | I16 -;; 1-syntax.watsup:220.1-220.60 +;; 1-syntax.watsup:227.1-227.60 syntax fieldtype = | `%%`{mut : mut, storagetype : storagetype}(mut : mut, storagetype : storagetype) -;; 1-syntax.watsup:222.1-222.90 +;; 1-syntax.watsup:229.1-229.90 syntax functype = | `%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; 1-syntax.watsup:223.1-223.64 +;; 1-syntax.watsup:230.1-230.64 syntax structtype = list(syntax fieldtype) -;; 1-syntax.watsup:224.1-224.54 +;; 1-syntax.watsup:231.1-231.54 syntax arraytype = fieldtype -;; 1-syntax.watsup:226.1-229.18 +;; 1-syntax.watsup:233.1-236.18 syntax comptype = | STRUCT{structtype : structtype}(structtype : structtype) | ARRAY{arraytype : arraytype}(arraytype : arraytype) | FUNC{functype : functype}(functype : functype) -;; 1-syntax.watsup:231.1-232.30 +;; 1-syntax.watsup:238.1-239.30 syntax subtype = | SUB{fin : fin, `typeuse*` : typeuse*, comptype : comptype}(fin : fin, typeuse*{typeuse <- `typeuse*`} : typeuse*, comptype : comptype) -;; 1-syntax.watsup:234.1-235.22 +;; 1-syntax.watsup:241.1-242.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -25962,6 +26864,26 @@ def $shsize(shape : shape) : nat ;; 2-syntax-aux.watsup def $shsize{Lnn : Lnn, N : N}(`%X%`_shape(Lnn, `%`_dim(N))) = ($lsize(Lnn) * N) +;; 1-syntax.watsup +syntax half__(shape_1 : shape, shape_2 : shape) + ;; 1-syntax.watsup + syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = + | LOW + | HIGH + -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) + + + ;; 1-syntax.watsup + syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = + | LOW + -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) + + +;; 1-syntax.watsup +syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = + | ZERO + -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) + ;; 1-syntax.watsup syntax vvunop = | NOT @@ -26018,6 +26940,8 @@ syntax vbinop_(shape : shape) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) | `Q15MULR_SATS` -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | `RELAXED_Q15MULRS` + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) | MIN{sx : sx}(sx : sx) -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) | MAX{sx : sx}(sx : sx) @@ -26034,6 +26958,21 @@ syntax vbinop_(shape : shape) | MAX | PMIN | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; 1-syntax.watsup +syntax vternop_(shape : shape) + ;; 1-syntax.watsup + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))) = + | RELAXED_LANESELECT + + + ;; 1-syntax.watsup + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))) = + | RELAXED_MADD + | RELAXED_NMADD ;; 1-syntax.watsup @@ -26084,6 +27023,8 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = | TRUNC_SAT{sx : sx}(sx : sx) -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_TRUNC{sx : sx}(sx : sx) + -- if (($sizenn1((Fnn_1 : Fnn <: numtype)) >= $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup @@ -26095,24 +27036,9 @@ syntax vcvtop__(shape_1 : shape, shape_2 : shape) ;; 1-syntax.watsup -syntax half__(shape_1 : shape, shape_2 : shape) - ;; 1-syntax.watsup - syntax half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))) = - | LOW - | HIGH - -- if ((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn1((Jnn_2 : Jnn <: lanetype))) - - - ;; 1-syntax.watsup - syntax half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))) = - | LOW - -- if (((2 * $lsizenn1(Lnn_1)) = $sizenn1((Fnn_2 : Fnn <: numtype))) /\ ($sizenn1((Fnn_2 : Fnn <: numtype)) = 64)) - - -;; 1-syntax.watsup -syntax zero__{Fnn_1 : Fnn, M_1 : M, Lnn_2 : Lnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape(Lnn_2, `%`_dim(M_2))) = - | ZERO - -- if (((2 * $lsizenn2(Lnn_2)) = $sizenn1((Fnn_1 : Fnn <: numtype))) /\ ($sizenn1((Fnn_1 : Fnn <: numtype)) = 64)) +syntax vswizzlop_{M : M}(`%X%`_ishape(I8_Jnn, `%`_dim(M))) = + | SWIZZLE + | RELAXED_SWIZZLE ;; 1-syntax.watsup syntax vshiftop_{Jnn : Jnn, M : M}(`%X%`_ishape(Jnn, `%`_dim(M))) = @@ -26130,6 +27056,13 @@ syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_ -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) | `DOTS` -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | `RELAXED_DOTS` + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; 1-syntax.watsup +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2))) = + | `RELAXED_DOT_ADDS` + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) ;; 1-syntax.watsup syntax memarg = @@ -26304,20 +27237,20 @@ syntax instr = | VVTESTOP{vectype : vectype, vvtestop : vvtestop}(vectype : vectype, vvtestop : vvtestop) | VUNOP{shape : shape, vunop_ : vunop_(shape)}(shape : shape, vunop_ : vunop_(shape)) | VBINOP{shape : shape, vbinop_ : vbinop_(shape)}(shape : shape, vbinop_ : vbinop_(shape)) + | VTERNOP{shape : shape, vternop_ : vternop_(shape)}(shape : shape, vternop_ : vternop_(shape)) | VTESTOP{shape : shape, vtestop_ : vtestop_(shape)}(shape : shape, vtestop_ : vtestop_(shape)) | VRELOP{shape : shape, vrelop_ : vrelop_(shape)}(shape : shape, vrelop_ : vrelop_(shape)) | VSHIFTOP{ishape : ishape, vshiftop_ : vshiftop_(ishape)}(ishape : ishape, vshiftop_ : vshiftop_(ishape)) | VBITMASK{ishape : ishape}(ishape : ishape) - | VSWIZZLE{ishape : ishape}(ishape : ishape) - -- if (ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) + | VSWIZZLOP{ishape : ishape, vswizzlop_ : vswizzlop_(ishape)}(ishape : ishape, vswizzlop_ : vswizzlop_(ishape)) | VSHUFFLE{ishape : ishape, `laneidx*` : laneidx*}(ishape : ishape, laneidx*{laneidx <- `laneidx*`} : laneidx*) -- if ((ishape = `%X%`_ishape(I8_Jnn, `%`_dim(16))) /\ (|laneidx*{laneidx <- `laneidx*`}| = 16)) | VEXTUNOP{ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_2, ishape_1)) | VEXTBINOP{ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP{ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)}(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_2, ishape_1)) | VNARROW{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(ishape_1 : ishape, ishape_2 : ishape, sx : sx) -- if (($lsize($lanetype((ishape_2 : ishape <: shape))) = (2 * $lsize($lanetype((ishape_1 : ishape <: shape))))) /\ ((2 * $lsize($lanetype((ishape_1 : ishape <: shape)))) <= 32)) | VCVTOP{shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), `half__?` : half__(shape_2, shape_1)?, `zero__?` : zero__(shape_2, shape_1)?}(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_2, shape_1), half__?{half__ <- `half__?`} : half__(shape_2, shape_1)?, zero__?{zero__ <- `zero__?`} : zero__(shape_2, shape_1)?) - -- if ($lanetype(shape_1) =/= $lanetype(shape_2)) | VSPLAT{shape : shape}(shape : shape) | VEXTRACT_LANE{shape : shape, `sx?` : sx?, laneidx : laneidx, numtype : numtype}(shape : shape, sx?{sx <- `sx?`} : sx?, laneidx : laneidx) -- if ((sx?{sx <- `sx?`} = ?()) <=> ($lanetype(shape) = (numtype : numtype <: lanetype))) @@ -26825,13 +27758,13 @@ def $free_shape(shape : shape) : free ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:443.1-443.44 +;; 2-syntax-aux.watsup:444.1-444.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; 2-syntax-aux.watsup:444.1-444.32 + ;; 2-syntax-aux.watsup:445.1-445.32 def $shift_labelidxs([]) = [] - ;; 2-syntax-aux.watsup:445.1-445.66 + ;; 2-syntax-aux.watsup:446.1-446.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_uN(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; 2-syntax-aux.watsup:446.1-446.91 + ;; 2-syntax-aux.watsup:447.1-447.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_uN((labelidx!`%`_labelidx.0 - 1))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } @@ -26840,7 +27773,7 @@ rec { ;; 2-syntax-aux.watsup:299.1-299.31 def $free_block(instr*) : free - ;; 2-syntax-aux.watsup:449.1-450.47 + ;; 2-syntax-aux.watsup:450.1-451.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) @@ -26915,134 +27848,136 @@ def $free_instr(instr : instr) : free ;; 2-syntax-aux.watsup:347.1-347.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) ;; 2-syntax-aux.watsup:348.1-348.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; 2-syntax-aux.watsup:349.1-349.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:349.1-349.58 + ;; 2-syntax-aux.watsup:350.1-350.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:350.1-350.64 + ;; 2-syntax-aux.watsup:351.1-351.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:351.1-351.55 - def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) ;; 2-syntax-aux.watsup:352.1-352.55 - def $free_instr{ishape : ishape}(VSWIZZLE_instr(ishape)) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:353.1-353.64 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:353.1-353.66 + def $free_instr{ishape : ishape, vswizzlop : vswizzlop_(ishape)}(VSWIZZLOP_instr(ishape, vswizzlop)) = $free_shape((ishape : ishape <: shape)) + ;; 2-syntax-aux.watsup:354.1-354.64 def $free_instr{ishape : ishape, `laneidx*` : laneidx*}(VSHUFFLE_instr(ishape, laneidx*{laneidx <- `laneidx*`})) = $free_shape((ishape : ishape <: shape)) - ;; 2-syntax-aux.watsup:354.1-355.49 + ;; 2-syntax-aux.watsup:355.1-356.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:356.1-357.49 + ;; 2-syntax-aux.watsup:357.1-358.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:358.1-359.49 + ;; 2-syntax-aux.watsup:359.1-360.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape((ishape_1 : ishape <: shape)) +++ $free_shape((ishape_2 : ishape <: shape)) - ;; 2-syntax-aux.watsup:360.1-361.47 + ;; 2-syntax-aux.watsup:361.1-362.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1), `half?` : half__(shape_2, shape_1)?, `zero?` : zero__(shape_2, shape_1)?}(VCVTOP_instr(shape_1, shape_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`})) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; 2-syntax-aux.watsup:362.1-362.51 + ;; 2-syntax-aux.watsup:363.1-363.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:363.1-363.70 + ;; 2-syntax-aux.watsup:364.1-364.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:364.1-364.66 + ;; 2-syntax-aux.watsup:365.1-365.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; 2-syntax-aux.watsup:366.1-366.62 + ;; 2-syntax-aux.watsup:367.1-367.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; 2-syntax-aux.watsup:367.1-367.34 + ;; 2-syntax-aux.watsup:368.1-368.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:368.1-368.38 + ;; 2-syntax-aux.watsup:369.1-369.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:369.1-369.29 + ;; 2-syntax-aux.watsup:370.1-370.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:370.1-370.59 - def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:371.1-371.59 - def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; 2-syntax-aux.watsup:372.1-372.59 + def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + ;; 2-syntax-aux.watsup:373.1-373.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; 2-syntax-aux.watsup:373.1-373.30 + ;; 2-syntax-aux.watsup:374.1-374.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:375.1-375.33 + ;; 2-syntax-aux.watsup:376.1-376.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:377.1-377.41 + ;; 2-syntax-aux.watsup:378.1-378.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:378.1-378.69 - def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) ;; 2-syntax-aux.watsup:379.1-379.69 + def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) + ;; 2-syntax-aux.watsup:380.1-380.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:380.1-380.65 + ;; 2-syntax-aux.watsup:381.1-381.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:382.1-382.60 + ;; 2-syntax-aux.watsup:383.1-383.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:383.1-383.68 + ;; 2-syntax-aux.watsup:384.1-384.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:384.1-384.70 + ;; 2-syntax-aux.watsup:385.1-385.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:385.1-386.51 + ;; 2-syntax-aux.watsup:386.1-387.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:387.1-388.51 + ;; 2-syntax-aux.watsup:388.1-389.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:389.1-389.64 + ;; 2-syntax-aux.watsup:390.1-390.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:390.1-390.60 + ;; 2-syntax-aux.watsup:391.1-391.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:391.1-391.32 + ;; 2-syntax-aux.watsup:392.1-392.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:392.1-392.61 + ;; 2-syntax-aux.watsup:393.1-393.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; 2-syntax-aux.watsup:393.1-394.55 + ;; 2-syntax-aux.watsup:394.1-395.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; 2-syntax-aux.watsup:395.1-396.51 + ;; 2-syntax-aux.watsup:396.1-397.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:397.1-398.51 + ;; 2-syntax-aux.watsup:398.1-399.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:400.1-400.41 - def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} ;; 2-syntax-aux.watsup:401.1-401.41 + def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} + ;; 2-syntax-aux.watsup:402.1-402.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; 2-syntax-aux.watsup:403.1-403.63 - def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:404.1-404.63 - def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; 2-syntax-aux.watsup:405.1-405.63 + def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + ;; 2-syntax-aux.watsup:406.1-406.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; 2-syntax-aux.watsup:407.1-407.67 - def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) ;; 2-syntax-aux.watsup:408.1-408.67 + def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) + ;; 2-syntax-aux.watsup:409.1-409.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; 2-syntax-aux.watsup:410.1-410.63 - def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:411.1-411.63 + def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:412.1-412.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:412.1-412.64 - def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:413.1-413.64 - def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; 2-syntax-aux.watsup:414.1-414.64 + def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + ;; 2-syntax-aux.watsup:415.1-415.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; 2-syntax-aux.watsup:415.1-416.59 + ;; 2-syntax-aux.watsup:416.1-417.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; 2-syntax-aux.watsup:417.1-418.53 + ;; 2-syntax-aux.watsup:418.1-419.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:419.1-419.60 + ;; 2-syntax-aux.watsup:420.1-420.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; 2-syntax-aux.watsup:421.1-422.49 + ;; 2-syntax-aux.watsup:422.1-423.49 def $free_instr{numtype : numtype, loadop : loadop_(numtype), memidx : memidx, memarg : memarg}(LOAD_instr(numtype, ?(loadop), memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:423.1-424.49 + ;; 2-syntax-aux.watsup:424.1-425.49 def $free_instr{numtype : numtype, `sz?` : sz?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, sz?{sz <- `sz?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:425.1-426.49 + ;; 2-syntax-aux.watsup:426.1-427.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:427.1-428.49 + ;; 2-syntax-aux.watsup:428.1-429.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:429.1-430.49 + ;; 2-syntax-aux.watsup:430.1-431.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:431.1-432.49 + ;; 2-syntax-aux.watsup:432.1-433.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; 2-syntax-aux.watsup:433.1-433.59 - def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:434.1-434.59 - def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; 2-syntax-aux.watsup:435.1-435.59 + def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + ;; 2-syntax-aux.watsup:436.1-436.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; 2-syntax-aux.watsup:436.1-437.51 + ;; 2-syntax-aux.watsup:437.1-438.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; 2-syntax-aux.watsup:438.1-439.49 + ;; 2-syntax-aux.watsup:439.1-440.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; 2-syntax-aux.watsup:440.1-440.60 + ;; 2-syntax-aux.watsup:441.1-441.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) } @@ -27145,14 +28080,14 @@ def $dataidx_funcs(func*) : dataidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:532.1-532.112 +;; 2-syntax-aux.watsup:533.1-533.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:559.1-559.38 + ;; 2-syntax-aux.watsup:560.1-560.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; 2-syntax-aux.watsup:560.1-560.95 + ;; 2-syntax-aux.watsup:561.1-561.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; 2-syntax-aux.watsup:561.1-561.92 + ;; 2-syntax-aux.watsup:562.1-562.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -27175,78 +28110,78 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:533.1-533.112 +;; 2-syntax-aux.watsup:534.1-534.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; 2-syntax-aux.watsup:563.1-563.66 + ;; 2-syntax-aux.watsup:564.1-564.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; 2-syntax-aux.watsup:564.1-564.64 + ;; 2-syntax-aux.watsup:565.1-565.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; 2-syntax-aux.watsup:537.1-537.112 +;; 2-syntax-aux.watsup:538.1-538.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; 2-syntax-aux.watsup:569.1-569.67 + ;; 2-syntax-aux.watsup:570.1-570.67 def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) - ;; 2-syntax-aux.watsup:570.1-570.65 + ;; 2-syntax-aux.watsup:571.1-571.65 def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) - ;; 2-syntax-aux.watsup:571.1-571.53 + ;; 2-syntax-aux.watsup:572.1-572.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; 2-syntax-aux.watsup:538.1-538.112 +;; 2-syntax-aux.watsup:539.1-539.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; 2-syntax-aux.watsup:573.1-573.83 + ;; 2-syntax-aux.watsup:574.1-574.83 def $subst_reftype{nul : nul, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(nul, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(nul, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:539.1-539.112 +;; 2-syntax-aux.watsup:540.1-540.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; 2-syntax-aux.watsup:575.1-575.64 - def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:576.1-576.64 - def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) ;; 2-syntax-aux.watsup:577.1-577.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; 2-syntax-aux.watsup:578.1-578.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; 2-syntax-aux.watsup:578.1-578.40 + ;; 2-syntax-aux.watsup:579.1-579.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; 2-syntax-aux.watsup:542.1-542.112 +;; 2-syntax-aux.watsup:543.1-543.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; 2-syntax-aux.watsup:582.1-582.66 + ;; 2-syntax-aux.watsup:583.1-583.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; 2-syntax-aux.watsup:583.1-583.69 + ;; 2-syntax-aux.watsup:584.1-584.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; 2-syntax-aux.watsup:543.1-543.112 +;; 2-syntax-aux.watsup:544.1-544.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; 2-syntax-aux.watsup:585.1-585.80 + ;; 2-syntax-aux.watsup:586.1-586.80 def $subst_fieldtype{mut : mut, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:545.1-545.112 +;; 2-syntax-aux.watsup:546.1-546.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; 2-syntax-aux.watsup:587.1-587.85 + ;; 2-syntax-aux.watsup:588.1-588.85 def $subst_comptype{`yt*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_structtype(yt*{yt <- `yt*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_structtype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{yt <- `yt*`})) - ;; 2-syntax-aux.watsup:588.1-588.81 + ;; 2-syntax-aux.watsup:589.1-589.81 def $subst_comptype{yt : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(yt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(yt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; 2-syntax-aux.watsup:589.1-589.78 + ;; 2-syntax-aux.watsup:590.1-590.78 def $subst_comptype{ft : functype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_comptype($subst_functype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:546.1-546.112 +;; 2-syntax-aux.watsup:547.1-547.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; 2-syntax-aux.watsup:591.1-592.71 + ;; 2-syntax-aux.watsup:592.1-593.71 def $subst_subtype{fin : fin, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(fin, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(fin, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; 2-syntax-aux.watsup:547.1-547.112 +;; 2-syntax-aux.watsup:548.1-548.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; 2-syntax-aux.watsup:594.1-594.76 + ;; 2-syntax-aux.watsup:595.1-595.76 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{st <- `st*`})) -;; 2-syntax-aux.watsup:548.1-548.112 +;; 2-syntax-aux.watsup:549.1-549.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; 2-syntax-aux.watsup:596.1-596.78 + ;; 2-syntax-aux.watsup:597.1-597.78 def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) -;; 2-syntax-aux.watsup:551.1-551.112 +;; 2-syntax-aux.watsup:552.1-552.112 def $subst_functype(functype : functype, typevar*, typeuse*) : functype - ;; 2-syntax-aux.watsup:599.1-599.113 + ;; 2-syntax-aux.watsup:600.1-600.113 def $subst_functype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_functype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_functype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`}), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`})) } @@ -27319,11 +28254,11 @@ def $subst_all_moduletype(moduletype : moduletype, heaptype*) : moduletype ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:627.1-627.98 +;; 2-syntax-aux.watsup:628.1-628.98 def $subst_all_deftypes(deftype*, heaptype*) : deftype* - ;; 2-syntax-aux.watsup:628.1-628.40 + ;; 2-syntax-aux.watsup:629.1-629.40 def $subst_all_deftypes{`tu*` : typeuse*}([], (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [] - ;; 2-syntax-aux.watsup:629.1-629.101 + ;; 2-syntax-aux.watsup:630.1-630.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, (tu : typeuse <: heaptype)*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, (tu : typeuse <: heaptype)*{tu <- `tu*`}) } @@ -27367,13 +28302,13 @@ relation Expand: `%~~%`(deftype, comptype) ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:661.1-661.86 +;; 2-syntax-aux.watsup:662.1-662.86 def $funcsxx(externidx*) : typeidx* - ;; 2-syntax-aux.watsup:667.1-667.24 + ;; 2-syntax-aux.watsup:668.1-668.24 def $funcsxx([]) = [] - ;; 2-syntax-aux.watsup:668.1-668.45 + ;; 2-syntax-aux.watsup:669.1-669.45 def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:669.1-669.58 + ;; 2-syntax-aux.watsup:670.1-670.58 def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -27381,13 +28316,13 @@ def $funcsxx(externidx*) : typeidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:662.1-662.88 +;; 2-syntax-aux.watsup:663.1-663.88 def $globalsxx(externidx*) : globalidx* - ;; 2-syntax-aux.watsup:671.1-671.26 + ;; 2-syntax-aux.watsup:672.1-672.26 def $globalsxx([]) = [] - ;; 2-syntax-aux.watsup:672.1-672.51 + ;; 2-syntax-aux.watsup:673.1-673.51 def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:673.1-673.62 + ;; 2-syntax-aux.watsup:674.1-674.62 def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -27395,13 +28330,13 @@ def $globalsxx(externidx*) : globalidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:663.1-663.87 +;; 2-syntax-aux.watsup:664.1-664.87 def $tablesxx(externidx*) : tableidx* - ;; 2-syntax-aux.watsup:675.1-675.25 + ;; 2-syntax-aux.watsup:676.1-676.25 def $tablesxx([]) = [] - ;; 2-syntax-aux.watsup:676.1-676.48 + ;; 2-syntax-aux.watsup:677.1-677.48 def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:677.1-677.60 + ;; 2-syntax-aux.watsup:678.1-678.60 def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) -- otherwise } @@ -27409,13 +28344,13 @@ def $tablesxx(externidx*) : tableidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:664.1-664.85 +;; 2-syntax-aux.watsup:665.1-665.85 def $memsxx(externidx*) : memidx* - ;; 2-syntax-aux.watsup:679.1-679.23 + ;; 2-syntax-aux.watsup:680.1-680.23 def $memsxx([]) = [] - ;; 2-syntax-aux.watsup:680.1-680.42 + ;; 2-syntax-aux.watsup:681.1-681.42 def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:681.1-681.56 + ;; 2-syntax-aux.watsup:682.1-682.56 def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -27423,13 +28358,13 @@ def $memsxx(externidx*) : memidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:665.1-665.85 +;; 2-syntax-aux.watsup:666.1-666.85 def $tagsxx(externidx*) : tagidx* - ;; 2-syntax-aux.watsup:683.1-683.23 + ;; 2-syntax-aux.watsup:684.1-684.23 def $tagsxx([]) = [] - ;; 2-syntax-aux.watsup:684.1-684.42 + ;; 2-syntax-aux.watsup:685.1-685.42 def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) - ;; 2-syntax-aux.watsup:685.1-685.56 + ;; 2-syntax-aux.watsup:686.1-686.56 def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) -- otherwise } @@ -27437,13 +28372,13 @@ def $tagsxx(externidx*) : tagidx* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:688.1-688.88 +;; 2-syntax-aux.watsup:689.1-689.88 def $funcsxt(externtype*) : deftype* - ;; 2-syntax-aux.watsup:694.1-694.24 + ;; 2-syntax-aux.watsup:695.1-695.24 def $funcsxt([]) = [] - ;; 2-syntax-aux.watsup:695.1-695.47 + ;; 2-syntax-aux.watsup:696.1-696.47 def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:696.1-696.59 + ;; 2-syntax-aux.watsup:697.1-697.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -27451,13 +28386,13 @@ def $funcsxt(externtype*) : deftype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:689.1-689.90 +;; 2-syntax-aux.watsup:690.1-690.90 def $globalsxt(externtype*) : globaltype* - ;; 2-syntax-aux.watsup:698.1-698.26 + ;; 2-syntax-aux.watsup:699.1-699.26 def $globalsxt([]) = [] - ;; 2-syntax-aux.watsup:699.1-699.53 + ;; 2-syntax-aux.watsup:700.1-700.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:700.1-700.63 + ;; 2-syntax-aux.watsup:701.1-701.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -27465,13 +28400,13 @@ def $globalsxt(externtype*) : globaltype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:690.1-690.89 +;; 2-syntax-aux.watsup:691.1-691.89 def $tablesxt(externtype*) : tabletype* - ;; 2-syntax-aux.watsup:702.1-702.25 + ;; 2-syntax-aux.watsup:703.1-703.25 def $tablesxt([]) = [] - ;; 2-syntax-aux.watsup:703.1-703.50 + ;; 2-syntax-aux.watsup:704.1-704.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:704.1-704.61 + ;; 2-syntax-aux.watsup:705.1-705.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -27479,13 +28414,13 @@ def $tablesxt(externtype*) : tabletype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:691.1-691.87 +;; 2-syntax-aux.watsup:692.1-692.87 def $memsxt(externtype*) : memtype* - ;; 2-syntax-aux.watsup:706.1-706.23 + ;; 2-syntax-aux.watsup:707.1-707.23 def $memsxt([]) = [] - ;; 2-syntax-aux.watsup:707.1-707.44 + ;; 2-syntax-aux.watsup:708.1-708.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:708.1-708.57 + ;; 2-syntax-aux.watsup:709.1-709.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -27493,13 +28428,13 @@ def $memsxt(externtype*) : memtype* ;; 2-syntax-aux.watsup rec { -;; 2-syntax-aux.watsup:692.1-692.87 +;; 2-syntax-aux.watsup:693.1-693.87 def $tagsxt(externtype*) : tagtype* - ;; 2-syntax-aux.watsup:710.1-710.23 + ;; 2-syntax-aux.watsup:711.1-711.23 def $tagsxt([]) = [] - ;; 2-syntax-aux.watsup:711.1-711.44 + ;; 2-syntax-aux.watsup:712.1-712.44 def $tagsxt{at : tagtype, `xt*` : externtype*}([TAG_externtype((at : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [at] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; 2-syntax-aux.watsup:712.1-712.57 + ;; 2-syntax-aux.watsup:713.1-713.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -27510,213 +28445,233 @@ def $memarg0 : memarg def $memarg0 = {ALIGN `%`_u32(0), OFFSET `%`_u32(0)} ;; 3-numerics.watsup -def $s33_to_u32(s33 : s33) : u32 +syntax relaxed2 = + | `%`{i : nat}(i : nat) + -- if ((i = 0) \/ (i = 1)) ;; 3-numerics.watsup -def $signed_(N : N, nat : nat) : int +syntax relaxed4 = + | `%`{i : nat}(i : nat) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; 3-numerics.watsup +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) - -- if (0 <= (2 ^ (N - 1))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][i] + -- if $ND ;; 3-numerics.watsup - def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) - -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) + def $relaxed2{i : nat, syntax X, X_1 : X, X_2 : X}(`%`_relaxed2(i), syntax X, X_1, X_2) = [X_1 X_2][0] + -- otherwise ;; 3-numerics.watsup -def $invsigned_(N : N, int : int) : nat +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X ;; 3-numerics.watsup - def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j - -- if ($signed_(N, j) = (i : nat <: int)) + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][i] + -- if $ND + ;; 3-numerics.watsup + def $relaxed4{i : nat, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(`%`_relaxed4(i), syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][0] + -- otherwise ;; 3-numerics.watsup -def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $R_fmadd : relaxed2 ;; 3-numerics.watsup -def $fabs_(N : N, fN : fN(N)) : fN(N)* +def $R_fmin : relaxed4 ;; 3-numerics.watsup -def $fceil_(N : N, fN : fN(N)) : fN(N)* +def $R_fmax : relaxed4 ;; 3-numerics.watsup -def $ffloor_(N : N, fN : fN(N)) : fN(N)* +def $R_idot : relaxed2 ;; 3-numerics.watsup -def $fnearest_(N : N, fN : fN(N)) : fN(N)* +def $R_iq15mulr : relaxed2 ;; 3-numerics.watsup -def $fneg_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_u : relaxed4 ;; 3-numerics.watsup -def $fsqrt_(N : N, fN : fN(N)) : fN(N)* +def $R_trunc_s : relaxed2 ;; 3-numerics.watsup -def $ftrunc_(N : N, fN : fN(N)) : fN(N)* +def $R_swizzle : relaxed2 ;; 3-numerics.watsup -def $iclz_(N : N, iN : iN(N)) : iN(N) +def $R_laneselect : relaxed2 ;; 3-numerics.watsup -def $ictz_(N : N, iN : iN(N)) : iN(N) +def $s33_to_u32(s33 : s33) : u32 ;; 3-numerics.watsup -def $ipopcnt_(N : N, iN : iN(N)) : iN(N) +def $signed_(N : N, nat : nat) : int + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = (i : nat <: int) + -- if (0 <= (2 ^ (N - 1))) + ;; 3-numerics.watsup + def $signed_{N : N, i : nat}(N, i) = ((i - (2 ^ N)) : nat <: int) + -- if (((2 ^ (N - 1)) <= i) /\ (i < (2 ^ N))) ;; 3-numerics.watsup -def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) +def $invsigned_(N : N, int : int) : nat + ;; 3-numerics.watsup + def $invsigned_{N : N, i : nat, j : nat}(N, (i : nat <: int)) = j + -- if ($signed_(N, j) = (i : nat <: int)) ;; 3-numerics.watsup -def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] +def $sat_u_(N : N, nat : nat) : nat ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] - ;; 3-numerics.watsup - def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) - ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = 0 + -- if (i < 0) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = ((2 ^ N) - 1) + -- if (i > ((2 ^ N) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_u_{N : N, i : nat}(N, i) = i + -- otherwise + +;; 3-numerics.watsup +def $sat_s_(N : N, int : int) : int ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = - ((2 ^ (N - 1)) : nat <: int) + -- if ((i : nat <: int) < - ((2 ^ (N - 1)) : nat <: int)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (((2 ^ (N - 1)) - 1) : nat <: int) + -- if (i > ((2 ^ (N - 1)) - 1)) ;; 3-numerics.watsup - def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + def $sat_s_{N : N, i : nat}(N, (i : nat <: int)) = (i : nat <: int) + -- otherwise ;; 3-numerics.watsup -def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $wrap__(M : M, N : N, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $extend__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $relaxed_trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? ;; 3-numerics.watsup -def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* ;; 3-numerics.watsup -def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) ;; 3-numerics.watsup -def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) ;; 3-numerics.watsup -def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) ;; 3-numerics.watsup -def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $ibits_(N : N, iN : iN(N)) : bit* ;; 3-numerics.watsup -def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbits_(N : N, fN : fN(N)) : bit* ;; 3-numerics.watsup -def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? +def $ibytes_(N : N, iN : iN(N)) : byte* ;; 3-numerics.watsup -def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fbytes_(N : N, fN : fN(N)) : byte* ;; 3-numerics.watsup -def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* ;; 3-numerics.watsup -def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* ;; 3-numerics.watsup -def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; 3-numerics.watsup +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; 3-numerics.watsup +def $invibytes_(N : N, byte*) : iN(N) + ;; 3-numerics.watsup + def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) + -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) + +;; 3-numerics.watsup +def $invfbytes_(N : N, byte*) : fN(N) + ;; 3-numerics.watsup + def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p + -- if ($fbytes_(N, p) = b*{b <- `b*`}) + +;; 3-numerics.watsup +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +;; 3-numerics.watsup +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + +;; 3-numerics.watsup +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + +;; 3-numerics.watsup +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; 3-numerics.watsup +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; 3-numerics.watsup def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $ishl_(N : N, iN : iN(N), u32 : u32) : iN(N) ;; 3-numerics.watsup -def $ieqz_(N : N, iN : iN(N)) : u32 +def $ishr_(N : N, sx : sx, iN : iN(N), u32 : u32) : iN(N) ;; 3-numerics.watsup -def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $iclz_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ictz_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $ieqz_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup -def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 +def $inez_(N : N, iN : iN(N)) : u32 ;; 3-numerics.watsup def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + +;; 3-numerics.watsup +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 @@ -27725,156 +28680,118 @@ def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 ;; 3-numerics.watsup -def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(I32_numtype) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) - ;; 3-numerics.watsup - def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $convert__(M : M, N : N, sx : sx, iN : iN(M)) : fN(N) +def $iabs_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $demote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $ineg_(N : N, iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $promote__(M : M, N : N, fN : fN(M)) : fN(N)* +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $trunc_sat__(M : M, N : N, sx : sx, fN : fN(M)) : iN(N)? +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) - ;; 3-numerics.watsup - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] - -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) - ;; 3-numerics.watsup - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] - -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $narrow__(M : M, N : N, sx : sx, iN : iN(M)) : iN(N) +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) ;; 3-numerics.watsup -def $ibits_(N : N, iN : iN(N)) : bit* +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* ;; 3-numerics.watsup -def $fbits_(N : N, fN : fN(N)) : bit* +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibytes_(N : N, iN : iN(N)) : byte* +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $fbytes_(N : N, fN : fN(N)) : byte* +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invibytes_(N : N, byte*) : iN(N) - ;; 3-numerics.watsup - def $invibytes_{N : N, `b*` : byte*, n : n}(N, b*{b <- `b*`}) = `%`_iN(n) - -- if ($ibytes_(N, `%`_iN(n)) = b*{b <- `b*`}) +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $invfbytes_(N : N, byte*) : fN(N) - ;; 3-numerics.watsup - def $invfbytes_{N : N, `b*` : byte*, p : fN(N)}(N, b*{b <- `b*`}) = p - -- if ($fbytes_(N, p) = b*{b <- `b*`}) +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $inot_(N : N, iN : iN(N)) : iN(N) +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) +def $fabs_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iabs_(N : N, iN : iN(N)) : iN(N) +def $fneg_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $ineg_(N : N, iN : iN(N)) : iN(N) +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fceil_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ffloor_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fnearest_(N : N, fN : fN(N)) : fN(N)* ;; 3-numerics.watsup -def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 ;; 3-numerics.watsup -def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; 3-numerics.watsup +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; 3-numerics.watsup +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* ;; 3-numerics.watsup def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) @@ -27886,41 +28803,162 @@ def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lan ;; 3-numerics.watsup def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) ;; 3-numerics.watsup - def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + ;; 3-numerics.watsup + def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; 3-numerics.watsup +def $cpacknum_(storagetype : storagetype, lit_ : lit_((!($cunpack(storagetype)) : consttype <: storagetype))) : lit_(storagetype) + ;; 3-numerics.watsup + def $cpacknum_{consttype : consttype, c : lit_((!($cunpack((consttype : consttype <: storagetype))) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; 3-numerics.watsup + def $cpacknum_{packtype : packtype, c : lit_((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; 3-numerics.watsup +def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_((!($cunpack(storagetype)) : consttype <: storagetype)) + ;; 3-numerics.watsup + def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; 3-numerics.watsup + def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; 3-numerics.watsup +def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* + +;; 3-numerics.watsup +def $invlanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $invlanes_{sh : shape, `c*` : lane_($lanetype(sh))*, vc : vec_(V128_Vnn)}(sh, c*{c <- `c*`}) = vc + -- if (c*{c <- `c*`} = $lanes_(sh, vc)) + +;; 3-numerics.watsup +def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), nat : nat, nat : nat) : nat + ;; 3-numerics.watsup + def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + ;; 3-numerics.watsup + def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), HIGH_half__, i, j) = j + ;; 3-numerics.watsup + def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + +;; 3-numerics.watsup +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, iN) = [$iclz_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, iN) = [$ictz_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, iN) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), iN)] + ;; 3-numerics.watsup + def $unop_{Inn : Inn, M : M, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(M)), iN) = [$extend__(M, $sizenn((Inn : Inn <: numtype)), S_sx, $wrap__($sizenn((Inn : Inn <: numtype)), M, iN))] + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, fN) = $fabs_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, fN) = $fneg_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, fN) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, fN) = $fceil_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, fN) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, fN) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), fN) + ;; 3-numerics.watsup + def $unop_{Fnn : Fnn, fN : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, fN) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), fN) + +;; 3-numerics.watsup +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, iN_1, iN_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, iN_1, iN_2) = [$isub_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, iN_1, iN_2) = [$imul_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $idiv_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), iN_1, iN_2) = $list_(syntax num_((Inn : Inn <: numtype)), $irem_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2)) + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, iN_1, iN_2) = [$iand_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, iN_1, iN_2) = [$ior_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, iN_1, iN_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, iN_1, iN_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), iN_1, iN_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, iN_1, `%`_u32(iN_2!`%`_num_.0))] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, iN_1, iN_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, iN_1, iN_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2)] + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, fN_1, fN_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, fN_1, fN_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, fN_1, fN_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, fN_1, fN_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, fN_1, fN_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, fN_1, fN_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $binop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, fN_1, fN_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + +;; 3-numerics.watsup +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $testop_{Inn : Inn, iN : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, iN) = $ieqz_($sizenn((Inn : Inn <: numtype)), iN) + +;; 3-numerics.watsup +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, iN_1, iN_2) = $ieq_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, iN_1, iN_2) = $ine_($sizenn((Inn : Inn <: numtype)), iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), iN_1, iN_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), iN_1, iN_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), iN_1, iN_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Inn : Inn, sx : sx, iN_1 : num_((Inn : Inn <: numtype)), iN_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), iN_1, iN_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, iN_1, iN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, fN_1, fN_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, fN_1, fN_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) + ;; 3-numerics.watsup + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, fN_1, fN_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup - def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) - -;; 3-numerics.watsup -def $cpacknum_(storagetype : storagetype, lit_ : lit_((!($cunpack(storagetype)) : consttype <: storagetype))) : lit_(storagetype) + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, fN_1, fN_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup - def $cpacknum_{consttype : consttype, c : lit_((!($cunpack((consttype : consttype <: storagetype))) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, fN_1, fN_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup - def $cpacknum_{packtype : packtype, c : lit_((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + def $relop_{Fnn : Fnn, fN_1 : num_((Fnn : Fnn <: numtype)), fN_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, fN_1, fN_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), fN_1, fN_2) ;; 3-numerics.watsup -def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_((!($cunpack(storagetype)) : consttype <: storagetype)) +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* ;; 3-numerics.watsup - def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), iN_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, iN_1)] ;; 3-numerics.watsup - def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) - -;; 3-numerics.watsup -def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* - -;; 3-numerics.watsup -def $invlanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, iN_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), iN_1)] ;; 3-numerics.watsup - def $invlanes_{sh : shape, `c*` : lane_($lanetype(sh))*, vc : vec_(V128_Vnn)}(sh, c*{c <- `c*`}) = vc - -- if (c*{c <- `c*`} = $lanes_(sh, vc)) - -;; 3-numerics.watsup -def $half__(shape_1 : shape, shape_2 : shape, half__ : half__(shape_1, shape_2), nat : nat, nat : nat) : nat + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) ;; 3-numerics.watsup - def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), fN_1) = $list_(syntax num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, fN_1)) ;; 3-numerics.watsup - def $half__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, i : nat, j : nat}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), HIGH_half__, i, j) = j + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), iN_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, iN_1)] ;; 3-numerics.watsup - def $half__{Lnn_1 : Lnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, i : nat, j : nat}(`%X%`_shape(Lnn_1, `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), LOW_half__, i, j) = i + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, fN_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, fN_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), fN_1) + ;; 3-numerics.watsup + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, iN_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, iN_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), iN_1)] + -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; 3-numerics.watsup + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, fN_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, fN_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), fN_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) ;; 3-numerics.watsup def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* @@ -27959,12 +28997,6 @@ def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128 ;; 3-numerics.watsup def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) - ;; 3-numerics.watsup - def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fabs_, vN_1) ;; 3-numerics.watsup @@ -27979,6 +29011,12 @@ def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_ def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), TRUNC_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $ftrunc_, vN_1) ;; 3-numerics.watsup def $vunop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), NEAREST_vunop_, vN_1) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fnearest_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ABS_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iabs_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), NEG_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ineg_, vN_1) + ;; 3-numerics.watsup + def $vunop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), POPCNT_vunop_, vN_1) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $ipopcnt_, vN_1) ;; 3-numerics.watsup def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* @@ -28004,6 +29042,14 @@ def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) +;; 3-numerics.watsup +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, sx, vN_1, vN_2) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + ;; 3-numerics.watsup def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* ;; 3-numerics.watsup @@ -28025,6 +29071,8 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec ;; 3-numerics.watsup def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `Q15MULR_SATS`_vbinop_, vN_1, vN_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $iq15mulr_sat_, S_sx, vN_1, vN_2) ;; 3-numerics.watsup + def $vbinop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), `RELAXED_Q15MULRS`_vbinop_, vN_1, vN_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_q15mulr_, S_sx, vN_1, vN_2) + ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), ADD_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fadd_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), SUB_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fsub_, vN_1, vN_2) @@ -28040,6 +29088,49 @@ def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmin_, vN_1, vN_2) ;; 3-numerics.watsup def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), PMAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $fpmax_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MIN_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_min_, vN_1, vN_2) + ;; 3-numerics.watsup + def $vbinop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MAX_vbinop_, vN_1, vN_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_max_, vN_1, vN_2) + +;; 3-numerics.watsup +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn), `c**` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1, vN_2, vN_3) = $invlanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; 3-numerics.watsup +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; 3-numerics.watsup + def $vternop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), RELAXED_LANESELECT_vternop_, vN_1, vN_2, vN_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $irelaxed_laneselect_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_MADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_madd_, vN_1, vN_2, vN_3) + ;; 3-numerics.watsup + def $vternop_{Fnn : Fnn, M : M, vN_1 : vec_(V128_Vnn), vN_2 : vec_(V128_Vnn), vN_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), RELAXED_NMADD_vternop_, vN_1, vN_2, vN_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $frelaxed_nmadd_, vN_1, vN_2, vN_3) + +;; 3-numerics.watsup +def $ivtestop_(shape : shape, def $f_(N : N, iN : iN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $ivtestop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + +;; 3-numerics.watsup +def $vtestop_(shape : shape, vtestop_ : vtestop_(shape), vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $vtestop_{Jnn : Jnn, M : M, vN_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_, vN_1) = $ivtestop_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), def $inez_, vN_1) ;; 3-numerics.watsup def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) @@ -28105,6 +29196,9 @@ def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, sha def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), TRUNC_SAT_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) -- if (iN_2?{iN_2 <- `iN_2?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) ;; 3-numerics.watsup + def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `iN_2?` : lane_((Inn_2 : Inn <: lanetype))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Inn_2 : Inn <: lanetype), `%`_dim(M_2)), RELAXED_TRUNC_vcvtop__(sx), fN_1) = $list_(syntax lane_((Inn_2 : Inn <: lanetype)), iN_2?{iN_2 <- `iN_2?`}) + -- if (iN_2?{iN_2 <- `iN_2?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, fN_1)) + ;; 3-numerics.watsup def $vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, fN_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)))), `fN_2*` : lane_($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2))))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Fnn_2 : Fnn <: lanetype), `%`_dim(M_2)), DEMOTE_vcvtop__, fN_1) = fN_2*{fN_2 <- `fN_2*`} -- if (fN_2*{fN_2 <- `fN_2*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), fN_1)) ;; 3-numerics.watsup @@ -28127,11 +29221,38 @@ def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__ -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)[$half__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), `%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), half, 0, M_2) : M_2]) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`})) ;; 3-numerics.watsup - def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `DOTS`_vextbinop__, c_1, c_2) = c -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) - -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1), $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2))*{ci_1 <- `ci_1*`, ci_2 <- `ci_2*`}) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + ;; 3-numerics.watsup + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOTS`_vextbinop__, c_1, c_2) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), [cj_1 cj_2]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_sat_($lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, cj_1, cj_2)*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`})) + +;; 3-numerics.watsup +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; 3-numerics.watsup + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_3*` : lane_($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2))))*, Jnn : Jnn, `ci'_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ci'_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_1*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck_2*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `ck'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `ck*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_ishape(Jnn_1, `%`_dim(M_1)), `%X%`_ishape(Jnn_2, `%`_dim(M_2)), `RELAXED_DOT_ADDS`_vextternop__, c_1, c_2, c_3) = c + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1)), c_2)) + -- if (ci_3*{ci_3 <- `ci_3*`} = $lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), c_3)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn((Jnn : Jnn <: lanetype)), $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [`%`_uN(cj_1!`%`_iN.0) `%`_uN(cj_2!`%`_iN.0)]*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) = $imul_($lsizenn((Jnn : Jnn <: lanetype)), ci'_1, ci'_2)*{ci'_1 <- `ci'_1*`, ci'_2 <- `ci'_2*`}) + -- if ($concat_(syntax iN($lsizenn((Jnn : Jnn <: lanetype))), [ck_1 ck_2]*{ck_1 <- `ck_1*`, ck_2 <- `ck_2*`}) = $iadd_sat_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN(cj_1!`%`_iN.0), `%`_iN(cj_2!`%`_iN.0))*{cj_1 <- `cj_1*`, cj_2 <- `cj_2*`}) + -- if (ck'_1*{ck'_1 <- `ck'_1*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_1)*{ck_1 <- `ck_1*`}) + -- if (ck'_2*{ck'_2 <- `ck'_2*`} = $extend__($lsizenn((Jnn : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ck_2)*{ck_2 <- `ck_2*`}) + -- if (ck*{ck <- `ck*`} = $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck'_1, ck'_2)*{ck'_1 <- `ck'_1*`, ck'_2 <- `ck'_2*`}) + -- if (c = $invlanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), `%`_dim(M_2)), $iadd_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ck, ci_3)*{ci_3 <- `ci_3*`, ck <- `ck*`})) ;; 3-numerics.watsup def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($lanetype((ishape : ishape <: shape))), u32 : u32) : lane_($lanetype((ishape : ishape <: shape))) @@ -28140,6 +29261,13 @@ def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), lane_ : lane_($la ;; 3-numerics.watsup def $vshiftop_{Jnn : Jnn, M : M, sx : sx, lane : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)))), n : n}(`%X%`_ishape(Jnn, `%`_dim(M)), SHR_vshiftop_(sx), lane, `%`_u32(n)) = $ishr_($lsizenn((Jnn : Jnn <: lanetype)), sx, lane, `%`_u32(n)) +;; 3-numerics.watsup +def $fvtestop_(shape : shape, def $f_(N : N, fN : fN(N)) : u32, vec_ : vec_(V128_Vnn)) : u32 + ;; 3-numerics.watsup + def $fvtestop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : u32, vN_1 : vec_(V128_Vnn), `c*` : nat*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M))))*}(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), def $f_, vN_1) = `%`_u32($prod(c*{c <- `c*`})) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), `%`_dim(M)), vN_1)) + -- if (c*{c <- `c*`} = $f_($sizenn((Fnn : Fnn <: numtype)), c_1)!`%`_u32.0*{c_1 <- `c_1*`}) + ;; 4-runtime.watsup syntax num = | CONST{numtype : numtype, num_ : num_(numtype)}(numtype : numtype, num_ : num_(numtype)) @@ -29731,122 +30859,130 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:948.1-949.40 + ;; 6-typing.watsup:948.1-949.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:951.1-952.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:951.1-952.44 + ;; 6-typing.watsup:954.1-955.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:954.1-955.47 + ;; 6-typing.watsup:957.1-958.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:957.1-958.33 + ;; 6-typing.watsup:960.1-961.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; 6-typing.watsup:960.1-961.39 - rule vswizzle{C : context, sh : ishape}: - `%|-%:%`(C, VSWIZZLE_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + ;; 6-typing.watsup:963.1-964.50 + rule vswizzlop{C : context, sh : ishape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:963.1-965.29 + ;; 6-typing.watsup:966.1-968.29 rule vshuffle{C : context, sh : ishape, `i*` : nat*}: `%|-%:%`(C, VSHUFFLE_instr(sh, `%`_laneidx(i)*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i < (2 * $dim((sh : ishape <: shape))!`%`_dim.0)))*{i <- `i*`} - ;; 6-typing.watsup:967.1-968.44 + ;; 6-typing.watsup:970.1-971.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:970.1-972.21 + ;; 6-typing.watsup:973.1-975.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : nat}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:974.1-976.21 + ;; 6-typing.watsup:977.1-979.21 rule vreplace_lane{C : context, sh : shape, i : nat}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i < $dim(sh)!`%`_dim.0) - ;; 6-typing.watsup:978.1-979.50 + ;; 6-typing.watsup:981.1-982.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:981.1-982.57 + ;; 6-typing.watsup:984.1-985.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:984.1-985.48 + ;; 6-typing.watsup:987.1-988.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) + + ;; 6-typing.watsup:990.1-991.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:987.1-988.58 + ;; 6-typing.watsup:993.1-994.58 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1), `half?` : half__(sh_2, sh_1)?, `zero?` : zero__(sh_2, sh_1)?}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop, half?{half <- `half?`}, zero?{zero <- `zero?`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; 6-typing.watsup:993.1-995.28 + ;; 6-typing.watsup:999.1-1001.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; 6-typing.watsup:997.1-999.29 + ;; 6-typing.watsup:1003.1-1005.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1001.1-1003.29 + ;; 6-typing.watsup:1007.1-1009.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.LOCALS_context|) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; 6-typing.watsup:1008.1-1010.29 + ;; 6-typing.watsup:1014.1-1016.29 rule global.get{C : context, x : idx, t : valtype, mut : mut}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (x!`%`_idx.0 < |C.GLOBALS_context|) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut, t)) - ;; 6-typing.watsup:1012.1-1014.29 + ;; 6-typing.watsup:1018.1-1020.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.GLOBALS_context|) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(`MUT%?`_mut(?(())), t)) - ;; 6-typing.watsup:1019.1-1021.29 + ;; 6-typing.watsup:1025.1-1027.29 rule table.get{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1023.1-1025.29 + ;; 6-typing.watsup:1029.1-1031.29 rule table.set{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1027.1-1029.29 + ;; 6-typing.watsup:1033.1-1035.29 rule table.size{C : context, x : idx, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1031.1-1033.29 + ;; 6-typing.watsup:1037.1-1039.29 rule table.grow{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1035.1-1037.29 + ;; 6-typing.watsup:1041.1-1043.29 rule table.fill{C : context, x : idx, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (rt : reftype <: valtype) I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) -- if (C.TABLES_context[x!`%`_idx.0] = `%%`_tabletype(lim, rt)) - ;; 6-typing.watsup:1039.1-1043.36 + ;; 6-typing.watsup:1045.1-1049.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.TABLES_context|) @@ -29855,7 +30991,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%`_tabletype(lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1045.1-1049.36 + ;; 6-typing.watsup:1051.1-1055.36 rule table.init{C : context, x : idx, y : idx, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.TABLES_context|) @@ -29864,31 +31000,31 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; 6-typing.watsup:1051.1-1053.24 + ;; 6-typing.watsup:1057.1-1059.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.ELEMS_context|) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; 6-typing.watsup:1058.1-1060.23 + ;; 6-typing.watsup:1064.1-1066.23 rule memory.size{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1062.1-1064.23 + ;; 6-typing.watsup:1068.1-1070.23 rule memory.grow{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([I32_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1066.1-1068.23 + ;; 6-typing.watsup:1072.1-1074.23 rule memory.fill{C : context, x : idx, mt : memtype}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) - ;; 6-typing.watsup:1070.1-1073.27 + ;; 6-typing.watsup:1076.1-1079.27 rule memory.copy{C : context, x_1 : idx, x_2 : idx, mt_1 : memtype, mt_2 : memtype}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x_1!`%`_idx.0 < |C.MEMS_context|) @@ -29896,7 +31032,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.MEMS_context[x_1!`%`_idx.0] = mt_1) -- if (C.MEMS_context[x_2!`%`_idx.0] = mt_2) - ;; 6-typing.watsup:1075.1-1078.24 + ;; 6-typing.watsup:1081.1-1084.24 rule memory.init{C : context, x : idx, y : idx, mt : memtype}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -29904,69 +31040,69 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1080.1-1082.24 + ;; 6-typing.watsup:1086.1-1088.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.DATAS_context|) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; 6-typing.watsup:1093.1-1096.43 + ;; 6-typing.watsup:1099.1-1102.43 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1098.1-1101.35 + ;; 6-typing.watsup:1104.1-1107.35 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1112.1-1115.43 + ;; 6-typing.watsup:1118.1-1121.43 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($size(nt) / 8)) - ;; 6-typing.watsup:1117.1-1120.35 + ;; 6-typing.watsup:1123.1-1126.35 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_sz(M)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (M / 8)) - ;; 6-typing.watsup:1122.1-1125.46 + ;; 6-typing.watsup:1128.1-1131.46 rule `vload-val`{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1127.1-1130.39 + ;; 6-typing.watsup:1133.1-1136.39 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ((M / 8) * N)) - ;; 6-typing.watsup:1132.1-1135.35 + ;; 6-typing.watsup:1138.1-1141.35 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1137.1-1140.35 + ;; 6-typing.watsup:1143.1-1146.35 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) - ;; 6-typing.watsup:1142.1-1146.21 + ;; 6-typing.watsup:1148.1-1152.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -29974,14 +31110,14 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= (N / 8)) -- if (i < (128 / N)) - ;; 6-typing.watsup:1148.1-1151.46 + ;; 6-typing.watsup:1154.1-1157.46 rule vstore{C : context, x : idx, memarg : memarg, mt : memtype}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) -- if (C.MEMS_context[x!`%`_idx.0] = mt) -- if ((2 ^ memarg.ALIGN_memarg!`%`_u32.0) <= ($vsize(V128_vectype) / 8)) - ;; 6-typing.watsup:1153.1-1157.21 + ;; 6-typing.watsup:1159.1-1163.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : nat, mt : memtype}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, `%`_laneidx(i)), `%->_%%`_instrtype(`%`_resulttype([I32_valtype V128_valtype]), [], `%`_resulttype([]))) -- if (x!`%`_idx.0 < |C.MEMS_context|) @@ -30274,13 +31410,13 @@ relation Export_ok: `%|-%:%%`(context, export, name, externtype) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1358.1-1358.100 +;; 6-typing.watsup:1364.1-1364.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; 6-typing.watsup:1402.1-1403.17 + ;; 6-typing.watsup:1408.1-1409.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1405.1-1408.54 + ;; 6-typing.watsup:1411.1-1414.54 rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) -- Global_ok: `%|-%:%`(C, global_1, gt_1) @@ -30290,13 +31426,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; 6-typing.watsup rec { -;; 6-typing.watsup:1357.1-1357.98 +;; 6-typing.watsup:1363.1-1363.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; 6-typing.watsup:1394.1-1395.17 + ;; 6-typing.watsup:1400.1-1401.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; 6-typing.watsup:1397.1-1400.49 + ;; 6-typing.watsup:1403.1-1406.49 rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) @@ -30758,15 +31894,20 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) ;; 8-reduction.watsup - rule `vtestop-true`{c : vec_(V128_Vnn), Jnn : Jnn, M : M, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M))))*}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(1))]) - -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)) - -- (if (ci_1 =/= `%`_lane_(0)))*{ci_1 <- `ci_1*`} + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vternop_(sh, vternop, c_1, c_2, c_3)| > 0) + -- if c <- $vternop_(sh, vternop, c_1, c_2, c_3) ;; 8-reduction.watsup - rule `vtestop-false`{c : vec_(V128_Vnn), Jnn : Jnn, M : M}: - `%~>%`([VCONST_instr(V128_vectype, c) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, `%`_num_(0))]) - -- otherwise + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; 8-reduction.watsup + rule vtestop{c_1 : vec_(V128_Vnn), sh : shape, vtestop : vtestop_(sh), i : nat}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(sh, vtestop)], [CONST_instr(I32_numtype, `%`_num_(i))]) + -- if ($vtestop_(sh, vtestop, c_1) = `%`_u32(i)) ;; 8-reduction.watsup rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: @@ -30786,13 +31927,22 @@ relation Step_pure: `%~>%`(instr*, instr*) -- if ($ibits_(32, ci) = `%`_bit($ilt_($lsize((Jnn : Jnn <: lanetype)), S_sx, ci_1, `%`_iN(0))!`%`_u32.0)*{ci_1 <- `ci_1*`}) ;; 8-reduction.watsup - rule vswizzle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Pnn : Pnn, M : M, c : vec_(V128_Vnn), `c'*` : iN($lsize((Pnn : Pnn <: lanetype)))*, `ci*` : lane_($lanetype(`%X%`_shape((Pnn : Pnn <: lanetype), `%`_dim(M))))*, `k*` : nat*}: - `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLE_instr(`%X%`_ishape((Pnn : Pnn <: Jnn), `%`_dim(M)))], [VCONST_instr(V128_vectype, c)]) + rule `vswizzlop-swizzle`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), M : M, c : vec_(V128_Vnn), `c'*` : iN(8)*, `ci*` : lane_($lanetype(`%X%`_shape(I8_lanetype, `%`_dim(M))))*, `k*` : nat*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) + -- (if (ci*{ci <- `ci*`}[k]!`%`_lane_.0 < |c'*{c' <- `c'*`}|))^(k%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(M)), RELAXED_SWIZZLE_vswizzlop_)], [VCONST_instr(V128_vectype, c)]) -- (if (ci*{ci <- `ci*`}[k]!`%`_lane_.0 < |c'*{c' <- `c'*`}|))^(k%`(instr*, instr*) `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + ;; 8-reduction.watsup + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + ;; 8-reduction.watsup rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), Jnn_2 : Jnn, M_2 : M, Jnn_1 : Jnn, M_1 : M, sx : sx, c : vec_(V128_Vnn), `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), `%`_dim(M_1))))*, `cj_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `cj_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}: `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(`%X%`_ishape(Jnn_2, `%`_dim(M_2)), `%X%`_ishape(Jnn_1, `%`_dim(M_1)), sx)], [VCONST_instr(V128_vectype, c)]) @@ -31529,74 +32684,74 @@ relation Step: `%~>%`(config, config) `%~>%`(`%;%`_config(z, [REF.ARRAY_ADDR_instr(a) CONST_instr(I32_numtype, `%`_num_(i)) (val : val <: instr) ARRAY.SET_instr(x)]), `%;%`_config($with_array(z, a, i, $packfield_(zt, val)), [])) -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_arraytype(mut, zt))) - ;; 8-reduction.watsup:806.1-807.56 + ;; 8-reduction.watsup:823.1-824.56 rule local.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) LOCAL.SET_instr(x)]), `%;%`_config($with_local(z, x, val), [])) - ;; 8-reduction.watsup:819.1-820.58 + ;; 8-reduction.watsup:836.1-837.58 rule global.set{z : state, val : val, x : idx}: `%~>%`(`%;%`_config(z, [(val : val <: instr) GLOBAL.SET_instr(x)]), `%;%`_config($with_global(z, x, val), [])) - ;; 8-reduction.watsup:833.1-835.33 + ;; 8-reduction.watsup:850.1-852.33 rule `table.set-oob`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config(z, [TRAP_instr])) -- if (i >= |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:837.1-839.32 + ;; 8-reduction.watsup:854.1-856.32 rule `table.set-val`{z : state, i : nat, ref : ref, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) (ref : ref <: instr) TABLE.SET_instr(x)]), `%;%`_config($with_table(z, x, i, ref), [])) -- if (i < |$table(z, x).REFS_tableinst|) - ;; 8-reduction.watsup:847.1-850.46 + ;; 8-reduction.watsup:864.1-867.46 rule `table.grow-succeed`{z : state, ref : ref, n : n, x : idx, ti : tableinst}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr(I32_numtype, `%`_num_(|$table(z, x).REFS_tableinst|))])) -- if ($growtable($table(z, x), n, ref) =/= ?()) -- if (ti = !($growtable($table(z, x), n, ref))) - ;; 8-reduction.watsup:852.1-853.81 + ;; 8-reduction.watsup:869.1-870.81 rule `table.grow-fail`{z : state, ref : ref, n : n, x : idx}: `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, `%`_num_(n)) TABLE.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:913.1-914.51 + ;; 8-reduction.watsup:930.1-931.51 rule elem.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [ELEM.DROP_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) - ;; 8-reduction.watsup:997.1-1000.60 + ;; 8-reduction.watsup:1014.1-1017.60 rule `store-num-oob`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($size(nt) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1002.1-1006.29 + ;; 8-reduction.watsup:1019.1-1023.29 rule `store-num-val`{z : state, i : nat, nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($size(nt) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $nbytes_(nt, c)) - ;; 8-reduction.watsup:1008.1-1011.52 + ;; 8-reduction.watsup:1025.1-1028.52 rule `store-pack-oob`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + (n / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1013.1-1017.52 + ;; 8-reduction.watsup:1030.1-1034.52 rule `store-pack-val`{z : state, i : nat, Inn : Inn, c : num_((Inn : Inn <: numtype)), nt : numtype, n : n, x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) CONST_instr((Inn : Inn <: numtype), c) STORE_instr(nt, ?(`%`_sz(n)), x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (n / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : Inn <: numtype)), n, c))) - ;; 8-reduction.watsup:1019.1-1021.63 + ;; 8-reduction.watsup:1036.1-1038.63 rule `vstore-oob`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + ($vsize(V128_vectype) / 8)) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1023.1-1025.31 + ;; 8-reduction.watsup:1040.1-1042.31 rule `vstore-val`{z : state, i : nat, c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), ($vsize(V128_vectype) / 8), b*{b <- `b*`}), [])) -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) - ;; 8-reduction.watsup:1028.1-1030.50 + ;; 8-reduction.watsup:1045.1-1047.50 rule `vstore_lane-oob`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config(z, [TRAP_instr])) -- if (((i + ao.OFFSET_memarg!`%`_u32.0) + N) > |$mem(z, x).BYTES_meminst|) - ;; 8-reduction.watsup:1032.1-1036.49 + ;; 8-reduction.watsup:1049.1-1053.49 rule `vstore_lane-val`{z : state, i : nat, c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : nat, `b*` : byte*, Jnn : Jnn, M : M}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(i)) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, ao, `%`_laneidx(j))]), `%;%`_config($with_mem(z, x, (i + ao.OFFSET_memarg!`%`_u32.0), (N / 8), b*{b <- `b*`}), [])) -- if (j < |$lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)|) @@ -31604,17 +32759,17 @@ relation Step: `%~>%`(config, config) -- if (M = (128 / N)) -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), `%`_dim(M)), c)[j]!`%`_lane_.0))) - ;; 8-reduction.watsup:1044.1-1047.37 + ;; 8-reduction.watsup:1061.1-1064.37 rule `memory.grow-succeed`{z : state, n : n, x : idx, mi : meminst}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr(I32_numtype, `%`_num_((|$mem(z, x).BYTES_meminst| / (64 * $Ki))))])) -- if ($growmem($mem(z, x), n) =/= ?()) -- if (mi = !($growmem($mem(z, x), n))) - ;; 8-reduction.watsup:1049.1-1050.78 + ;; 8-reduction.watsup:1066.1-1067.78 rule `memory.grow-fail`{z : state, n : n, x : idx}: `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n)) MEMORY.GROW_instr(x)]), `%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_($invsigned_(32, - (1 : nat <: int))))])) - ;; 8-reduction.watsup:1110.1-1111.51 + ;; 8-reduction.watsup:1127.1-1128.51 rule data.drop{z : state, x : idx}: `%~>%`(`%;%`_config(z, [DATA.DROP_instr(x)]), `%;%`_config($with_data(z, x, []), [])) } @@ -32264,7 +33419,7 @@ grammar Blaneidx : laneidx ;; A-binary.watsup rec { -;; A-binary.watsup:971.1-981.66 +;; A-binary.watsup:992.1-1006.73 grammar Binstr : instr ;; A-binary.watsup:214.5-214.24 prod 0x00 => UNREACHABLE_instr @@ -32794,430 +33949,462 @@ grammar Binstr : instr prod{`b*` : byte*} {0xFD `%`_u32(12):Bu32 b:Bbyte^16{b <- `b*`}} => VCONST_instr(V128_vectype, $invibytes_(128, b^16{b <- `b*`})) ;; A-binary.watsup:625.5-625.58 prod{l : labelidx} {0xFD `%`_u32(13):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx^16{}} => VSHUFFLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), [`%`_uN(l!`%`_labelidx.0)]) - ;; A-binary.watsup:626.5-626.40 - prod {0xFD `%`_u32(14):Bu32} => VSWIZZLE_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:630.5-630.38 - prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) + ;; A-binary.watsup:626.5-626.49 + prod {0xFD `%`_u32(14):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SWIZZLE_vswizzlop_) + ;; A-binary.watsup:627.5-627.58 + prod {0xFD `%`_u32(256):Bu32} => VSWIZZLOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), RELAXED_SWIZZLE_vswizzlop_) ;; A-binary.watsup:631.5-631.38 - prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) + prod {0xFD `%`_u32(15):Bu32} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16))) ;; A-binary.watsup:632.5-632.38 - prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(16):Bu32} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8))) ;; A-binary.watsup:633.5-633.38 - prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) + prod {0xFD `%`_u32(17):Bu32} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4))) ;; A-binary.watsup:634.5-634.38 - prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + prod {0xFD `%`_u32(18):Bu32} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2))) ;; A-binary.watsup:635.5-635.38 + prod {0xFD `%`_u32(19):Bu32} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4))) + ;; A-binary.watsup:636.5-636.38 prod {0xFD `%`_u32(20):Bu32} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2))) - ;; A-binary.watsup:639.5-639.60 - prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:640.5-640.60 + prod{l : labelidx} {0xFD `%`_u32(21):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:641.5-641.60 prod{l : labelidx} {0xFD `%`_u32(22):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:641.5-641.58 + ;; A-binary.watsup:642.5-642.58 prod{l : labelidx} {0xFD `%`_u32(23):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:642.5-642.60 - prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:643.5-643.60 + prod{l : labelidx} {0xFD `%`_u32(24):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:644.5-644.60 prod{l : labelidx} {0xFD `%`_u32(25):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:644.5-644.58 - prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:645.5-645.58 - prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(26):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:646.5-646.58 - prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(27):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:647.5-647.58 - prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(28):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:648.5-648.58 - prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(29):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:649.5-649.58 - prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(30):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:650.5-650.58 - prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(31):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ?(), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:651.5-651.58 - prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + prod{l : labelidx} {0xFD `%`_u32(32):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%`_laneidx(l!`%`_labelidx.0)) ;; A-binary.watsup:652.5-652.58 + prod{l : labelidx} {0xFD `%`_u32(33):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ?(), `%`_laneidx(l!`%`_labelidx.0)) + ;; A-binary.watsup:653.5-653.58 prod{l : labelidx} {0xFD `%`_u32(34):Bu32 `%`_laneidx(l!`%`_labelidx.0):Blaneidx} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%`_laneidx(l!`%`_labelidx.0)) - ;; A-binary.watsup:656.5-656.41 - prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) ;; A-binary.watsup:657.5-657.41 + prod {0xFD `%`_u32(35):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), EQ_vrelop_) + ;; A-binary.watsup:658.5-658.41 prod {0xFD `%`_u32(36):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NE_vrelop_) - ;; A-binary.watsup:658.5-658.45 - prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:659.5-659.45 - prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(37):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(S_sx)) ;; A-binary.watsup:660.5-660.45 - prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(38):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LT_vrelop_(U_sx)) ;; A-binary.watsup:661.5-661.45 - prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(39):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(S_sx)) ;; A-binary.watsup:662.5-662.45 - prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(40):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GT_vrelop_(U_sx)) ;; A-binary.watsup:663.5-663.45 - prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(41):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(S_sx)) ;; A-binary.watsup:664.5-664.45 - prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(42):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), LE_vrelop_(U_sx)) ;; A-binary.watsup:665.5-665.45 + prod {0xFD `%`_u32(43):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:666.5-666.45 prod {0xFD `%`_u32(44):Bu32} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:669.5-669.41 - prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) ;; A-binary.watsup:670.5-670.41 + prod {0xFD `%`_u32(45):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), EQ_vrelop_) + ;; A-binary.watsup:671.5-671.41 prod {0xFD `%`_u32(46):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NE_vrelop_) - ;; A-binary.watsup:671.5-671.45 - prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:672.5-672.45 - prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(47):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(S_sx)) ;; A-binary.watsup:673.5-673.45 - prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(48):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LT_vrelop_(U_sx)) ;; A-binary.watsup:674.5-674.45 - prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(49):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(S_sx)) ;; A-binary.watsup:675.5-675.45 - prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(50):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GT_vrelop_(U_sx)) ;; A-binary.watsup:676.5-676.45 - prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(51):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(S_sx)) ;; A-binary.watsup:677.5-677.45 - prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(52):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), LE_vrelop_(U_sx)) ;; A-binary.watsup:678.5-678.45 + prod {0xFD `%`_u32(53):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:679.5-679.45 prod {0xFD `%`_u32(54):Bu32} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:682.5-682.41 - prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:683.5-683.41 + prod {0xFD `%`_u32(55):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), EQ_vrelop_) + ;; A-binary.watsup:684.5-684.41 prod {0xFD `%`_u32(56):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NE_vrelop_) - ;; A-binary.watsup:684.5-684.45 - prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:685.5-685.45 - prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) + prod {0xFD `%`_u32(57):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(S_sx)) ;; A-binary.watsup:686.5-686.45 - prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) + prod {0xFD `%`_u32(58):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LT_vrelop_(U_sx)) ;; A-binary.watsup:687.5-687.45 - prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) + prod {0xFD `%`_u32(59):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(S_sx)) ;; A-binary.watsup:688.5-688.45 - prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) + prod {0xFD `%`_u32(60):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GT_vrelop_(U_sx)) ;; A-binary.watsup:689.5-689.45 - prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) + prod {0xFD `%`_u32(61):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(S_sx)) ;; A-binary.watsup:690.5-690.45 - prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + prod {0xFD `%`_u32(62):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), LE_vrelop_(U_sx)) ;; A-binary.watsup:691.5-691.45 + prod {0xFD `%`_u32(63):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(S_sx)) + ;; A-binary.watsup:692.5-692.45 prod {0xFD `%`_u32(64):Bu32} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), GE_vrelop_(U_sx)) - ;; A-binary.watsup:695.5-695.41 - prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:696.5-696.41 - prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) + prod {0xFD `%`_u32(65):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), EQ_vrelop_) ;; A-binary.watsup:697.5-697.41 - prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) + prod {0xFD `%`_u32(66):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NE_vrelop_) ;; A-binary.watsup:698.5-698.41 - prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) + prod {0xFD `%`_u32(67):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LT_vrelop_) ;; A-binary.watsup:699.5-699.41 - prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + prod {0xFD `%`_u32(68):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GT_vrelop_) ;; A-binary.watsup:700.5-700.41 + prod {0xFD `%`_u32(69):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), LE_vrelop_) + ;; A-binary.watsup:701.5-701.41 prod {0xFD `%`_u32(70):Bu32} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), GE_vrelop_) - ;; A-binary.watsup:704.5-704.41 - prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:705.5-705.41 - prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) + prod {0xFD `%`_u32(71):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), EQ_vrelop_) ;; A-binary.watsup:706.5-706.41 - prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) + prod {0xFD `%`_u32(72):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NE_vrelop_) ;; A-binary.watsup:707.5-707.41 - prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) + prod {0xFD `%`_u32(73):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LT_vrelop_) ;; A-binary.watsup:708.5-708.41 - prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + prod {0xFD `%`_u32(74):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GT_vrelop_) ;; A-binary.watsup:709.5-709.41 + prod {0xFD `%`_u32(75):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), LE_vrelop_) + ;; A-binary.watsup:710.5-710.41 prod {0xFD `%`_u32(76):Bu32} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), GE_vrelop_) - ;; A-binary.watsup:713.5-713.36 + ;; A-binary.watsup:714.5-714.36 prod {0xFD `%`_u32(77):Bu32} => VVUNOP_instr(V128_vectype, NOT_vvunop) - ;; A-binary.watsup:717.5-717.37 + ;; A-binary.watsup:718.5-718.37 prod {0xFD `%`_u32(78):Bu32} => VVBINOP_instr(V128_vectype, AND_vvbinop) - ;; A-binary.watsup:718.5-718.40 + ;; A-binary.watsup:719.5-719.40 prod {0xFD `%`_u32(79):Bu32} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) - ;; A-binary.watsup:719.5-719.36 + ;; A-binary.watsup:720.5-720.36 prod {0xFD `%`_u32(80):Bu32} => VVBINOP_instr(V128_vectype, OR_vvbinop) - ;; A-binary.watsup:720.5-720.37 + ;; A-binary.watsup:721.5-721.37 prod {0xFD `%`_u32(81):Bu32} => VVBINOP_instr(V128_vectype, XOR_vvbinop) - ;; A-binary.watsup:724.5-724.44 + ;; A-binary.watsup:725.5-725.44 prod {0xFD `%`_u32(82):Bu32} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) - ;; A-binary.watsup:728.5-728.43 + ;; A-binary.watsup:729.5-729.43 prod {0xFD `%`_u32(83):Bu32} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) - ;; A-binary.watsup:732.5-732.41 - prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) ;; A-binary.watsup:733.5-733.41 + prod {0xFD `%`_u32(96):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ABS_vunop_) + ;; A-binary.watsup:734.5-734.41 prod {0xFD `%`_u32(97):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), NEG_vunop_) - ;; A-binary.watsup:734.5-734.44 + ;; A-binary.watsup:735.5-735.44 prod {0xFD `%`_u32(98):Bu32} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), POPCNT_vunop_) - ;; A-binary.watsup:738.5-738.48 + ;; A-binary.watsup:739.5-739.48 prod {0xFD `%`_u32(99):Bu32} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:742.5-742.41 + ;; A-binary.watsup:743.5-743.41 prod {0xFD `%`_u32(100):Bu32} => VBITMASK_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16))) - ;; A-binary.watsup:746.5-746.53 - prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) ;; A-binary.watsup:747.5-747.53 + prod {0xFD `%`_u32(101):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), S_sx) + ;; A-binary.watsup:748.5-748.53 prod {0xFD `%`_u32(102):Bu32} => VNARROW_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), U_sx) - ;; A-binary.watsup:751.5-751.45 + ;; A-binary.watsup:752.5-752.45 prod {0xFD `%`_u32(107):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHL_vshiftop_) - ;; A-binary.watsup:752.5-752.49 - prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) ;; A-binary.watsup:753.5-753.49 + prod {0xFD `%`_u32(108):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(S_sx)) + ;; A-binary.watsup:754.5-754.49 prod {0xFD `%`_u32(109):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I8_Jnn, `%`_dim(16)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:757.5-757.43 + ;; A-binary.watsup:758.5-758.43 prod {0xFD `%`_u32(110):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_vbinop_) - ;; A-binary.watsup:758.5-758.51 - prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) ;; A-binary.watsup:759.5-759.51 + prod {0xFD `%`_u32(111):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:760.5-760.51 prod {0xFD `%`_u32(112):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:760.5-760.43 + ;; A-binary.watsup:761.5-761.43 prod {0xFD `%`_u32(113):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_vbinop_) - ;; A-binary.watsup:761.5-761.51 - prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) ;; A-binary.watsup:762.5-762.51 + prod {0xFD `%`_u32(114):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(S_sx)) + ;; A-binary.watsup:763.5-763.51 prod {0xFD `%`_u32(115):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:763.5-763.47 - prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:764.5-764.47 - prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) + prod {0xFD `%`_u32(118):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(S_sx)) ;; A-binary.watsup:765.5-765.47 - prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + prod {0xFD `%`_u32(119):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MIN_vbinop_(U_sx)) ;; A-binary.watsup:766.5-766.47 + prod {0xFD `%`_u32(120):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(S_sx)) + ;; A-binary.watsup:767.5-767.47 prod {0xFD `%`_u32(121):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:767.5-767.48 + ;; A-binary.watsup:768.5-768.48 prod {0xFD `%`_u32(123):Bu32} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16)), `AVGRU`_vbinop_) - ;; A-binary.watsup:771.5-771.72 - prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) ;; A-binary.watsup:772.5-772.72 + prod {0xFD `%`_u32(124):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; A-binary.watsup:773.5-773.72 prod {0xFD `%`_u32(125):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:776.5-776.42 - prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) ;; A-binary.watsup:777.5-777.42 + prod {0xFD `%`_u32(128):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ABS_vunop_) + ;; A-binary.watsup:778.5-778.42 prod {0xFD `%`_u32(129):Bu32} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), NEG_vunop_) - ;; A-binary.watsup:781.5-781.55 + ;; A-binary.watsup:782.5-782.55 prod {0xFD `%`_u32(130):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `Q15MULR_SATS`_vbinop_) - ;; A-binary.watsup:785.5-785.49 + ;; A-binary.watsup:783.5-783.59 + prod {0xFD `%`_u32(273):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `RELAXED_Q15MULRS`_vbinop_) + ;; A-binary.watsup:787.5-787.49 prod {0xFD `%`_u32(131):Bu32} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:789.5-789.41 + ;; A-binary.watsup:791.5-791.41 prod {0xFD `%`_u32(132):Bu32} => VBITMASK_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8))) - ;; A-binary.watsup:793.5-793.53 + ;; A-binary.watsup:795.5-795.53 prod {0xFD `%`_u32(133):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), S_sx) - ;; A-binary.watsup:794.5-794.53 + ;; A-binary.watsup:796.5-796.53 prod {0xFD `%`_u32(134):Bu32} => VNARROW_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), U_sx) - ;; A-binary.watsup:798.5-798.65 + ;; A-binary.watsup:800.5-800.65 prod {0xFD `%`_u32(135):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:799.5-799.66 + ;; A-binary.watsup:801.5-801.66 prod {0xFD `%`_u32(136):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:800.5-800.65 + ;; A-binary.watsup:802.5-802.65 prod {0xFD `%`_u32(137):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:801.5-801.66 + ;; A-binary.watsup:803.5-803.66 prod {0xFD `%`_u32(138):Bu32} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `%X%`_shape(I8_lanetype, `%`_dim(16)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:805.5-805.45 + ;; A-binary.watsup:807.5-807.45 prod {0xFD `%`_u32(139):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHL_vshiftop_) - ;; A-binary.watsup:806.5-806.49 + ;; A-binary.watsup:808.5-808.49 prod {0xFD `%`_u32(140):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:807.5-807.49 + ;; A-binary.watsup:809.5-809.49 prod {0xFD `%`_u32(141):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:811.5-811.43 + ;; A-binary.watsup:813.5-813.43 prod {0xFD `%`_u32(142):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_vbinop_) - ;; A-binary.watsup:812.5-812.51 + ;; A-binary.watsup:814.5-814.51 prod {0xFD `%`_u32(143):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:813.5-813.51 + ;; A-binary.watsup:815.5-815.51 prod {0xFD `%`_u32(144):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), ADD_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:814.5-814.43 + ;; A-binary.watsup:816.5-816.43 prod {0xFD `%`_u32(145):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_vbinop_) - ;; A-binary.watsup:815.5-815.51 + ;; A-binary.watsup:817.5-817.51 prod {0xFD `%`_u32(146):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(S_sx)) - ;; A-binary.watsup:816.5-816.51 + ;; A-binary.watsup:818.5-818.51 prod {0xFD `%`_u32(147):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), SUB_SAT_vbinop_(U_sx)) - ;; A-binary.watsup:817.5-817.43 + ;; A-binary.watsup:819.5-819.43 prod {0xFD `%`_u32(149):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MUL_vbinop_) - ;; A-binary.watsup:818.5-818.47 + ;; A-binary.watsup:820.5-820.47 prod {0xFD `%`_u32(150):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:819.5-819.47 + ;; A-binary.watsup:821.5-821.47 prod {0xFD `%`_u32(151):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:820.5-820.47 + ;; A-binary.watsup:822.5-822.47 prod {0xFD `%`_u32(152):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:821.5-821.47 + ;; A-binary.watsup:823.5-823.47 prod {0xFD `%`_u32(153):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:822.5-822.48 + ;; A-binary.watsup:824.5-824.48 prod {0xFD `%`_u32(155):Bu32} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8)), `AVGRU`_vbinop_) - ;; A-binary.watsup:826.5-826.68 + ;; A-binary.watsup:828.5-828.68 prod {0xFD `%`_u32(156):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:827.5-827.69 + ;; A-binary.watsup:829.5-829.69 prod {0xFD `%`_u32(157):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:828.5-828.68 + ;; A-binary.watsup:830.5-830.68 prod {0xFD `%`_u32(158):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:829.5-829.69 + ;; A-binary.watsup:831.5-831.69 prod {0xFD `%`_u32(159):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:833.5-833.72 + ;; A-binary.watsup:832.5-832.69 + prod {0xFD `%`_u32(274):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I16_Jnn, `%`_dim(8)), `%X%`_ishape(I8_Jnn, `%`_dim(16)), `RELAXED_DOTS`_vextbinop__) + ;; A-binary.watsup:836.5-836.72 prod {0xFD `%`_u32(126):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; A-binary.watsup:834.5-834.72 + ;; A-binary.watsup:837.5-837.72 prod {0xFD `%`_u32(127):Bu32} => VEXTUNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; A-binary.watsup:838.5-838.42 + ;; A-binary.watsup:841.5-841.42 prod {0xFD `%`_u32(160):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:839.5-839.42 + ;; A-binary.watsup:842.5-842.42 prod {0xFD `%`_u32(161):Bu32} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:843.5-843.49 + ;; A-binary.watsup:846.5-846.49 prod {0xFD `%`_u32(163):Bu32} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:847.5-847.41 + ;; A-binary.watsup:850.5-850.41 prod {0xFD `%`_u32(164):Bu32} => VBITMASK_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4))) - ;; A-binary.watsup:851.5-851.65 + ;; A-binary.watsup:854.5-854.65 prod {0xFD `%`_u32(167):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:852.5-852.66 + ;; A-binary.watsup:855.5-855.66 prod {0xFD `%`_u32(168):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:853.5-853.65 + ;; A-binary.watsup:856.5-856.65 prod {0xFD `%`_u32(169):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:854.5-854.66 + ;; A-binary.watsup:857.5-857.66 prod {0xFD `%`_u32(170):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(I16_lanetype, `%`_dim(8)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:858.5-858.45 + ;; A-binary.watsup:861.5-861.45 prod {0xFD `%`_u32(171):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHL_vshiftop_) - ;; A-binary.watsup:859.5-859.49 + ;; A-binary.watsup:862.5-862.49 prod {0xFD `%`_u32(172):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:860.5-860.49 + ;; A-binary.watsup:863.5-863.49 prod {0xFD `%`_u32(173):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:864.5-864.43 + ;; A-binary.watsup:867.5-867.43 prod {0xFD `%`_u32(174):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:865.5-865.43 + ;; A-binary.watsup:868.5-868.43 prod {0xFD `%`_u32(177):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:866.5-866.43 + ;; A-binary.watsup:869.5-869.43 prod {0xFD `%`_u32(181):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:867.5-867.47 + ;; A-binary.watsup:870.5-870.47 prod {0xFD `%`_u32(182):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(S_sx)) - ;; A-binary.watsup:868.5-868.47 + ;; A-binary.watsup:871.5-871.47 prod {0xFD `%`_u32(183):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MIN_vbinop_(U_sx)) - ;; A-binary.watsup:869.5-869.47 + ;; A-binary.watsup:872.5-872.47 prod {0xFD `%`_u32(184):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(S_sx)) - ;; A-binary.watsup:870.5-870.47 + ;; A-binary.watsup:873.5-873.47 prod {0xFD `%`_u32(185):Bu32} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), MAX_vbinop_(U_sx)) - ;; A-binary.watsup:874.5-874.61 + ;; A-binary.watsup:877.5-877.61 prod {0xFD `%`_u32(186):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `DOTS`_vextbinop__) - ;; A-binary.watsup:875.5-875.68 + ;; A-binary.watsup:878.5-878.68 prod {0xFD `%`_u32(188):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:876.5-876.69 + ;; A-binary.watsup:879.5-879.69 prod {0xFD `%`_u32(189):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:877.5-877.68 + ;; A-binary.watsup:880.5-880.68 prod {0xFD `%`_u32(190):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:878.5-878.69 + ;; A-binary.watsup:881.5-881.69 prod {0xFD `%`_u32(191):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:882.5-882.42 + ;; A-binary.watsup:885.5-885.74 + prod {0xFD `%`_u32(275):Bu32} => VEXTTERNOP_instr(`%X%`_ishape(I32_Jnn, `%`_dim(4)), `%X%`_ishape(I16_Jnn, `%`_dim(8)), `RELAXED_DOT_ADDS`_vextternop__) + ;; A-binary.watsup:889.5-889.42 prod {0xFD `%`_u32(192):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:883.5-883.42 + ;; A-binary.watsup:890.5-890.42 prod {0xFD `%`_u32(193):Bu32} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:887.5-887.49 + ;; A-binary.watsup:894.5-894.49 prod {0xFD `%`_u32(195):Bu32} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ALL_TRUE_vtestop_) - ;; A-binary.watsup:891.5-891.41 + ;; A-binary.watsup:898.5-898.41 prod {0xFD `%`_u32(196):Bu32} => VBITMASK_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2))) - ;; A-binary.watsup:895.5-895.65 + ;; A-binary.watsup:902.5-902.65 prod {0xFD `%`_u32(199):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:896.5-896.66 + ;; A-binary.watsup:903.5-903.66 prod {0xFD `%`_u32(200):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(S_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:897.5-897.65 + ;; A-binary.watsup:904.5-904.65 prod {0xFD `%`_u32(201):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:898.5-898.66 + ;; A-binary.watsup:905.5-905.66 prod {0xFD `%`_u32(202):Bu32} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), EXTEND_vcvtop__(U_sx), ?(HIGH_half__), ?()) - ;; A-binary.watsup:902.5-902.45 + ;; A-binary.watsup:909.5-909.45 prod {0xFD `%`_u32(203):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHL_vshiftop_) - ;; A-binary.watsup:903.5-903.49 + ;; A-binary.watsup:910.5-910.49 prod {0xFD `%`_u32(204):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(S_sx)) - ;; A-binary.watsup:904.5-904.49 + ;; A-binary.watsup:911.5-911.49 prod {0xFD `%`_u32(205):Bu32} => VSHIFTOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), SHR_vshiftop_(U_sx)) - ;; A-binary.watsup:908.5-908.43 + ;; A-binary.watsup:915.5-915.43 prod {0xFD `%`_u32(206):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:909.5-909.43 + ;; A-binary.watsup:916.5-916.43 prod {0xFD `%`_u32(209):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:910.5-910.43 + ;; A-binary.watsup:917.5-917.43 prod {0xFD `%`_u32(213):Bu32} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:914.5-914.42 + ;; A-binary.watsup:921.5-921.42 prod {0xFD `%`_u32(214):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), EQ_vrelop_) - ;; A-binary.watsup:915.5-915.42 + ;; A-binary.watsup:922.5-922.42 prod {0xFD `%`_u32(215):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), NE_vrelop_) - ;; A-binary.watsup:916.5-916.46 + ;; A-binary.watsup:923.5-923.46 prod {0xFD `%`_u32(216):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LT_vrelop_(S_sx)) - ;; A-binary.watsup:917.5-917.46 + ;; A-binary.watsup:924.5-924.46 prod {0xFD `%`_u32(217):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GT_vrelop_(S_sx)) - ;; A-binary.watsup:918.5-918.46 + ;; A-binary.watsup:925.5-925.46 prod {0xFD `%`_u32(218):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), LE_vrelop_(S_sx)) - ;; A-binary.watsup:919.5-919.46 + ;; A-binary.watsup:926.5-926.46 prod {0xFD `%`_u32(219):Bu32} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2)), GE_vrelop_(S_sx)) - ;; A-binary.watsup:923.5-923.68 + ;; A-binary.watsup:930.5-930.68 prod {0xFD `%`_u32(220):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, LOW_half__)) - ;; A-binary.watsup:924.5-924.69 + ;; A-binary.watsup:931.5-931.69 prod {0xFD `%`_u32(221):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(S_sx, HIGH_half__)) - ;; A-binary.watsup:925.5-925.68 + ;; A-binary.watsup:932.5-932.68 prod {0xFD `%`_u32(222):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, LOW_half__)) - ;; A-binary.watsup:926.5-926.69 + ;; A-binary.watsup:933.5-933.69 prod {0xFD `%`_u32(223):Bu32} => VEXTBINOP_instr(`%X%`_ishape(I64_Jnn, `%`_dim(2)), `%X%`_ishape(I32_Jnn, `%`_dim(4)), EXTMUL_vextbinop__(U_sx, HIGH_half__)) - ;; A-binary.watsup:930.5-930.43 + ;; A-binary.watsup:937.5-937.43 prod {0xFD `%`_u32(103):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), CEIL_vunop_) - ;; A-binary.watsup:931.5-931.44 + ;; A-binary.watsup:938.5-938.44 prod {0xFD `%`_u32(104):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), FLOOR_vunop_) - ;; A-binary.watsup:932.5-932.44 + ;; A-binary.watsup:939.5-939.44 prod {0xFD `%`_u32(105):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_vunop_) - ;; A-binary.watsup:933.5-933.46 + ;; A-binary.watsup:940.5-940.46 prod {0xFD `%`_u32(106):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEAREST_vunop_) - ;; A-binary.watsup:934.5-934.42 + ;; A-binary.watsup:941.5-941.42 prod {0xFD `%`_u32(224):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ABS_vunop_) - ;; A-binary.watsup:935.5-935.42 + ;; A-binary.watsup:942.5-942.42 prod {0xFD `%`_u32(225):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), NEG_vunop_) - ;; A-binary.watsup:936.5-936.43 + ;; A-binary.watsup:943.5-943.43 prod {0xFD `%`_u32(227):Bu32} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SQRT_vunop_) - ;; A-binary.watsup:940.5-940.43 + ;; A-binary.watsup:947.5-947.43 prod {0xFD `%`_u32(228):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), ADD_vbinop_) - ;; A-binary.watsup:941.5-941.43 + ;; A-binary.watsup:948.5-948.43 prod {0xFD `%`_u32(229):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), SUB_vbinop_) - ;; A-binary.watsup:942.5-942.43 + ;; A-binary.watsup:949.5-949.43 prod {0xFD `%`_u32(230):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MUL_vbinop_) - ;; A-binary.watsup:943.5-943.43 + ;; A-binary.watsup:950.5-950.43 prod {0xFD `%`_u32(231):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), DIV_vbinop_) - ;; A-binary.watsup:944.5-944.43 + ;; A-binary.watsup:951.5-951.43 prod {0xFD `%`_u32(232):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MIN_vbinop_) - ;; A-binary.watsup:945.5-945.43 + ;; A-binary.watsup:952.5-952.43 prod {0xFD `%`_u32(233):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), MAX_vbinop_) - ;; A-binary.watsup:946.5-946.44 + ;; A-binary.watsup:953.5-953.44 prod {0xFD `%`_u32(234):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMIN_vbinop_) - ;; A-binary.watsup:947.5-947.44 + ;; A-binary.watsup:954.5-954.44 prod {0xFD `%`_u32(235):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), PMAX_vbinop_) - ;; A-binary.watsup:951.5-951.43 + ;; A-binary.watsup:955.5-955.51 + prod {0xFD `%`_u32(269):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:956.5-956.51 + prod {0xFD `%`_u32(270):Bu32} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:960.5-960.53 + prod {0xFD `%`_u32(261):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:961.5-961.54 + prod {0xFD `%`_u32(262):Bu32} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:965.5-965.43 prod {0xFD `%`_u32(116):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), CEIL_vunop_) - ;; A-binary.watsup:952.5-952.44 + ;; A-binary.watsup:966.5-966.44 prod {0xFD `%`_u32(117):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), FLOOR_vunop_) - ;; A-binary.watsup:953.5-953.44 + ;; A-binary.watsup:967.5-967.44 prod {0xFD `%`_u32(122):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_vunop_) - ;; A-binary.watsup:954.5-954.46 + ;; A-binary.watsup:968.5-968.46 prod {0xFD `%`_u32(148):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEAREST_vunop_) - ;; A-binary.watsup:955.5-955.42 + ;; A-binary.watsup:969.5-969.42 prod {0xFD `%`_u32(236):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ABS_vunop_) - ;; A-binary.watsup:956.5-956.42 + ;; A-binary.watsup:970.5-970.42 prod {0xFD `%`_u32(237):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), NEG_vunop_) - ;; A-binary.watsup:957.5-957.43 + ;; A-binary.watsup:971.5-971.43 prod {0xFD `%`_u32(239):Bu32} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SQRT_vunop_) - ;; A-binary.watsup:961.5-961.43 + ;; A-binary.watsup:975.5-975.43 prod {0xFD `%`_u32(240):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), ADD_vbinop_) - ;; A-binary.watsup:962.5-962.43 + ;; A-binary.watsup:976.5-976.43 prod {0xFD `%`_u32(241):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), SUB_vbinop_) - ;; A-binary.watsup:963.5-963.43 + ;; A-binary.watsup:977.5-977.43 prod {0xFD `%`_u32(242):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MUL_vbinop_) - ;; A-binary.watsup:964.5-964.43 + ;; A-binary.watsup:978.5-978.43 prod {0xFD `%`_u32(243):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), DIV_vbinop_) - ;; A-binary.watsup:965.5-965.43 + ;; A-binary.watsup:979.5-979.43 prod {0xFD `%`_u32(244):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MIN_vbinop_) - ;; A-binary.watsup:966.5-966.43 + ;; A-binary.watsup:980.5-980.43 prod {0xFD `%`_u32(245):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), MAX_vbinop_) - ;; A-binary.watsup:967.5-967.44 + ;; A-binary.watsup:981.5-981.44 prod {0xFD `%`_u32(246):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMIN_vbinop_) - ;; A-binary.watsup:968.5-968.44 + ;; A-binary.watsup:982.5-982.44 prod {0xFD `%`_u32(247):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), PMAX_vbinop_) - ;; A-binary.watsup:972.5-972.61 + ;; A-binary.watsup:983.5-983.51 + prod {0xFD `%`_u32(271):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MIN_vbinop_) + ;; A-binary.watsup:984.5-984.51 + prod {0xFD `%`_u32(272):Bu32} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MAX_vbinop_) + ;; A-binary.watsup:988.5-988.53 + prod {0xFD `%`_u32(263):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_MADD_vternop_) + ;; A-binary.watsup:989.5-989.54 + prod {0xFD `%`_u32(264):Bu32} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_NMADD_vternop_) + ;; A-binary.watsup:993.5-993.61 prod {0xFD `%`_u32(94):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), DEMOTE_vcvtop__, ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:973.5-973.61 + ;; A-binary.watsup:994.5-994.61 prod {0xFD `%`_u32(95):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(F32_lanetype, `%`_dim(4)), PROMOTE_vcvtop__, ?(LOW_half__), ?()) - ;; A-binary.watsup:974.5-974.64 + ;; A-binary.watsup:995.5-995.64 prod {0xFD `%`_u32(248):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:975.5-975.64 + ;; A-binary.watsup:996.5-996.64 prod {0xFD `%`_u32(249):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:976.5-976.62 + ;; A-binary.watsup:997.5-997.62 prod {0xFD `%`_u32(250):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(), ?()) - ;; A-binary.watsup:977.5-977.62 + ;; A-binary.watsup:998.5-998.62 prod {0xFD `%`_u32(251):Bu32} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(), ?()) - ;; A-binary.watsup:978.5-978.69 + ;; A-binary.watsup:999.5-999.69 prod {0xFD `%`_u32(252):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:979.5-979.69 + ;; A-binary.watsup:1000.5-1000.69 prod {0xFD `%`_u32(253):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), TRUNC_SAT_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) - ;; A-binary.watsup:980.5-980.66 + ;; A-binary.watsup:1001.5-1001.66 prod {0xFD `%`_u32(254):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(S_sx), ?(LOW_half__), ?()) - ;; A-binary.watsup:981.5-981.66 + ;; A-binary.watsup:1002.5-1002.66 prod {0xFD `%`_u32(255):Bu32} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2)), `%X%`_shape(I32_lanetype, `%`_dim(4)), CONVERT_vcvtop__(U_sx), ?(LOW_half__), ?()) + ;; A-binary.watsup:1003.5-1003.68 + prod {0xFD `%`_u32(257):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?()) + ;; A-binary.watsup:1004.5-1004.68 + prod {0xFD `%`_u32(258):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F32_lanetype, `%`_dim(4)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?()) + ;; A-binary.watsup:1005.5-1005.73 + prod {0xFD `%`_u32(259):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(S_sx), ?(), ?(ZERO_zero__)) + ;; A-binary.watsup:1006.5-1006.73 + prod {0xFD `%`_u32(260):Bu32} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4)), `%X%`_shape(F64_lanetype, `%`_dim(2)), RELAXED_TRUNC_vcvtop__(U_sx), ?(), ?(ZERO_zero__)) } ;; A-binary.watsup diff --git a/spectec/test-prose/TEST.md b/spectec/test-prose/TEST.md index aab2bc92d7..f159339c85 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md @@ -11592,7 +11592,7 @@ watsup 0.4 generator == Translating to AL... == Prose Generation... 6-typing.watsup:195.10-195.32: if_expr_to_instrs: Yet `$before(typeuse, x, i)` -6-typing.watsup:1380.9-1380.30: if_expr_to_instrs: Yet `$disjoint_(syntax name, nm*{nm <- `nm*`})` +6-typing.watsup:1386.9-1386.30: if_expr_to_instrs: Yet `$disjoint_(syntax name, nm*{nm <- `nm*`})` * :math:`{\mathit{numtype}}` is valid. @@ -12903,6 +12903,9 @@ watsup 0.4 generator * :math:`({\mathit{sh}} {.} {\mathit{vbinop}})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. +* :math:`({\mathit{sh}} {.} {\mathit{vternop}})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. + + * :math:`({\mathit{sh}} {.} {\mathit{vtestop}})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{i{\scriptstyle 32}})`. @@ -12915,7 +12918,7 @@ watsup 0.4 generator * :math:`({\mathit{sh}}{.}\mathsf{bitmask})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{i{\scriptstyle 32}})`. -* :math:`({\mathit{sh}}{.}\mathsf{swizzle})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. +* :math:`({\mathit{sh}} {.} {\mathit{vswizzlop}})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. * :math:`({\mathit{sh}}{.}\mathsf{shuffle}~{i^\ast})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})` if and only if: @@ -12947,6 +12950,9 @@ watsup 0.4 generator * :math:`({\mathit{sh}}_1 {.} {{\mathit{vextbinop}}}{\mathsf{\_}}{{\mathit{sh}}_2})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. +* :math:`({\mathit{sh}}_1 {.} {{\mathit{vextternop}}}{\mathsf{\_}}{{\mathit{sh}}_2})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. + + * :math:`({{\mathit{sh}}_1{.}\mathsf{narrow}}{\mathsf{\_}}{{\mathit{sh}}_2}{\mathsf{\_}}{{\mathit{sx}}})` is valid with type :math:`(\mathsf{v{\scriptstyle 128}}~\mathsf{v{\scriptstyle 128}}~{\rightarrow}_{\epsilon}\,\mathsf{v{\scriptstyle 128}})`. @@ -14356,23 +14362,42 @@ watsup 0.4 generator #. Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. -:math:`{{\mathsf{i}}{N}}{\mathsf{x}}{M} {.} \mathsf{all\_true}` -............................................................... +:math:`{\mathit{sh}} {.} {\mathit{vternop}}` +............................................ 1. Assert: Due to validation, a value of value type :math:`\mathsf{v{\scriptstyle 128}}` is on the top of the stack. -#. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` from the stack. +#. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_3)` from the stack. -#. Let :math:`{{\mathit{ci}}_1^\ast}` be :math:`{{\mathrm{lanes}}}_{({{\mathsf{i}}{N}}{\mathsf{x}}{M})}(c)`. +#. Assert: Due to validation, a value of value type :math:`\mathsf{v{\scriptstyle 128}}` is on the top of the stack. -#. If for all :math:`{({\mathit{ci}}_1)^\ast}`, :math:`{\mathit{ci}}_1` is not :math:`0`, then: +#. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_2)` from the stack. - a. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~1)` to the stack. +#. Assert: Due to validation, a value of value type :math:`\mathsf{v{\scriptstyle 128}}` is on the top of the stack. -#. Else: +#. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)` from the stack. - a. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~0)` to the stack. +#. If :math:`{|{{\mathit{vternop}}}{{}_{{\mathit{sh}}}(c_1, c_2, c_3)}|}` is less than or equal to :math:`0`, then: + + a. Trap. + +#. Let :math:`c` be an element of :math:`{{\mathit{vternop}}}{{}_{{\mathit{sh}}}(c_1, c_2, c_3)}`. + +#. Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. + + +:math:`{\mathit{sh}} {.} {\mathit{vtestop}}` +............................................ + + +1. Assert: Due to validation, a value of value type :math:`\mathsf{v{\scriptstyle 128}}` is on the top of the stack. + +#. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)` from the stack. + +#. Let :math:`i` be :math:`{{\mathit{vtestop}}}{{}_{{\mathit{sh}}}(c_1)}`. + +#. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~i)` to the stack. :math:`{\mathit{sh}} {.} {\mathit{vrelop}}` @@ -14426,8 +14451,8 @@ watsup 0.4 generator #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{\mathit{ci}})` to the stack. -:math:`{{\mathsf{i}}{N}}{\mathsf{x}}{M}{.}\mathsf{swizzle}` -........................................................... +:math:`{\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M} {.} {\mathit{vswizzlop\_u{\kern-0.1em\scriptstyle 0}}}` +.......................................................................................................... 1. Assert: Due to validation, a value of value type :math:`\mathsf{v{\scriptstyle 128}}` is on the top of the stack. @@ -14438,17 +14463,29 @@ watsup 0.4 generator #. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)` from the stack. -#. Let :math:`{{c'}^\ast}` be :math:`{{\mathrm{lanes}}}_{({{\mathsf{i}}{N}}{\mathsf{x}}{M})}(c_1)~{0^{256 - M}}`. +#. If :math:`{\mathit{vswizzlop\_u{\kern-0.1em\scriptstyle 0}}}` is :math:`\mathsf{swizzle}`, then: -#. Let :math:`{{\mathit{ci}}^\ast}` be :math:`{{\mathrm{lanes}}}_{({{\mathsf{i}}{N}}{\mathsf{x}}{M})}(c_2)`. + a. Let :math:`{{c'}^\ast}` be :math:`{{\mathrm{lanes}}}_{({\mathsf{i{\scriptstyle 8}}}{\mathsf{x}}{M})}(c_1)~{0^{256 - M}}`. -#. Assert: Due to validation, for all :math:`{(k)^{k_ [] [V128]). +Instr_ok/vternop +- the instr (VTERNOP sh vternop) is valid with the instruction type ([V128, V128, V128] ->_ [] [V128]). + Instr_ok/vtestop - the instr (VTESTOP sh vtestop) is valid with the instruction type ([V128] ->_ [] [I32]). @@ -22068,8 +22372,8 @@ Instr_ok/vshiftop Instr_ok/vbitmask - the instr (VBITMASK sh) is valid with the instruction type ([V128] ->_ [] [I32]). -Instr_ok/vswizzle -- the instr (VSWIZZLE sh) is valid with the instruction type ([V128, V128] ->_ [] [V128]). +Instr_ok/vswizzlop +- the instr (VSWIZZLOP sh vswizzlop) is valid with the instruction type ([V128, V128] ->_ [] [V128]). Instr_ok/vshuffle - the instr (VSHUFFLE sh i*) is valid with the instruction type ([V128, V128] ->_ [] [V128]) if and only if: @@ -22093,6 +22397,9 @@ Instr_ok/vextunop Instr_ok/vextbinop - the instr (VEXTBINOP sh_1 sh_2 vextbinop) is valid with the instruction type ([V128, V128] ->_ [] [V128]). +Instr_ok/vextternop +- the instr (VEXTTERNOP sh_1 sh_2 vextternop) is valid with the instruction type ([V128, V128, V128] ->_ [] [V128]). + Instr_ok/vnarrow - the instr (VNARROW sh_1 sh_2 sx) is valid with the instruction type ([V128, V128] ->_ [] [V128]). @@ -22851,14 +23158,23 @@ Step_pure/vbinop sh vbinop 6. Let c be an element of $vbinop_(sh, vbinop, c_1, c_2). 7. Push the value (V128.CONST c) to the stack. -Step_pure/vtestop (Jnn X M) ALL_TRUE +Step_pure/vternop sh vternop 1. Assert: Due to validation, a value of value type V128 is on the top of the stack. -2. Pop the value (V128.CONST c) from the stack. -3. Let ci_1* be $lanes_((Jnn X M), c). -4. If (ci_1 is not 0)*, then: - a. Push the value (I32.CONST 1) to the stack. -5. Else: - a. Push the value (I32.CONST 0) to the stack. +2. Pop the value (V128.CONST c_3) from the stack. +3. Assert: Due to validation, a value of value type V128 is on the top of the stack. +4. Pop the value (V128.CONST c_2) from the stack. +5. Assert: Due to validation, a value of value type V128 is on the top of the stack. +6. Pop the value (V128.CONST c_1) from the stack. +7. If (|$vternop_(sh, vternop, c_1, c_2, c_3)| ≤ 0), then: + a. Trap. +8. Let c be an element of $vternop_(sh, vternop, c_1, c_2, c_3). +9. Push the value (V128.CONST c) to the stack. + +Step_pure/vtestop sh vtestop +1. Assert: Due to validation, a value of value type V128 is on the top of the stack. +2. Pop the value (V128.CONST c_1) from the stack. +3. Let i be $vtestop_(sh, vtestop, c_1). +4. Push the value (I32.CONST i) to the stack. Step_pure/vrelop sh vrelop 1. Assert: Due to validation, a value of value type V128 is on the top of the stack. @@ -22884,17 +23200,23 @@ Step_pure/vbitmask (Jnn X M) 4. Let ci be $ibits__1^-1(32, $ilt_($lsize(Jnn), S, ci_1, 0)*). 5. Push the value (I32.CONST ci) to the stack. -Step_pure/vswizzle (Pnn X M) +Step_pure/vswizzlop (I8 X M) vswizzlop__u0 1. Assert: Due to validation, a value of value type V128 is on the top of the stack. 2. Pop the value (V128.CONST c_2) from the stack. 3. Assert: Due to validation, a value of value type V128 is on the top of the stack. 4. Pop the value (V128.CONST c_1) from the stack. -5. Let c'* be $lanes_((Pnn X M), c_1) :: 0^(256 - M). -6. Let ci* be $lanes_((Pnn X M), c_2). -7. Assert: Due to validation, (ci*[k] < |c'*|)^(k ((2 ^ N) - 1)), then: + a. Return ((2 ^ N) - 1). +3. Return i. + +sat_s_ N i +1. If (i < (- (2 ^ (N - 1)))), then: + a. Return (- (2 ^ (N - 1))). +2. If (i > ((2 ^ (N - 1)) - 1)), then: + a. Return ((2 ^ (N - 1)) - 1). +3. Return i. + +invibytes_ N b* +1. Let n be $ibytes__1^-1(N, b*). +2. Return n. + +invfbytes_ N b* +1. Let p be $fbytes__1^-1(N, b*). +2. Return p. + +lpacknum_ lanetype_u0 c +1. If the type of lanetype_u0 is numtype, then: + a. Return c. +2. Assert: Due to validation, the type of lanetype_u0 is packtype. +3. Let packtype be lanetype_u0. +4. Return $wrap__($size($lunpack(packtype)), $psize(packtype), c). + +lunpacknum_ lanetype_u0 c +1. If the type of lanetype_u0 is numtype, then: + a. Return c. +2. Assert: Due to validation, the type of lanetype_u0 is packtype. +3. Let packtype be lanetype_u0. +4. Return $extend__($psize(packtype), $size($lunpack(packtype)), U, c). + +cpacknum_ storagetype_u0 c +1. If the type of storagetype_u0 is consttype, then: + a. Return c. +2. Assert: Due to validation, the type of storagetype_u0 is packtype. +3. Let packtype be storagetype_u0. +4. Return $wrap__($size($lunpack(packtype)), $psize(packtype), c). + +cunpacknum_ storagetype_u0 c +1. If the type of storagetype_u0 is consttype, then: + a. Return c. +2. Assert: Due to validation, the type of storagetype_u0 is packtype. +3. Let packtype be storagetype_u0. +4. Return $extend__($psize(packtype), $size($lunpack(packtype)), U, c). + +invlanes_ sh c* +1. Let vc be $lanes__1^-1(sh, c*). +2. Return vc. + +half__ (lanetype_u1 X M_1) (lanetype_u2 X M_2) half___u0 i j +1. If (the type of lanetype_u1 is Jnn and the type of lanetype_u2 is Jnn), then: + a. If (half___u0 is LOW), then: + 1) Return i. + b. If (half___u0 is HIGH), then: + 1) Return j. +2. Assert: Due to validation, the type of lanetype_u2 is Fnn. +3. Assert: Due to validation, (half___u0 is LOW). +4. Return i. + unop_ numtype_u1 unop__u0 num__u3 1. If the type of numtype_u1 is Inn, then: a. Let Inn be numtype_u1. @@ -25271,56 +25686,6 @@ cvtop__ numtype_u1 numtype_u4 cvtop___u0 num__u3 12. Assert: Due to validation, ($size(Fnn_1) is $size(Inn_2)). 13. Return [$reinterpret__(Fnn_1, Inn_2, fN_1)]. -invibytes_ N b* -1. Let n be $ibytes__1^-1(N, b*). -2. Return n. - -invfbytes_ N b* -1. Let p be $fbytes__1^-1(N, b*). -2. Return p. - -lpacknum_ lanetype_u0 c -1. If the type of lanetype_u0 is numtype, then: - a. Return c. -2. Assert: Due to validation, the type of lanetype_u0 is packtype. -3. Let packtype be lanetype_u0. -4. Return $wrap__($size($lunpack(packtype)), $psize(packtype), c). - -lunpacknum_ lanetype_u0 c -1. If the type of lanetype_u0 is numtype, then: - a. Return c. -2. Assert: Due to validation, the type of lanetype_u0 is packtype. -3. Let packtype be lanetype_u0. -4. Return $extend__($psize(packtype), $size($lunpack(packtype)), U, c). - -cpacknum_ storagetype_u0 c -1. If the type of storagetype_u0 is consttype, then: - a. Return c. -2. Assert: Due to validation, the type of storagetype_u0 is packtype. -3. Let packtype be storagetype_u0. -4. Return $wrap__($size($lunpack(packtype)), $psize(packtype), c). - -cunpacknum_ storagetype_u0 c -1. If the type of storagetype_u0 is consttype, then: - a. Return c. -2. Assert: Due to validation, the type of storagetype_u0 is packtype. -3. Let packtype be storagetype_u0. -4. Return $extend__($psize(packtype), $size($lunpack(packtype)), U, c). - -invlanes_ sh c* -1. Let vc be $lanes__1^-1(sh, c*). -2. Return vc. - -half__ (lanetype_u1 X M_1) (lanetype_u2 X M_2) half___u0 i j -1. If (the type of lanetype_u1 is Jnn and the type of lanetype_u2 is Jnn), then: - a. If (half___u0 is LOW), then: - 1) Return i. - b. If (half___u0 is HIGH), then: - 1) Return j. -2. Assert: Due to validation, the type of lanetype_u2 is Fnn. -3. Assert: Due to validation, (half___u0 is LOW). -4. Return i. - vvunop_ V128 NOT v128 1. Return [$inot_($vsize(V128), v128)]. @@ -25348,30 +25713,30 @@ ivunop_ (Jnn X M) $f_ vN_1 3. Return [$invlanes_((Jnn X M), c*)]. vunop_ (lanetype_u1 X M) vunop__u0 vN_1 -1. If the type of lanetype_u1 is Jnn, then: - a. Let Jnn be lanetype_u1. +1. If the type of lanetype_u1 is Fnn, then: + a. Let Fnn be lanetype_u1. b. If (vunop__u0 is ABS), then: - 1) Return $ivunop_((Jnn X M), $iabs_, vN_1). + 1) Return $fvunop_((Fnn X M), $fabs_, vN_1). c. If (vunop__u0 is NEG), then: - 1) Return $ivunop_((Jnn X M), $ineg_, vN_1). - d. If (vunop__u0 is POPCNT), then: - 1) Return $ivunop_((Jnn X M), $ipopcnt_, vN_1). -2. Assert: Due to validation, the type of lanetype_u1 is Fnn. -3. Let Fnn be lanetype_u1. + 1) Return $fvunop_((Fnn X M), $fneg_, vN_1). + d. If (vunop__u0 is SQRT), then: + 1) Return $fvunop_((Fnn X M), $fsqrt_, vN_1). + e. If (vunop__u0 is CEIL), then: + 1) Return $fvunop_((Fnn X M), $fceil_, vN_1). + f. If (vunop__u0 is FLOOR), then: + 1) Return $fvunop_((Fnn X M), $ffloor_, vN_1). + g. If (vunop__u0 is TRUNC), then: + 1) Return $fvunop_((Fnn X M), $ftrunc_, vN_1). + h. If (vunop__u0 is NEAREST), then: + 1) Return $fvunop_((Fnn X M), $fnearest_, vN_1). +2. Assert: Due to validation, the type of lanetype_u1 is Jnn. +3. Let Jnn be lanetype_u1. 4. If (vunop__u0 is ABS), then: - a. Return $fvunop_((Fnn X M), $fabs_, vN_1). + a. Return $ivunop_((Jnn X M), $iabs_, vN_1). 5. If (vunop__u0 is NEG), then: - a. Return $fvunop_((Fnn X M), $fneg_, vN_1). -6. If (vunop__u0 is SQRT), then: - a. Return $fvunop_((Fnn X M), $fsqrt_, vN_1). -7. If (vunop__u0 is CEIL), then: - a. Return $fvunop_((Fnn X M), $fceil_, vN_1). -8. If (vunop__u0 is FLOOR), then: - a. Return $fvunop_((Fnn X M), $ffloor_, vN_1). -9. If (vunop__u0 is TRUNC), then: - a. Return $fvunop_((Fnn X M), $ftrunc_, vN_1). -10. Assert: Due to validation, (vunop__u0 is NEAREST). -11. Return $fvunop_((Fnn X M), $fnearest_, vN_1). + a. Return $ivunop_((Jnn X M), $ineg_, vN_1). +6. Assert: Due to validation, (vunop__u0 is POPCNT). +7. Return $ivunop_((Jnn X M), $ipopcnt_, vN_1). fvbinop_ (Fnn X M) $f_ vN_1 vN_2 1. Let c_1* be $lanes_((Fnn X M), vN_1). @@ -25391,6 +25756,12 @@ ivbinopsx_ (Jnn X M) $f_ sx vN_1 vN_2 3. Let c* be $f_($lsizenn(Jnn), sx, c_1, c_2)*. 4. Return [$invlanes_((Jnn X M), c*)]. +ivbinopsxnd_ (Jnn X M) $f_ sx vN_1 vN_2 +1. Let c_1* be $lanes_((Jnn X M), vN_1). +2. Let c_2* be $lanes_((Jnn X M), vN_2). +3. Let c** be $setproduct_(lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn(Jnn), sx, c_1, c_2)*). +4. Return $invlanes_((Jnn X M), c*)*. + vbinop_ (lanetype_u1 X M) vbinop__u0 vN_1 vN_2 1. If the type of lanetype_u1 is Jnn, then: a. Let Jnn be lanetype_u1. @@ -25416,6 +25787,8 @@ vbinop_ (lanetype_u1 X M) vbinop__u0 vN_1 vN_2 1) Return $ivbinopsx_((Jnn X M), $iavgr_, U, vN_1, vN_2). j. If (vbinop__u0 is (Q15MULR_SATS)), then: 1) Return $ivbinopsx_((Jnn X M), $iq15mulr_sat_, S, vN_1, vN_2). + k. If (vbinop__u0 is (RELAXED_Q15MULRS)), then: + 1) Return $ivbinopsxnd_((Jnn X M), $irelaxed_q15mulr_, S, vN_1, vN_2). 2. Assert: Due to validation, the type of lanetype_u1 is Fnn. 3. Let Fnn be lanetype_u1. 4. If (vbinop__u0 is ADD), then: @@ -25432,8 +25805,46 @@ vbinop_ (lanetype_u1 X M) vbinop__u0 vN_1 vN_2 a. Return $fvbinop_((Fnn X M), $fmax_, vN_1, vN_2). 10. If (vbinop__u0 is PMIN), then: a. Return $fvbinop_((Fnn X M), $fpmin_, vN_1, vN_2). -11. Assert: Due to validation, (vbinop__u0 is PMAX). -12. Return $fvbinop_((Fnn X M), $fpmax_, vN_1, vN_2). +11. If (vbinop__u0 is PMAX), then: + a. Return $fvbinop_((Fnn X M), $fpmax_, vN_1, vN_2). +12. If (vbinop__u0 is RELAXED_MIN), then: + a. Return $fvbinop_((Fnn X M), $frelaxed_min_, vN_1, vN_2). +13. Assert: Due to validation, (vbinop__u0 is RELAXED_MAX). +14. Return $fvbinop_((Fnn X M), $frelaxed_max_, vN_1, vN_2). + +fvternop_ (Fnn X M) $f_ vN_1 vN_2 vN_3 +1. Let c_1* be $lanes_((Fnn X M), vN_1). +2. Let c_2* be $lanes_((Fnn X M), vN_2). +3. Let c_3* be $lanes_((Fnn X M), vN_3). +4. Let c** be $setproduct_(lane_((Fnn : Fnn <: lanetype)), $f_($sizenn(Fnn), c_1, c_2, c_3)*). +5. Return $invlanes_((Fnn X M), c*)*. + +ivternopnd_ (Jnn X M) $f_ vN_1 vN_2 vN_3 +1. Let c_1* be $lanes_((Jnn X M), vN_1). +2. Let c_2* be $lanes_((Jnn X M), vN_2). +3. Let c_3* be $lanes_((Jnn X M), vN_3). +4. Let c** be $setproduct_(lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn(Jnn), c_1, c_2, c_3)*). +5. Return $invlanes_((Jnn X M), c*)*. + +vternop_ (lanetype_u0 X M) vternop__u2 vN_1 vN_2 vN_3 +1. If the type of lanetype_u0 is Jnn, then: + a. Let Jnn be lanetype_u0. + b. If (vternop__u2 is RELAXED_LANESELECT), then: + 1) Return $ivternopnd_((Jnn X M), $irelaxed_laneselect_, vN_1, vN_2, vN_3). +2. Assert: Due to validation, the type of lanetype_u0 is Fnn. +3. Let Fnn be lanetype_u0. +4. If (vternop__u2 is RELAXED_MADD), then: + a. Return $fvternop_((Fnn X M), $frelaxed_madd_, vN_1, vN_2, vN_3). +5. Assert: Due to validation, (vternop__u2 is RELAXED_NMADD). +6. Return $fvternop_((Fnn X M), $frelaxed_nmadd_, vN_1, vN_2, vN_3). + +ivtestop_ (Jnn X M) $f_ vN_1 +1. Let c_1* be $lanes_((Jnn X M), vN_1). +2. Let c* be $f_($lsizenn(Jnn), c_1)*. +3. Return $prod(c*). + +vtestop_ (Jnn X M) ALL_TRUE vN_1 +1. Return $ivtestop_((Jnn X M), $inez_, vN_1). fvrelop_ (Fnn X M) $f_ vN_1 vN_2 1. Let c_1* be $lanes_((Fnn X M), vN_1). @@ -25515,6 +25926,11 @@ vcvtop__ (lanetype_u3 X M_1) (lanetype_u0 X M_2) vcvtop___u2 lane__u5 2) Let fN_1 be lane__u5. 3) Let iN_2? be $trunc_sat__($lsizenn1(Fnn_1), $lsizenn2(Inn_2), sx, fN_1). 4) Return $list_(lane_((Inn_2 : Inn <: lanetype)), iN_2?). + c. If vcvtop___u2 is of the case RELAXED_TRUNC, then: + 1) Let (RELAXED_TRUNC sx) be vcvtop___u2. + 2) Let fN_1 be lane__u5. + 3) Let iN_2? be $relaxed_trunc__($lsizenn1(Fnn_1), $lsizenn2(Inn_2), sx, fN_1). + 4) Return $list_(lane_((Inn_2 : Inn <: lanetype)), iN_2?). 5. Assert: Due to validation, the type of lanetype_u0 is Fnn. 6. Let Fnn_2 be lanetype_u0. 7. Let fN_1 be lane__u5. @@ -25538,12 +25954,38 @@ vextbinop__ (Jnn_1 X M_1) (Jnn_2 X M_2) vextbinop___u0 c_1 c_2 c. Let ci_2* be $lanes_((Jnn_1 X M_1), c_2)[$half__((Jnn_1 X M_1), (Jnn_2 X M_2), half, 0, M_2) : M_2]. d. Let c be $invlanes_((Jnn_2 X M_2), $imul_($lsizenn2(Jnn_2), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, ci_1), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, ci_2))*). e. Return c. -2. Assert: Due to validation, (vextbinop___u0 is (DOTS)). -3. Let ci_1* be $lanes_((Jnn_1 X M_1), c_1). -4. Let ci_2* be $lanes_((Jnn_1 X M_1), c_2). -5. Let [cj_1, cj_2]* be $concat__1^-1(iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), $imul_($lsizenn2(Jnn_2), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_2))*). -6. Let c be $invlanes_((Jnn_2 X M_2), $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*). -7. Return c. +2. If (vextbinop___u0 is (DOTS)), then: + a. Let ci_1* be $lanes_((Jnn_1 X M_1), c_1). + b. Let ci_2* be $lanes_((Jnn_1 X M_1), c_2). + c. Let ci'_1* be $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1)*. + d. Let ci'_2* be $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_2)*. + e. Let [cj_1, cj_2]* be $concat__1^-1(iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), $imul_($lsizenn2(Jnn_2), ci'_1, ci'_2)*). + f. Let c be $invlanes_((Jnn_2 X M_2), $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*). + g. Return c. +3. Assert: Due to validation, (vextbinop___u0 is (RELAXED_DOTS)). +4. Let ci_1* be $lanes_((Jnn_1 X M_1), c_1). +5. Let ci_2* be $lanes_((Jnn_1 X M_1), c_2). +6. Let ci'_1* be $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1)*. +7. Let ci'_2* be $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), $relaxed2($R_idot(), sx, S, U), ci_2)*. +8. Let [cj_1, cj_2]* be $concat__1^-1(iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), $imul_($lsizenn2(Jnn_2), ci'_1, ci'_2)*). +9. Let c be $invlanes_((Jnn_2 X M_2), $iadd_sat_($lsizenn2(Jnn_2), S, cj_1, cj_2)*). +10. Return c. + +vextternop__ (Jnn_1 X M_1) (Jnn_2 X M_2) (RELAXED_DOT_ADDS) c_1 c_2 c_3 +1. Let ci_3* be $lanes_((Jnn_2 X M_2), c_3). +2. Let ci_1* be $lanes_((Jnn_1 X M_1), c_1). +3. Let ci_2* be $lanes_((Jnn_1 X M_1), c_2). +4. Assert: Due to validation, the type of $lsizenn^-1((2 · $lsizenn1(Jnn_1))) is Jnn. +5. Let Jnn be $lsizenn^-1((2 · $lsizenn1(Jnn_1))). +6. Let ci'_1* be $extend__($lsizenn1(Jnn_1), $lsizenn(Jnn), S, ci_1)*. +7. Let ci'_2* be $extend__($lsizenn1(Jnn_1), $lsizenn(Jnn), $relaxed2($R_idot(), sx, S, U), ci_2)*. +8. Let [cj_1, cj_2]* be $concat__1^-1(iN($lsizenn((Jnn : Jnn <: lanetype))), $imul_($lsizenn(Jnn), ci'_1, ci'_2)*). +9. Let [ck_1, ck_2]* be $concat__1^-1(iN($lsizenn((Jnn : Jnn <: lanetype))), $iadd_sat_($lsizenn(Jnn), S, cj_1, cj_2)*). +10. Let ck'_1* be $extend__($lsizenn(Jnn), $lsizenn2(Jnn_2), S, ck_1)*. +11. Let ck'_2* be $extend__($lsizenn(Jnn), $lsizenn2(Jnn_2), S, ck_2)*. +12. Let ck* be $iadd_($lsizenn2(Jnn_2), ck'_1, ck'_2)*. +13. Let c be $invlanes_((Jnn_2 X M_2), $iadd_($lsizenn2(Jnn_2), ck, ci_3)*). +14. Return c. vshiftop_ (Jnn X M) vshiftop__u0 lane n 1. If (vshiftop__u0 is SHL), then: @@ -25552,6 +25994,11 @@ vshiftop_ (Jnn X M) vshiftop__u0 lane n 3. Let (SHR sx) be vshiftop__u0. 4. Return $ishr_($lsizenn(Jnn), sx, lane, n). +fvtestop_ (Fnn X M) $f_ vN_1 +1. Let c_1* be $lanes_((Fnn X M), vN_1). +2. Let c* be $f_($sizenn(Fnn), c_1)*. +3. Return $prod(c*). + inst_valtype moduleinst t 1. Let dt* be moduleinst.TYPES. 2. Return $subst_all_valtype(t, dt*). diff --git a/spectec/test-prose/doc/exec/instructions-in.rst b/spectec/test-prose/doc/exec/instructions-in.rst index 4e28d6ed50..8cfbe21fd9 100644 --- a/spectec/test-prose/doc/exec/instructions-in.rst +++ b/spectec/test-prose/doc/exec/instructions-in.rst @@ -151,7 +151,7 @@ $${rule-prose: Step_pure/vtestop} \ -$${rule+: Step_pure/vtestop-*} +$${rule+: Step_pure/vtestop} .. _exec-vbitmask: diff --git a/spectec/test-splice/TEST.md b/spectec/test-splice/TEST.md index db5d25160a..6ca7ab9f00 100644 --- a/spectec/test-splice/TEST.md +++ b/spectec/test-splice/TEST.md @@ -8,7 +8,7 @@ $ (../src/exe-watsup/main.exe ../spec/wasm-3.0/*.watsup -l --splice-latex -p spe == Translating to AL... == Prose Generation... ../spec/wasm-3.0/6-typing.watsup:195.10-195.32: if_expr_to_instrs: Yet `$before(typeuse, x, i)` -../spec/wasm-3.0/6-typing.watsup:1380.9-1380.30: if_expr_to_instrs: Yet `$disjoint_(syntax name, nm*{nm <- `nm*`})` +../spec/wasm-3.0/6-typing.watsup:1386.9-1386.30: if_expr_to_instrs: Yet `$disjoint_(syntax name, nm*{nm <- `nm*`})` == Splicing... \documentclass[a4paper]{scrartcl} @@ -435,6 +435,8 @@ warning: syntax `recorddots` was never spliced warning: syntax `rectype` was never spliced warning: syntax `ref` was never spliced warning: syntax `reftype` was never spliced +warning: syntax `relaxed2` was never spliced +warning: syntax `relaxed4` was never spliced warning: syntax `relop_` was never spliced warning: syntax `relop_` was never spliced warning: syntax `result` was never spliced @@ -495,11 +497,15 @@ warning: syntax `vec` was never spliced warning: syntax `vec_` was never spliced warning: syntax `vectype` was never spliced warning: syntax `vextbinop__` was never spliced +warning: syntax `vextternop__` was never spliced warning: syntax `vextunop__` was never spliced warning: syntax `vloadop_` was never spliced warning: syntax `vrelop_` was never spliced warning: syntax `vrelop_` was never spliced warning: syntax `vshiftop_` was never spliced +warning: syntax `vswizzlop_` was never spliced +warning: syntax `vternop_` was never spliced +warning: syntax `vternop_` was never spliced warning: syntax `vtestop_` was never spliced warning: syntax `vunop_` was never spliced warning: syntax `vunop_` was never spliced @@ -616,6 +622,7 @@ warning: grammar `Binstr/vec-ext-i32x4` was never spliced warning: grammar `Binstr/vec-shift-i32x4` was never spliced warning: grammar `Binstr/vec-bin-i32x4` was never spliced warning: grammar `Binstr/vec-extbin-i32x4` was never spliced +warning: grammar `Binstr/vec-exttern-i32x4` was never spliced warning: grammar `Binstr/vec-un-i64x2` was never spliced warning: grammar `Binstr/vec-test-i64x2` was never spliced warning: grammar `Binstr/vec-bitmask-i64x2` was never spliced @@ -626,8 +633,10 @@ warning: grammar `Binstr/vec-rel-i64x2` was never spliced warning: grammar `Binstr/vec-extbin-i64x2` was never spliced warning: grammar `Binstr/vec-un-f32x4` was never spliced warning: grammar `Binstr/vec-bin-f32x4` was never spliced +warning: grammar `Binstr/vec-tern-f32x4` was never spliced warning: grammar `Binstr/vec-un-f64x2` was never spliced warning: grammar `Binstr/vec-bin-f64x2` was never spliced +warning: grammar `Binstr/vec-tern-f64x2` was never spliced warning: grammar `Binstr/vec-cvt` was never spliced warning: grammar `Blabelidx` was never spliced warning: grammar `Blaneidx` was never spliced @@ -831,17 +840,19 @@ warning: rule `Instr_ok/vvternop` was never spliced warning: rule `Instr_ok/vvtestop` was never spliced warning: rule `Instr_ok/vunop` was never spliced warning: rule `Instr_ok/vbinop` was never spliced +warning: rule `Instr_ok/vternop` was never spliced warning: rule `Instr_ok/vtestop` was never spliced warning: rule `Instr_ok/vrelop` was never spliced warning: rule `Instr_ok/vshiftop` was never spliced warning: rule `Instr_ok/vbitmask` was never spliced -warning: rule `Instr_ok/vswizzle` was never spliced +warning: rule `Instr_ok/vswizzlop` was never spliced warning: rule `Instr_ok/vshuffle` was never spliced warning: rule `Instr_ok/vsplat` was never spliced warning: rule `Instr_ok/vextract_lane` was never spliced warning: rule `Instr_ok/vreplace_lane` was never spliced warning: rule `Instr_ok/vextunop` was never spliced warning: rule `Instr_ok/vextbinop` was never spliced +warning: rule `Instr_ok/vextternop` was never spliced warning: rule `Instr_ok/vnarrow` was never spliced warning: rule `Instr_ok/vcvtop` was never spliced warning: rule `Instr_ok/local.get` was never spliced @@ -1006,12 +1017,14 @@ warning: rule `Step_pure/vunop-val` was never spliced warning: rule `Step_pure/vunop-trap` was never spliced warning: rule `Step_pure/vbinop-val` was never spliced warning: rule `Step_pure/vbinop-trap` was never spliced -warning: rule `Step_pure/vtestop-true` was never spliced -warning: rule `Step_pure/vtestop-false` was never spliced +warning: rule `Step_pure/vternop-val` was never spliced +warning: rule `Step_pure/vternop-trap` was never spliced +warning: rule `Step_pure/vtestop` was never spliced warning: rule `Step_pure/vrelop` was never spliced warning: rule `Step_pure/vshiftop` was never spliced warning: rule `Step_pure/vbitmask` was never spliced -warning: rule `Step_pure/vswizzle` was never spliced +warning: rule `Step_pure/vswizzlop-swizzle` was never spliced +warning: rule `Step_pure/vswizzlop-relaxed_swizzle` was never spliced warning: rule `Step_pure/vshuffle` was never spliced warning: rule `Step_pure/vsplat` was never spliced warning: rule `Step_pure/vextract_lane-num` was never spliced @@ -1019,6 +1032,7 @@ warning: rule `Step_pure/vextract_lane-pack` was never spliced warning: rule `Step_pure/vreplace_lane` was never spliced warning: rule `Step_pure/vextunop` was never spliced warning: rule `Step_pure/vextbinop` was never spliced +warning: rule `Step_pure/vextternop` was never spliced warning: rule `Step_pure/vnarrow` was never spliced warning: rule `Step_pure/vcvtop-full` was never spliced warning: rule `Step_pure/vcvtop-half` was never spliced @@ -1170,9 +1184,19 @@ warning: definition `IN` was never spliced warning: definition `JN` was never spliced warning: definition `Ki` was never spliced warning: definition `M` was never spliced +warning: definition `ND` was never spliced warning: definition `NULLEXTERNREF` was never spliced warning: definition `NULLFUNCREF` was never spliced warning: definition `NULLREF` was never spliced +warning: definition `R_fmadd` was never spliced +warning: definition `R_fmax` was never spliced +warning: definition `R_fmin` was never spliced +warning: definition `R_idot` was never spliced +warning: definition `R_iq15mulr` was never spliced +warning: definition `R_laneselect` was never spliced +warning: definition `R_swizzle` was never spliced +warning: definition `R_trunc_s` was never spliced +warning: definition `R_trunc_u` was never spliced warning: definition `STRUCTREF` was never spliced warning: definition `add_arrayinst` was never spliced warning: definition `add_exninst` was never spliced @@ -1312,6 +1336,10 @@ warning: definition `free_typeidx` was never spliced warning: definition `free_typeuse` was never spliced warning: definition `free_valtype` was never spliced warning: definition `free_vectype` was never spliced +warning: definition `frelaxed_madd_` was never spliced +warning: definition `frelaxed_max_` was never spliced +warning: definition `frelaxed_min_` was never spliced +warning: definition `frelaxed_nmadd_` was never spliced warning: definition `fsqrt_` was never spliced warning: definition `fsub_` was never spliced warning: definition `ftrunc_` was never spliced @@ -1322,6 +1350,8 @@ warning: definition `funcsxt` was never spliced warning: definition `funcsxx` was never spliced warning: definition `fvbinop_` was never spliced warning: definition `fvrelop_` was never spliced +warning: definition `fvternop_` was never spliced +warning: definition `fvtestop_` was never spliced warning: definition `fvunop_` was never spliced warning: definition `fzero` was never spliced warning: definition `global` was never spliced @@ -1355,6 +1385,7 @@ warning: definition `imin_` was never spliced warning: definition `imul_` was never spliced warning: definition `ine_` was never spliced warning: definition `ineg_` was never spliced +warning: definition `inez_` was never spliced warning: definition `inot_` was never spliced warning: definition `inst_globaltype` was never spliced warning: definition `inst_memtype` was never spliced @@ -1371,6 +1402,8 @@ warning: definition `invsigned_` was never spliced warning: definition `ior_` was never spliced warning: definition `ipopcnt_` was never spliced warning: definition `iq15mulr_sat_` was never spliced +warning: definition `irelaxed_laneselect_` was never spliced +warning: definition `irelaxed_q15mulr_` was never spliced warning: definition `irem_` was never spliced warning: definition `irotl_` was never spliced warning: definition `irotr_` was never spliced @@ -1381,8 +1414,11 @@ warning: definition `isub_` was never spliced warning: definition `isub_sat_` was never spliced warning: definition `ivbinop_` was never spliced warning: definition `ivbinopsx_` was never spliced +warning: definition `ivbinopsxnd_` was never spliced warning: definition `ivrelop_` was never spliced warning: definition `ivrelopsx_` was never spliced +warning: definition `ivternopnd_` was never spliced +warning: definition `ivtestop_` was never spliced warning: definition `ivunop_` was never spliced warning: definition `ixor_` was never spliced warning: definition `lanes_` was never spliced @@ -1409,16 +1445,22 @@ warning: definition `nbytes_` was never spliced warning: definition `nunpack` was never spliced warning: definition `opt_` was never spliced warning: definition `packfield_` was never spliced +warning: definition `prod` was never spliced warning: definition `promote__` was never spliced warning: definition `psize` was never spliced warning: definition `psizenn` was never spliced warning: definition `reinterpret__` was never spliced +warning: definition `relaxed2` was never spliced +warning: definition `relaxed4` was never spliced +warning: definition `relaxed_trunc__` was never spliced warning: definition `relop_` was never spliced warning: definition `rolldt` was never spliced warning: definition `rollrt` was never spliced warning: definition `rundata_` was never spliced warning: definition `runelem_` was never spliced warning: definition `s33_to_u32` was never spliced +warning: definition `sat_s_` was never spliced +warning: definition `sat_u_` was never spliced warning: definition `setminus1_` was never spliced warning: definition `setminus_` was never spliced warning: definition `setproduct1_` was never spliced @@ -1490,10 +1532,13 @@ warning: definition `vbinop_` was never spliced warning: definition `vbytes_` was never spliced warning: definition `vcvtop__` was never spliced warning: definition `vextbinop__` was never spliced +warning: definition `vextternop__` was never spliced warning: definition `vextunop__` was never spliced warning: definition `vrelop_` was never spliced warning: definition `vshiftop_` was never spliced warning: definition `vsize` was never spliced +warning: definition `vternop_` was never spliced +warning: definition `vtestop_` was never spliced warning: definition `vunop_` was never spliced warning: definition `vunpack` was never spliced warning: definition `vvbinop_` was never spliced @@ -1627,6 +1672,7 @@ warning: rule prose `Instr_ok/vconst` was never spliced warning: rule prose `Instr_ok/vcvtop` was never spliced warning: rule prose `Instr_ok/vextbinop` was never spliced warning: rule prose `Instr_ok/vextract_lane` was never spliced +warning: rule prose `Instr_ok/vextternop` was never spliced warning: rule prose `Instr_ok/vextunop` was never spliced warning: rule prose `Instr_ok/vload` was never spliced warning: rule prose `Instr_ok/vload_lane` was never spliced @@ -1638,7 +1684,8 @@ warning: rule prose `Instr_ok/vshuffle` was never spliced warning: rule prose `Instr_ok/vsplat` was never spliced warning: rule prose `Instr_ok/vstore` was never spliced warning: rule prose `Instr_ok/vstore_lane` was never spliced -warning: rule prose `Instr_ok/vswizzle` was never spliced +warning: rule prose `Instr_ok/vswizzlop` was never spliced +warning: rule prose `Instr_ok/vternop` was never spliced warning: rule prose `Instr_ok/vtestop` was never spliced warning: rule prose `Instr_ok/vunop` was never spliced warning: rule prose `Instr_ok/vvbinop` was never spliced @@ -1717,6 +1764,7 @@ warning: rule prose `Step_pure/vbitmask` was never spliced warning: rule prose `Step_pure/vcvtop` was never spliced warning: rule prose `Step_pure/vextbinop` was never spliced warning: rule prose `Step_pure/vextract_lane` was never spliced +warning: rule prose `Step_pure/vextternop` was never spliced warning: rule prose `Step_pure/vextunop` was never spliced warning: rule prose `Step_pure/vnarrow` was never spliced warning: rule prose `Step_pure/vrelop` was never spliced @@ -1724,7 +1772,8 @@ warning: rule prose `Step_pure/vreplace_lane` was never spliced warning: rule prose `Step_pure/vshiftop` was never spliced warning: rule prose `Step_pure/vshuffle` was never spliced warning: rule prose `Step_pure/vsplat` was never spliced -warning: rule prose `Step_pure/vswizzle` was never spliced +warning: rule prose `Step_pure/vswizzlop` was never spliced +warning: rule prose `Step_pure/vternop` was never spliced warning: rule prose `Step_pure/vtestop` was never spliced warning: rule prose `Step_pure/vunop` was never spliced warning: rule prose `Step_pure/vvbinop` was never spliced @@ -1919,6 +1968,8 @@ warning: definition prose `funcsxt` was never spliced warning: definition prose `funcsxx` was never spliced warning: definition prose `fvbinop_` was never spliced warning: definition prose `fvrelop_` was never spliced +warning: definition prose `fvternop_` was never spliced +warning: definition prose `fvtestop_` was never spliced warning: definition prose `fvunop_` was never spliced warning: definition prose `fzero` was never spliced warning: definition prose `global` was never spliced @@ -1942,8 +1993,11 @@ warning: definition prose `invoke` was never spliced warning: definition prose `invsigned_` was never spliced warning: definition prose `ivbinop_` was never spliced warning: definition prose `ivbinopsx_` was never spliced +warning: definition prose `ivbinopsxnd_` was never spliced warning: definition prose `ivrelop_` was never spliced warning: definition prose `ivrelopsx_` was never spliced +warning: definition prose `ivternopnd_` was never spliced +warning: definition prose `ivtestop_` was never spliced warning: definition prose `ivunop_` was never spliced warning: definition prose `lanetype` was never spliced warning: definition prose `list_` was never spliced @@ -1966,13 +2020,18 @@ warning: definition prose `moduleinst` was never spliced warning: definition prose `nunpack` was never spliced warning: definition prose `opt_` was never spliced warning: definition prose `packfield_` was never spliced +warning: definition prose `prod` was never spliced warning: definition prose `psize` was never spliced warning: definition prose `psizenn` was never spliced +warning: definition prose `relaxed2` was never spliced +warning: definition prose `relaxed4` was never spliced warning: definition prose `relop_` was never spliced warning: definition prose `rolldt` was never spliced warning: definition prose `rollrt` was never spliced warning: definition prose `rundata_` was never spliced warning: definition prose `runelem_` was never spliced +warning: definition prose `sat_s_` was never spliced +warning: definition prose `sat_u_` was never spliced warning: definition prose `setminus1_` was never spliced warning: definition prose `setminus_` was never spliced warning: definition prose `setproduct1_` was never spliced @@ -2041,10 +2100,13 @@ warning: definition prose `var` was never spliced warning: definition prose `vbinop_` was never spliced warning: definition prose `vcvtop__` was never spliced warning: definition prose `vextbinop__` was never spliced +warning: definition prose `vextternop__` was never spliced warning: definition prose `vextunop__` was never spliced warning: definition prose `vrelop_` was never spliced warning: definition prose `vshiftop_` was never spliced warning: definition prose `vsize` was never spliced +warning: definition prose `vternop_` was never spliced +warning: definition prose `vtestop_` was never spliced warning: definition prose `vunop_` was never spliced warning: definition prose `vunpack` was never spliced warning: definition prose `vvbinop_` was never spliced diff --git a/test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast b/test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast new file mode 100644 index 0000000000..8e0e5d67d6 --- /dev/null +++ b/test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast @@ -0,0 +1,27 @@ +;; Tests for i16x8.relaxed_q15mulr_s. + +(module + (func (export "i16x8.relaxed_q15mulr_s") (param v128 v128) (result v128) (i16x8.relaxed_q15mulr_s (local.get 0) (local.get 1))) + + (func (export "i16x8.relaxed_q15mulr_s_cmp") (param v128 v128) (result v128) + (i16x8.eq + (i16x8.relaxed_q15mulr_s (local.get 0) (local.get 1)) + (i16x8.relaxed_q15mulr_s (local.get 0) (local.get 1)))) +) + +;; INT16_MIN = -32768 +(assert_return (invoke "i16x8.relaxed_q15mulr_s" + (v128.const i16x8 -32768 -32767 32767 0 0 0 0 0) + (v128.const i16x8 -32768 -32768 32767 0 0 0 0 0)) + ;; overflows, return either INT16_MIN or INT16_MAX + (either (v128.const i16x8 -32768 32767 32766 0 0 0 0 0) + (v128.const i16x8 32767 32767 32766 0 0 0 0 0))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +(assert_return (invoke "i16x8.relaxed_q15mulr_s_cmp" + (v128.const i16x8 -32768 -32767 32767 0 0 0 0 0) + (v128.const i16x8 -32768 -32768 32767 0 0 0 0 0)) + ;; overflows, return either INT16_MIN or INT16_MAX + (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) + diff --git a/test/core/relaxed-simd/i32x4_relaxed_trunc.wast b/test/core/relaxed-simd/i32x4_relaxed_trunc.wast new file mode 100644 index 0000000000..889542c6ad --- /dev/null +++ b/test/core/relaxed-simd/i32x4_relaxed_trunc.wast @@ -0,0 +1,123 @@ +;; Tests for i32x4.relaxed_trunc_f32x4_s, i32x4.relaxed_trunc_f32x4_u, i32x4.relaxed_trunc_f64x2_s_zero, and i32x4.relaxed_trunc_f64x2_u_zero. + +(module + (func (export "i32x4.relaxed_trunc_f32x4_s") (param v128) (result v128) (i32x4.relaxed_trunc_f32x4_s (local.get 0))) + (func (export "i32x4.relaxed_trunc_f32x4_u") (param v128) (result v128) (i32x4.relaxed_trunc_f32x4_u (local.get 0))) + (func (export "i32x4.relaxed_trunc_f64x2_s_zero") (param v128) (result v128) (i32x4.relaxed_trunc_f64x2_s_zero (local.get 0))) + (func (export "i32x4.relaxed_trunc_f64x2_u_zero") (param v128) (result v128) (i32x4.relaxed_trunc_f64x2_u_zero (local.get 0))) + + (func (export "i32x4.relaxed_trunc_f32x4_s_cmp") (param v128) (result v128) + (i32x4.eq + (i32x4.relaxed_trunc_f32x4_s (local.get 0)) + (i32x4.relaxed_trunc_f32x4_s (local.get 0)))) + (func (export "i32x4.relaxed_trunc_f32x4_u_cmp") (param v128) (result v128) + (i32x4.eq + (i32x4.relaxed_trunc_f32x4_u (local.get 0)) + (i32x4.relaxed_trunc_f32x4_u (local.get 0)))) + (func (export "i32x4.relaxed_trunc_f64x2_s_zero_cmp") (param v128) (result v128) + (i32x4.eq + (i32x4.relaxed_trunc_f64x2_s_zero (local.get 0)) + (i32x4.relaxed_trunc_f64x2_s_zero (local.get 0)))) + (func (export "i32x4.relaxed_trunc_f64x2_u_zero_cmp") (param v128) (result v128) + (i32x4.eq + (i32x4.relaxed_trunc_f64x2_u_zero (local.get 0)) + (i32x4.relaxed_trunc_f64x2_u_zero (local.get 0)))) +) + +;; Test some edge cases around min/max to ensure that the instruction either +;; saturates correctly or returns INT_MIN. +;; +;; Note, though, that INT_MAX itself is not tested. The value for INT_MAX is +;; 2147483647 but that is not representable in a `f32` since it requires 31 bits +;; when a f32 has only 24 bits available. This means that the closest integers +;; to INT_MAX which can be represented are 2147483520 and 2147483648, meaning +;; that the INT_MAX test case cannot be tested. +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_s" + ;; INT32_MIN INT32_MAX + (v128.const f32x4 -2147483648.0 -2147483904.0 2.0 2147483904.0)) + ;; out of range -> saturate or INT32_MIN + (either (v128.const i32x4 -2147483648 -2147483648 2 2147483647) + (v128.const i32x4 -2147483648 -2147483648 2 -2147483648))) + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_s" + (v128.const f32x4 nan -nan nan:0x444444 -nan:0x444444)) + ;; nans -> 0 or INT32_MIN + (either (v128.const i32x4 0 0 0 0) + (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))) + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_u" + ;; UINT32_MIN UINT32_MIN-1 saturate or UINT32_MAX + (either (v128.const i32x4 0 0 4294967040 0xffffffff) + (v128.const i32x4 0 0xffffffff 4294967040 0xffffffff))) + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_u" + (v128.const f32x4 nan -nan nan:0x444444 -nan:0x444444)) + ;; nans -> 0 or UINT32_MAX + (either (v128.const i32x4 0 0 0 0) + (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff))) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_s_zero" + (v128.const f64x2 -2147483904.0 2147483904.0)) + ;; out of range -> saturate or INT32_MIN + (either (v128.const i32x4 -2147483648 2147483647 0 0) + (v128.const i32x4 -2147483648 -2147483648 0 0))) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_s_zero" + (v128.const f64x2 nan -nan)) + (either (v128.const i32x4 0 0 0 0) + (v128.const i32x4 0x80000000 0x80000000 0 0))) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_u_zero" + (v128.const f64x2 -1.0 4294967296.0)) + ;; out of range -> saturate or UINT32_MAX + (either (v128.const i32x4 0 0xffffffff 0 0) + (v128.const i32x4 0xffffffff 0xffffffff 0 0))) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_u_zero" + (v128.const f64x2 nan -nan)) + (either (v128.const i32x4 0 0 0 0) + (v128.const i32x4 0 0 0xffffffff 0xffffffff))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_s_cmp" + ;; INT32_MIN INT32_MAX + (v128.const f32x4 -2147483648.0 -2147483904.0 2147483647.0 2147483904.0)) + ;; out of range -> saturate or INT32_MIN + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_s_cmp" + (v128.const f32x4 nan -nan nan:0x444444 -nan:0x444444)) + ;; nans -> 0 or INT32_MIN + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_u_cmp" + ;; UINT32_MIN UINT32_MIN-1 saturate or UINT32_MAX + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f32x4_u_cmp" + (v128.const f32x4 nan -nan nan:0x444444 -nan:0x444444)) + ;; nans -> 0 or UINT32_MAX + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_s_zero_cmp" + (v128.const f64x2 -2147483904.0 2147483904.0)) + ;; out of range -> saturate or INT32_MIN + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_s_zero_cmp" + (v128.const f64x2 nan -nan)) + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_u_zero_cmp" + (v128.const f64x2 -1.0 4294967296.0)) + ;; out of range -> saturate or UINT32_MAX + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_trunc_f64x2_u_zero_cmp" + (v128.const f64x2 nan -nan)) + (v128.const i32x4 -1 -1 -1 -1)) diff --git a/test/core/relaxed-simd/i8x16_relaxed_swizzle.wast b/test/core/relaxed-simd/i8x16_relaxed_swizzle.wast new file mode 100644 index 0000000000..1b20668d3d --- /dev/null +++ b/test/core/relaxed-simd/i8x16_relaxed_swizzle.wast @@ -0,0 +1,44 @@ +;; Tests for relaxed i8x16 swizzle. + +(module + (func (export "i8x16.relaxed_swizzle") (param v128 v128) (result v128) (i8x16.relaxed_swizzle (local.get 0) (local.get 1))) + + (func (export "i8x16.relaxed_swizzle_cmp") (param v128 v128) (result v128) + (i8x16.eq + (i8x16.relaxed_swizzle (local.get 0) (local.get 1)) + (i8x16.relaxed_swizzle (local.get 0) (local.get 1)))) +) + +(assert_return (invoke "i8x16.relaxed_swizzle" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) + (either (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) + +;; out of range, returns 0 or modulo 15 if < 128 +(assert_return (invoke "i8x16.relaxed_swizzle" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31)) + (either (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) + +;; out of range, returns 0 if >= 128 +(assert_return (invoke "i8x16.relaxed_swizzle" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 128 129 130 131 132 133 134 135 248 249 250 251 252 253 254 255)) + (either (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +;; out of range, returns 0 or modulo 15 if < 128 +(assert_return (invoke "i8x16.relaxed_swizzle_cmp" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31)) + (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)) + +;; out of range, returns 0 if >= 128 +(assert_return (invoke "i8x16.relaxed_swizzle_cmp" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 128 129 130 131 132 133 134 135 248 249 250 251 252 253 254 255)) + (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)) diff --git a/test/core/relaxed-simd/relaxed_dot_product.wast b/test/core/relaxed-simd/relaxed_dot_product.wast new file mode 100644 index 0000000000..41dee0afcf --- /dev/null +++ b/test/core/relaxed-simd/relaxed_dot_product.wast @@ -0,0 +1,106 @@ +;; Tests for relaxed dot products. + +(module + (func (export "i16x8.relaxed_dot_i8x16_i7x16_s") (param v128 v128) (result v128) (i16x8.relaxed_dot_i8x16_i7x16_s (local.get 0) (local.get 1))) + (func (export "i32x4.relaxed_dot_i8x16_i7x16_add_s") (param v128 v128 v128) (result v128) (i32x4.relaxed_dot_i8x16_i7x16_add_s (local.get 0) (local.get 1) (local.get 2))) + + (func (export "i16x8.relaxed_dot_i8x16_i7x16_s_cmp") (param v128 v128) (result v128) + (i16x8.eq + (i16x8.relaxed_dot_i8x16_i7x16_s (local.get 0) (local.get 1)) + (i16x8.relaxed_dot_i8x16_i7x16_s (local.get 0) (local.get 1)))) + (func (export "i32x4.relaxed_dot_i8x16_i7x16_add_s_cmp") (param v128 v128 v128) (result v128) + (i16x8.eq + (i32x4.relaxed_dot_i8x16_i7x16_add_s (local.get 0) (local.get 1) (local.get 2)) + (i32x4.relaxed_dot_i8x16_i7x16_add_s (local.get 0) (local.get 1) (local.get 2)))) +) + +;; Simple values to ensure things are functional. +(assert_return (invoke "i16x8.relaxed_dot_i8x16_i7x16_s" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) + (v128.const i16x8 1 13 41 85 145 221 313 421)) + +;; Test max and min i8 values; +(assert_return (invoke "i16x8.relaxed_dot_i8x16_i7x16_s" + (v128.const i8x16 -128 -128 127 127 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0)) + (v128.const i16x8 -32512 32258 0 0 0 0 0 0)) + +;; signed * unsigned : -128 * 129 * 2 = -33,024 saturated to -32,768 +;; signed * signed : -128 * -127 * 2 = 32,512 +;; unsigned * unsigned : 128 * 129 * 2 = 33,024 +(assert_return (invoke "i16x8.relaxed_dot_i8x16_i7x16_s" + (v128.const i8x16 -128 -128 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 -127 -127 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + (either + (v128.const i16x8 -32768 0 0 0 0 0 0 0) + (v128.const i16x8 32512 0 0 0 0 0 0 0) + (v128.const i16x8 33024 0 0 0 0 0 0 0))) + +;; Simple values to ensure things are functional. +(assert_return (invoke "i32x4.relaxed_dot_i8x16_i7x16_add_s" + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i32x4 0 1 2 3)) + ;; intermediate result is [14, 126, 366, 734] + (v128.const i32x4 14 127 368 737)) + +;; Test max and min i8 values; +(assert_return (invoke "i32x4.relaxed_dot_i8x16_i7x16_add_s" + (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 0 0 0 0 0 0 0 0) + (v128.const i8x16 127 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0) + (v128.const i32x4 1 2 3 4)) + ;; intermediate result is [-65024, 64516, 0, 0] + (v128.const i32x4 -65023 64518 3 4)) + +;; signed * unsigned : -128 * 129 * 4 = -66,048 (+ 1) VPDPBUSD AVX2-VNNI or AVX512-VNNI +;; signed * unsigned with intermediate saturation : +;; (-128 * 129) + (-128 * 129) = -33024 saturated to -32768 (PMADDUBSW) +;; -32768 + -32768 = -65536 (+ 1) +;; signed * signed : -128 * -127 * 4 = 65,024 (+ 1) +;; unsigned * unsigned : 128 * 129 * 2 = 66,048 (+ 1) +(assert_return (invoke "i32x4.relaxed_dot_i8x16_i7x16_add_s" + (v128.const i8x16 -128 -128 -128 -128 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 -127 -127 -127 -127 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i32x4 1 2 3 4)) + (either + (v128.const i32x4 -66047 2 3 4) + (v128.const i32x4 -65535 2 3 4) + (v128.const i32x4 65025 2 3 4) + (v128.const i32x4 66049 2 3 4))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +;; Test max and min i8 values; +(assert_return (invoke "i16x8.relaxed_dot_i8x16_i7x16_s_cmp" + (v128.const i8x16 -128 -128 127 127 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0)) + (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) + +;; Test max and min i8 values; +(assert_return (invoke "i32x4.relaxed_dot_i8x16_i7x16_add_s_cmp" + (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 0 0 0 0 0 0 0 0) + (v128.const i8x16 127 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0) + (v128.const i32x4 1 2 3 4)) + ;; intermediate result is [-65024, 64516, 0, 0] + (v128.const i32x4 -1 -1 -1 -1)) + +;; signed * unsigned : -128 * 129 * 2 = -33,024 saturated to -32,768 +;; signed * signed : -128 * -127 * 2 = 32,512 +;; unsigned * unsigned : 128 * 129 * 2 = 33,024 +(assert_return (invoke "i16x8.relaxed_dot_i8x16_i7x16_s_cmp" + (v128.const i8x16 -128 -128 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 -127 -127 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) + +;; signed * unsigned : -128 * 129 * 4 = -66,048 (+ 1) VPDPBUSD AVX2-VNNI or AVX512-VNNI +;; signed * unsigned with intermediate saturation : +;; (-128 * 129) + (-128 * 129) = -33024 saturated to -32768 (PMADDUBSW) +;; -32768 + -32768 = -65536 (+ 1) +;; signed * signed : -128 * -127 * 4 = 65,024 (+ 1) +;; unsigned * unsigned : 128 * 129 * 2 = 66,048 (+ 1) +(assert_return (invoke "i32x4.relaxed_dot_i8x16_i7x16_add_s_cmp" + (v128.const i8x16 -128 -128 -128 -128 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i8x16 -127 -127 -127 -127 0 0 0 0 0 0 0 0 0 0 0 0) + (v128.const i32x4 1 2 3 4)) + (v128.const i32x4 -1 -1 -1 -1)) diff --git a/test/core/relaxed-simd/relaxed_laneselect.wast b/test/core/relaxed-simd/relaxed_laneselect.wast new file mode 100644 index 0000000000..144beb53e5 --- /dev/null +++ b/test/core/relaxed-simd/relaxed_laneselect.wast @@ -0,0 +1,102 @@ +;; Tests for i8x16.relaxed_laneselect, i16x8.relaxed_laneselect, i32x4.relaxed_laneselect, and i64x2.relaxed_laneselect. + +(module + (func (export "i8x16.relaxed_laneselect") (param v128 v128 v128) (result v128) (i8x16.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2))) + (func (export "i16x8.relaxed_laneselect") (param v128 v128 v128) (result v128) (i16x8.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2))) + (func (export "i32x4.relaxed_laneselect") (param v128 v128 v128) (result v128) (i32x4.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2))) + (func (export "i64x2.relaxed_laneselect") (param v128 v128 v128) (result v128) (i64x2.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2))) + + (func (export "i8x16.relaxed_laneselect_cmp") (param v128 v128 v128) (result v128) + (i8x16.eq + (i8x16.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)) + (i8x16.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)))) + (func (export "i16x8.relaxed_laneselect_cmp") (param v128 v128 v128) (result v128) + (i16x8.eq + (i16x8.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)) + (i16x8.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)))) + (func (export "i32x4.relaxed_laneselect_cmp") (param v128 v128 v128) (result v128) + (i32x4.eq + (i32x4.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)) + (i32x4.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)))) + (func (export "i64x2.relaxed_laneselect_cmp") (param v128 v128 v128) (result v128) + (i64x2.eq + (i64x2.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)) + (i64x2.relaxed_laneselect (local.get 0) (local.get 1) (local.get 2)))) +) + +(assert_return (invoke "i8x16.relaxed_laneselect" + (v128.const i8x16 0 1 0x12 0x12 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 16 17 0x34 0x34 20 21 22 23 24 25 26 27 28 29 30 31) + (v128.const i8x16 0xff 0 0xf0 0x0f 0 0 0 0 0 0 0 0 0 0 0 0)) + (either (v128.const i8x16 0 17 0x14 0x32 20 21 22 23 24 25 26 27 28 29 30 31) + (v128.const i8x16 0 17 0x12 0x34 20 21 22 23 24 25 26 27 28 29 30 31))) + +(assert_return (invoke "i16x8.relaxed_laneselect" + (v128.const i16x8 0 1 0x1234 0x1234 4 5 6 7) + (v128.const i16x8 8 9 0x5678 0x5678 12 13 14 15) + (v128.const i16x8 0xffff 0 0xff00 0x00ff 0 0 0 0)) + (either (v128.const i16x8 0 9 0x1278 0x5634 12 13 14 15) + (v128.const i16x8 0 9 0x1234 0x5678 12 13 14 15))) + +;; special case for i16x8 to allow pblendvb +(assert_return (invoke "i16x8.relaxed_laneselect" + (v128.const i16x8 0 1 0x1234 0x1234 4 5 6 7) + (v128.const i16x8 8 9 0x5678 0x5678 12 13 14 15) + (v128.const i16x8 0xffff 0 0xff00 0x0080 0 0 0 0)) ;; 0x0080 is the special case + (either (v128.const i16x8 0 9 0x1278 0x5678 12 13 14 15) ;; bitselect + (v128.const i16x8 0 9 0x1234 0x5678 12 13 14 15) ;; top bit of i16 lane examined + (v128.const i16x8 0 9 0x1278 0x5634 12 13 14 15) ;; top bit of each byte + )) + +(assert_return (invoke "i32x4.relaxed_laneselect" + (v128.const i32x4 0 1 0x12341234 0x12341234) + (v128.const i32x4 4 5 0x56785678 0x56785678) + (v128.const i32x4 0xffffffff 0 0xffff0000 0x0000ffff)) + (either (v128.const i32x4 0 5 0x12345678 0x56781234) + (v128.const i32x4 0 5 0x12341234 0x56785678))) + +(assert_return (invoke "i64x2.relaxed_laneselect" + (v128.const i64x2 0 1) + (v128.const i64x2 2 3) + (v128.const i64x2 0xffffffffffffffff 0)) + (either (v128.const i64x2 0 3) + (v128.const i64x2 0 3))) + +(assert_return (invoke "i64x2.relaxed_laneselect" + (v128.const i64x2 0x1234123412341234 0x1234123412341234) + (v128.const i64x2 0x5678567856785678 0x5678567856785678) + (v128.const i64x2 0xffffffff00000000 0x00000000ffffffff)) + (either (v128.const i64x2 0x1234123456785678 0x5678567812341234) + (v128.const i64x2 0x1234123412341234 0x5678567856785678))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +(assert_return (invoke "i8x16.relaxed_laneselect_cmp" + (v128.const i8x16 0 1 0x12 0x12 4 5 6 7 8 9 10 11 12 13 14 15) + (v128.const i8x16 16 17 0x34 0x34 20 21 22 23 24 25 26 27 28 29 30 31) + (v128.const i8x16 0xff 0 0xf0 0x0f 0 0 0 0 0 0 0 0 0 0 0 0)) + (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)) + +(assert_return (invoke "i16x8.relaxed_laneselect_cmp" + (v128.const i16x8 0 1 0x1234 0x1234 4 5 6 7) + (v128.const i16x8 8 9 0x5678 0x5678 12 13 14 15) + (v128.const i16x8 0xffff 0 0xff00 0x00ff 0 0 0 0)) + (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) + +(assert_return (invoke "i32x4.relaxed_laneselect_cmp" + (v128.const i32x4 0 1 0x12341234 0x12341234) + (v128.const i32x4 4 5 0x56785678 0x56785678) + (v128.const i32x4 0xffffffff 0 0xffff0000 0x0000ffff)) + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "i64x2.relaxed_laneselect_cmp" + (v128.const i64x2 0 1) + (v128.const i64x2 2 3) + (v128.const i64x2 0xffffffffffffffff 0)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "i64x2.relaxed_laneselect_cmp" + (v128.const i64x2 0x1234123412341234 0x1234123412341234) + (v128.const i64x2 0x5678567856785678 0x5678567856785678) + (v128.const i64x2 0xffffffff00000000 0x00000000ffffffff)) + (v128.const i64x2 -1 -1)) diff --git a/test/core/relaxed-simd/relaxed_madd_nmadd.wast b/test/core/relaxed-simd/relaxed_madd_nmadd.wast new file mode 100644 index 0000000000..c64a256f9c --- /dev/null +++ b/test/core/relaxed-simd/relaxed_madd_nmadd.wast @@ -0,0 +1,223 @@ +;; Tests for f32x4.relaxed_madd, f32x4.relaxed_nmadd, f64x2.relaxed_madd, and f64x2.relaxed_nmadd. + +(module + (func (export "f32x4.relaxed_madd") (param v128 v128 v128) (result v128) (f32x4.relaxed_madd (local.get 0) (local.get 1) (local.get 2))) + (func (export "f32x4.relaxed_nmadd") (param v128 v128 v128) (result v128) (f32x4.relaxed_nmadd (local.get 0) (local.get 1) (local.get 2))) + (func (export "f64x2.relaxed_nmadd") (param v128 v128 v128) (result v128) (f64x2.relaxed_nmadd (local.get 0) (local.get 1) (local.get 2))) + (func (export "f64x2.relaxed_madd") (param v128 v128 v128) (result v128) (f64x2.relaxed_madd (local.get 0) (local.get 1) (local.get 2))) + + (func (export "f32x4.relaxed_madd_cmp") (param v128 v128 v128) (result v128) + (f32x4.eq + (f32x4.relaxed_madd (local.get 0) (local.get 1) (local.get 2)) + (f32x4.relaxed_madd (local.get 0) (local.get 1) (local.get 2)))) + (func (export "f32x4.relaxed_nmadd_cmp") (param v128 v128 v128) (result v128) + (f32x4.eq + (f32x4.relaxed_nmadd (local.get 0) (local.get 1) (local.get 2)) + (f32x4.relaxed_nmadd (local.get 0) (local.get 1) (local.get 2)))) + (func (export "f64x2.relaxed_nmadd_cmp") (param v128 v128 v128) (result v128) + (f64x2.eq + (f64x2.relaxed_nmadd (local.get 0) (local.get 1) (local.get 2)) + (f64x2.relaxed_nmadd (local.get 0) (local.get 1) (local.get 2)))) + (func (export "f64x2.relaxed_madd_cmp") (param v128 v128 v128) (result v128) + (f64x2.eq + (f64x2.relaxed_madd (local.get 0) (local.get 1) (local.get 2)) + (f64x2.relaxed_madd (local.get 0) (local.get 1) (local.get 2)))) +) + + +;; FLT_MAX == 0x1.fffffep+127 +;; FLT_MAX * 2 - FLT_MAX == +;; FLT_MAX (if fma) +;; 0 (if no fma) +;; from https://www.vinc17.net/software/fma-tests.c +(assert_return (invoke "f32x4.relaxed_madd" + (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 ) + (v128.const f32x4 2.0 2.0 2.0 2.0) + (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127)) + (either (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127) + (v128.const f32x4 inf inf inf inf))) + +;; Special values for float: +;; x = 0x1.000004p+0 (1 + 2^-22) +;; y = 0x1.0002p+0 (1 + 2^-15) +;; z = -(1.0 + 0x0.0002p+0 + 0x0.000004p+0) +;; = -0x1.000204p+0 +;; x.y = 1.0 + 0x0.0002p+0 + 0x0.000004p+0 + 0x1p-37 (round bit) +;; x.y+z = 0 (2 roundings) +;; fma(x, y, z) = (0x1p-37) 2^-37 +;; from https://accurate-algorithms.readthedocs.io/en/latest/ch09appendix.html#test-system-information +(assert_return (invoke "f32x4.relaxed_madd" + (v128.const f32x4 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0) + (v128.const f32x4 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0) + (v128.const f32x4 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0)) + (either (v128.const f32x4 0x1p-37 0x1p-37 0x1p-37 0x1p-37) + (v128.const f32x4 0 0 0 0))) +;; nmadd tests with negated x, same answers are expected. +(assert_return (invoke "f32x4.relaxed_nmadd" + (v128.const f32x4 -0x1.000004p+0 -0x1.000004p+0 -0x1.000004p+0 -0x1.000004p+0) + (v128.const f32x4 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0) + (v128.const f32x4 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0)) + (either (v128.const f32x4 0x1p-37 0x1p-37 0x1p-37 0x1p-37) + (v128.const f32x4 0 0 0 0))) +;; nmadd tests with negated y, same answers are expected. +(assert_return (invoke "f32x4.relaxed_nmadd" + (v128.const f32x4 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0) + (v128.const f32x4 -0x1.0002p+0 -0x1.0002p+0 -0x1.0002p+0 -0x1.0002p+0) + (v128.const f32x4 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0)) + (either (v128.const f32x4 0x1p-37 0x1p-37 0x1p-37 0x1p-37) + (v128.const f32x4 0 0 0 0))) + +;; DBL_MAX = 0x1.fffffffffffffp+1023 +;; DLB_MAX * 2 - DLB_MAX == +;; DLB_MAX (if fma) +;; 0 (if no fma) +;; form https://www.vinc17.net/software/fma-tests.c +;; from https://www.vinc17.net/software/fma-tests.c +(assert_return (invoke "f64x2.relaxed_madd" + (v128.const f64x2 0x1.fffffffffffffp+1023 0x1.fffffffffffffp+1023) + (v128.const f64x2 2.0 2.0) + (v128.const f64x2 -0x1.fffffffffffffp+1023 -0x1.fffffffffffffp+1023)) + (either (v128.const f64x2 0x1.fffffffffffffp+1023 0x1.fffffffffffffp+1023) + (v128.const f64x2 inf inf))) + +;; Special values for double: +;; x = 0x1.00000004p+0 (1 + 2^-30) +;; y = 0x1.000002p+0 (1 + 2^-23) +;; z = -(1.0 + 0x0.000002p+0 + 0x0.00000004p+0) +;; = -0x1.00000204p+0 +;; x.y = 1.0 + 0x0.000002p+0 + 0x0.00000004p+0 + 0x1p-53 (round bit) +;; x.y+z = 0 (2 roundings) +;; fma(x, y, z) = 0x1p-53 +;; from https://accurate-algorithms.readthedocs.io/en/latest/ch09appendix.html#test-system-information +(assert_return (invoke "f64x2.relaxed_madd" + (v128.const f64x2 0x1.00000004p+0 0x1.00000004p+0) + (v128.const f64x2 0x1.000002p+0 0x1.000002p+0) + (v128.const f64x2 -0x1.00000204p+0 -0x1.00000204p+0)) + (either (v128.const f64x2 0x1p-53 0x1p-53) + (v128.const f64x2 0 0))) +;; nmadd tests with negated x, same answers are expected. +(assert_return (invoke "f64x2.relaxed_nmadd" + (v128.const f64x2 -0x1.00000004p+0 -0x1.00000004p+0) + (v128.const f64x2 0x1.000002p+0 0x1.000002p+0) + (v128.const f64x2 -0x1.00000204p+0 -0x1.00000204p+0)) + (either (v128.const f64x2 0x1p-53 0x1p-53) + (v128.const f64x2 0 0))) +;; nmadd tests with negated y, same answers are expected. +(assert_return (invoke "f64x2.relaxed_nmadd" + (v128.const f64x2 0x1.00000004p+0 0x1.00000004p+0) + (v128.const f64x2 -0x1.000002p+0 -0x1.000002p+0) + (v128.const f64x2 -0x1.00000204p+0 -0x1.00000204p+0)) + (either (v128.const f64x2 0x1p-53 0x1p-53) + (v128.const f64x2 0 0))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +;; FLT_MAX == 0x1.fffffep+127 +;; FLT_MAX * 2 - FLT_MAX == +;; FLT_MAX (if fma) +;; 0 (if no fma) +;; from https://www.vinc17.net/software/fma-tests.c +(assert_return (invoke "f32x4.relaxed_madd_cmp" + (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 ) + (v128.const f32x4 2.0 2.0 2.0 2.0) + (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127)) + (v128.const i32x4 -1 -1 -1 -1)) + +;; Special values for float: +;; x = 0x1.000004p+0 (1 + 2^-22) +;; y = 0x1.0002p+0 (1 + 2^-15) +;; z = -(1.0 + 0x0.0002p+0 + 0x0.000004p+0) +;; = -0x1.000204p+0 +;; x.y = 1.0 + 0x0.0002p+0 + 0x0.000004p+0 + 0x1p-37 (round bit) +;; x.y+z = 0 (2 roundings) +;; fma(x, y, z) = (0x1p-37) 2^-37 +;; from https://accurate-algorithms.readthedocs.io/en/latest/ch09appendix.html#test-system-information +(assert_return (invoke "f32x4.relaxed_madd_cmp" + (v128.const f32x4 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0) + (v128.const f32x4 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0) + (v128.const f32x4 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0)) + (v128.const i32x4 -1 -1 -1 -1)) +;; nmadd tests with negated x, same answers are expected. +(assert_return (invoke "f32x4.relaxed_nmadd_cmp" + (v128.const f32x4 -0x1.000004p+0 -0x1.000004p+0 -0x1.000004p+0 -0x1.000004p+0) + (v128.const f32x4 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0 0x1.0002p+0) + (v128.const f32x4 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0)) + (v128.const i32x4 -1 -1 -1 -1)) +;; nmadd tests with negated y, same answers are expected. +(assert_return (invoke "f32x4.relaxed_nmadd_cmp" + (v128.const f32x4 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0 0x1.000004p+0) + (v128.const f32x4 -0x1.0002p+0 -0x1.0002p+0 -0x1.0002p+0 -0x1.0002p+0) + (v128.const f32x4 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0 -0x1.000204p+0)) + (v128.const i32x4 -1 -1 -1 -1)) + +;; DBL_MAX = 0x1.fffffffffffffp+1023 +;; DLB_MAX * 2 - DLB_MAX == +;; DLB_MAX (if fma) +;; 0 (if no fma) +;; form https://www.vinc17.net/software/fma-tests.c +;; from https://www.vinc17.net/software/fma-tests.c +(assert_return (invoke "f64x2.relaxed_madd_cmp" + (v128.const f64x2 0x1.fffffffffffffp+1023 0x1.fffffffffffffp+1023) + (v128.const f64x2 2.0 2.0) + (v128.const f64x2 -0x1.fffffffffffffp+1023 -0x1.fffffffffffffp+1023)) + (v128.const i64x2 -1 -1)) + +;; Special values for double: +;; x = 0x1.00000004p+0 (1 + 2^-30) +;; y = 0x1.000002p+0 (1 + 2^-23) +;; z = -(1.0 + 0x0.000002p+0 + 0x0.00000004p+0) +;; = -0x1.00000204p+0 +;; x.y = 1.0 + 0x0.000002p+0 + 0x0.00000004p+0 + 0x1p-53 (round bit) +;; x.y+z = 0 (2 roundings) +;; fma(x, y, z) = 0x1p-53 +;; from https://accurate-algorithms.readthedocs.io/en/latest/ch09appendix.html#test-system-information +(assert_return (invoke "f64x2.relaxed_madd_cmp" + (v128.const f64x2 0x1.00000004p+0 0x1.00000004p+0) + (v128.const f64x2 0x1.000002p+0 0x1.000002p+0) + (v128.const f64x2 -0x1.00000204p+0 -0x1.00000204p+0)) + (v128.const i64x2 -1 -1)) +;; nmadd tests with negated x, same answers are expected. +(assert_return (invoke "f64x2.relaxed_nmadd_cmp" + (v128.const f64x2 -0x1.00000004p+0 -0x1.00000004p+0) + (v128.const f64x2 0x1.000002p+0 0x1.000002p+0) + (v128.const f64x2 -0x1.00000204p+0 -0x1.00000204p+0)) + (v128.const i64x2 -1 -1)) +;; nmadd tests with negated y, same answers are expected. +(assert_return (invoke "f64x2.relaxed_nmadd_cmp" + (v128.const f64x2 0x1.00000004p+0 0x1.00000004p+0) + (v128.const f64x2 -0x1.000002p+0 -0x1.000002p+0) + (v128.const f64x2 -0x1.00000204p+0 -0x1.00000204p+0)) + (v128.const i64x2 -1 -1)) + +;; Test that the non-deterministic choice of fusing and then rounding or +;; rounding multiple times in `relaxed_madd` is consistent throughout a +;; program's execution. +;; +;; This property is impossible to test exhaustively, so this is just a simple +;; smoke test for when the operands to a `relaxed_madd` are known statically +;; versus when they are dynamically supplied. This should, at least, catch +;; illegal constant-folding and -propagation by the compiler that leads to +;; inconsistent rounding behavior at compile time versus at run time. +;; +;; FLT_MAX == 0x1.fffffep+127 +;; FLT_MAX * 2 - FLT_MAX == +;; FLT_MAX (if fma) +;; 0 (if no fma) +;; from https://www.vinc17.net/software/fma-tests.c +(module + (func (export "test-consistent-nondeterminism") (param v128 v128 v128) (result v128) + (f32x4.eq + (f32x4.relaxed_madd (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 ) + (v128.const f32x4 2.0 2.0 2.0 2.0) + (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127)) + (f32x4.relaxed_madd (local.get 0) + (local.get 1) + (local.get 2)) + ) + ) +) +(assert_return (invoke "test-consistent-nondeterminism" + (v128.const f32x4 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 0x1.fffffep+127 ) + (v128.const f32x4 2.0 2.0 2.0 2.0) + (v128.const f32x4 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127 -0x1.fffffep+127)) + (v128.const i32x4 -1 -1 -1 -1)) diff --git a/test/core/relaxed-simd/relaxed_min_max.wast b/test/core/relaxed-simd/relaxed_min_max.wast new file mode 100644 index 0000000000..d8a04ba4df --- /dev/null +++ b/test/core/relaxed-simd/relaxed_min_max.wast @@ -0,0 +1,183 @@ +;; Tests for f32x4.min, f32x4.max, f64x2.min, and f64x2.max. + +(module + (func (export "f32x4.relaxed_min") (param v128 v128) (result v128) (f32x4.relaxed_min (local.get 0) (local.get 1))) + (func (export "f32x4.relaxed_max") (param v128 v128) (result v128) (f32x4.relaxed_max (local.get 0) (local.get 1))) + (func (export "f64x2.relaxed_min") (param v128 v128) (result v128) (f64x2.relaxed_min (local.get 0) (local.get 1))) + (func (export "f64x2.relaxed_max") (param v128 v128) (result v128) (f64x2.relaxed_max (local.get 0) (local.get 1))) + + (func (export "f32x4.relaxed_min_cmp") (param v128 v128) (result v128) + (i32x4.eq + (f32x4.relaxed_min (local.get 0) (local.get 1)) + (f32x4.relaxed_min (local.get 0) (local.get 1)))) + (func (export "f32x4.relaxed_max_cmp") (param v128 v128) (result v128) + (i32x4.eq + (f32x4.relaxed_max (local.get 0) (local.get 1)) + (f32x4.relaxed_max (local.get 0) (local.get 1)))) + (func (export "f64x2.relaxed_min_cmp") (param v128 v128) (result v128) + (i64x2.eq + (f64x2.relaxed_min (local.get 0) (local.get 1)) + (f64x2.relaxed_min (local.get 0) (local.get 1)))) + (func (export "f64x2.relaxed_max_cmp") (param v128 v128) (result v128) + (i64x2.eq + (f64x2.relaxed_max (local.get 0) (local.get 1)) + (f64x2.relaxed_max (local.get 0) (local.get 1)))) +) + +(assert_return (invoke "f32x4.relaxed_min" + (v128.const f32x4 -nan nan 0 0) + (v128.const f32x4 0 0 -nan nan)) + (either (v128.const f32x4 nan:canonical nan:canonical nan:canonical nan:canonical) + (v128.const f32x4 nan:canonical nan:canonical 0 0) + (v128.const f32x4 0 0 nan:canonical nan:canonical) + (v128.const f32x4 0 0 0 0))) + +(assert_return (invoke "f32x4.relaxed_min" + (v128.const f32x4 +0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 +0.0 +0.0 -0.0)) + (either (v128.const f32x4 -0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 +0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 +0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 -0.0 +0.0 -0.0))) + +(assert_return (invoke "f32x4.relaxed_max" + (v128.const f32x4 -nan nan 0 0) + (v128.const f32x4 0 0 -nan nan)) + (either (v128.const f32x4 nan:canonical nan:canonical nan:canonical nan:canonical) + (v128.const f32x4 nan:canonical nan:canonical 0 0) + (v128.const f32x4 0 0 nan:canonical nan:canonical) + (v128.const f32x4 0 0 0 0))) + +(assert_return (invoke "f32x4.relaxed_max" + (v128.const f32x4 +0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 +0.0 +0.0 -0.0)) + (either (v128.const f32x4 +0.0 +0.0 +0.0 -0.0) + (v128.const f32x4 +0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 +0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 -0.0 +0.0 -0.0))) + +(assert_return (invoke "f64x2.relaxed_min" + (v128.const f64x2 -nan nan) + (v128.const f64x2 0 0)) + (either (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 0 0) + (v128.const f64x2 0 0))) + +(assert_return (invoke "f64x2.relaxed_min" + (v128.const f64x2 0 0) + (v128.const f64x2 -nan nan)) + (either (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 0 0) + (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 0 0))) + +(assert_return (invoke "f64x2.relaxed_min" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 -0.0 +0.0)) + (either (v128.const f64x2 -0.0 -0.0) + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 -0.0 +0.0) + (v128.const f64x2 -0.0 -0.0))) + +(assert_return (invoke "f64x2.relaxed_min" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0)) + (either (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0))) + +(assert_return (invoke "f64x2.relaxed_max" + (v128.const f64x2 -nan nan) + (v128.const f64x2 0 0)) + (either (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 0 0) + (v128.const f64x2 0 0))) + +(assert_return (invoke "f64x2.relaxed_max" + (v128.const f64x2 0 0) + (v128.const f64x2 -nan nan)) + (either (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 0 0) + (v128.const f64x2 nan:canonical nan:canonical) + (v128.const f64x2 0 0))) + +(assert_return (invoke "f64x2.relaxed_max" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 -0.0 +0.0)) + (either (v128.const f64x2 +0.0 +0.0) + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 -0.0 +0.0) + (v128.const f64x2 -0.0 -0.0))) + +(assert_return (invoke "f64x2.relaxed_max" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0)) + (either (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0))) + +;; Check that multiple calls to the relaxed instruction with same inputs returns same results. + +(assert_return (invoke "f32x4.relaxed_min_cmp" + (v128.const f32x4 -nan nan 0 0) + (v128.const f32x4 0 0 -nan nan)) + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "f32x4.relaxed_min_cmp" + (v128.const f32x4 +0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 +0.0 +0.0 -0.0)) + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "f32x4.relaxed_max_cmp" + (v128.const f32x4 -nan nan 0 0) + (v128.const f32x4 0 0 -nan nan)) + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "f32x4.relaxed_max_cmp" + (v128.const f32x4 +0.0 -0.0 +0.0 -0.0) + (v128.const f32x4 -0.0 +0.0 +0.0 -0.0)) + (v128.const i32x4 -1 -1 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_min_cmp" + (v128.const f64x2 -nan nan) + (v128.const f64x2 0 0)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_min_cmp" + (v128.const f64x2 0 0) + (v128.const f64x2 -nan nan)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_min_cmp" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 -0.0 +0.0)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_min_cmp" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_max_cmp" + (v128.const f64x2 -nan nan) + (v128.const f64x2 0 0)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_max_cmp" + (v128.const f64x2 0 0) + (v128.const f64x2 -nan nan)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_max_cmp" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 -0.0 +0.0)) + (v128.const i64x2 -1 -1)) + +(assert_return (invoke "f64x2.relaxed_max_cmp" + (v128.const f64x2 +0.0 -0.0) + (v128.const f64x2 +0.0 -0.0)) + (v128.const i64x2 -1 -1)) diff --git a/test/core/run.py b/test/core/run.py index 8437837c8a..d153799775 100755 --- a/test/core/run.py +++ b/test/core/run.py @@ -33,9 +33,10 @@ main_test_files = glob.glob(os.path.join(inputDir, "*.wast")) # Other test files are in subdirectories simd_test_files = glob.glob(os.path.join(inputDir, "simd", "*.wast")) +relaxed_simd_test_files = glob.glob(os.path.join(inputDir, "relaxed-simd", "*.wast")) gc_test_files = glob.glob(os.path.join(inputDir, "gc", "*.wast")) multi_memory_test_files = glob.glob(os.path.join(inputDir, "multi-memory", "*.wast")) -all_test_files = main_test_files + simd_test_files + gc_test_files + multi_memory_test_files +all_test_files = main_test_files + simd_test_files + relaxed_simd_test_files + gc_test_files + multi_memory_test_files wasmExec = arguments.wasm wasmCommand = wasmExec + " " + arguments.opts diff --git a/test/js-api/wasm-module-builder.js b/test/js-api/wasm-module-builder.js index 4b5abcfbe6..04f19b2785 100644 --- a/test/js-api/wasm-module-builder.js +++ b/test/js-api/wasm-module-builder.js @@ -934,7 +934,7 @@ class WasmModuleBuilder { addTable(type, initial_size, max_size = undefined, init_expr = undefined) { if (type == kWasmI32 || type == kWasmI64 || type == kWasmF32 || - type == kWasmF64 || type == kWasmS128 || type == kWasmStmt) { + type == kWasmF64 || type == kWasmS128 || type == kWasmVoid) { throw new Error('Tables must be of a reference type'); } if (init_expr != undefined) checkExpr(init_expr);